Skip to content

nishindudu/AdaptiClip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 AdaptiClip

🗂️ A Clipboard Management Tool With Plugin Support for Automatic Text Conversion (eg., Dates, Times, JSON, etc.).

AdaptiClip GitHub Repo stars

✨ Features

  • 🧩 Plugin architecture for easy extensibility
  • 📅 Includes plugins for various text formats (dates, times, JSON, etc.)
  • ⌨️ Hotkey support for quick access
  • ⚙️ Configurable settings via INI file

🛠️ Installation

  1. 📥 Clone the repository:
    git clone https://github.com/nishindudu/AdaptiClip.git
  2. 📂 Navigate to the project directory:
    cd AdaptiClip
  3. 📦 Install the required packages:
    pip install -r requirements.txt
  4. ▶️ Run the application:
    python app.py

Supported Platforms

  • Windows: Fully supported (Tested)
  • macOS: Should work (Uses cross platform libraries)
  • Linux: Should work (Uses cross platform libraries)

If you have tested on macOS or Linux, please open an issue or a submit a pull request with edits to this documentation!

📝 Arguments

You can pass the following arguments to the application:

  • --trace: 🐞 Enable trace logging

  • --verbose: 📢 Enable verbose logging

  • --silent: 🤫 Run the application in silent mode

    Passing --silent is recommended for normal use.

🚦 Usage

  1. 📋 Copy any text to your clipboard.
  2. 🔄 The application will automatically convert the text based on the active plugins.
  3. ⚡ Use the configured hotkeys for quick access to specific plugins.

⌨️ Hotkey Setup

You can configure hotkeys for each plugin in the config.ini file.

📝 NOTE
config.ini file will be generated automatically on the first run.

For example (for setting a hotkey for JSON pretty print):

[JSONPrettyPrint]
on_keypress = true
hotkey = ctrl+alt+j

📝 NOTE
Setting a hotkey will disable auto-conversion for that plugin.

🧰 Troubleshooting

If you encounter any issues, please check the following:

  • ✅ Ensure that all required packages are installed.
  • 🛠️ Verify that the config.ini file is correctly configured.
  • 🐞 Pass the --trace argument to enable trace logging and check the logs for any error messages.
    • 🐛 If you found a bug, please create an issue on the GitHub repository or create a pull request with a fix.

🏗️ Creating Plugins

To create a new plugin for AdaptiClip, follow these steps:

  1. 📄 Create a new Python file in the plugins directory.

  2. 🏷️ Define a class and a constructor for your plugin (It should accept the config object).

    class MyPlugin():
         def __init__(self, CONFIG): #Should accept the config object
               self.config = CONFIG
               # Initialize your plugin here
  3. 🛠️ Implement the required methods for your plugin in the class.

    class MyPlugin():
         def __init__(self, CONFIG): #Should accept the config object
               self.config = CONFIG
               self.config.create_section() # Required only if there are no attributes to set (auto created on setting attributes)
    
               # If your plugin should only work on hotkeys, set on_keypress = true in the config file
               self.config.write("on_keypress", "true") # Example for hotkey only mode
               self.config.write("hotkey", "ctrl+alt+m") # Define preferred hotkey
               # Set any required attributes
    
               key = self.config.read("key") # Example for reading a key
    
               # Initialize your plugin here
    
         def detect(self, text) -> bool: #Should return a boolean indicating if the text is in the expected format
               # Detect the text format using the config
               return True
    
         def convert(self, text):
               # Process the text
               return text

⚠️ IMPORTANT
detect and convert methods are required for all plugins.

⚠️ IMPORTANT
All plugins must create a section in the config file. If there are no attributes to be set, the section can be empty and can be created by calling config.create_section().

Sample plugins are available in /plugins folder.

⚙️ Plugin Configuration

  • Setting the plugin to hotkey mode
    class MyPlugin():
         def __init__(self, CONFIG):
              self.config = CONFIG
              self.config.write("on_keypress", "true") # Setting this will disable auto-conversion
              self.config.write("hotkey", "ctrl+alt+m") # Setting a hotkey is required if your plugin is in hotkey only mode
    Example ini file:
    [MyPlugin]
    on_keypress = true
    hotkey = ctrl+alt+m

🤝 Contributing

We welcome contributions to AdaptiClip! If you'd like to contribute, please follow these steps:

  1. 🍴 Fork the repository.

  2. 🌿 Create a new branch for your feature or bug fix.

    git clone https://github.com/yourusername/AdaptiClip.git
  3. ✍️ Make your changes and commit them.

  4. 📬 Submit a pull request detailing your changes.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A clipboard management tool with plugin support for automatic text conversion (eg., dates, times, JSON, etc.).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages