Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copy-Copy 🚀

License: MIT Python 3.7+ Platform

English | 简体中文

A powerful and cross-platform command-line tool for copying files to clipboard. It supports copying file contents, file paths, and entire files, working seamlessly across macOS, Windows, and Linux.

✨ Features

  • 🔄 Cross-Platform Support: Works on macOS, Windows, and Linux
  • 📋 Multiple Copy Modes:
    • Copy file contents (text and images)
    • Copy file paths
    • Copy entire files (system-native file copying)
  • 🎯 Native Integration: Uses platform-specific APIs for best compatibility
  • 🚀 Easy to Use: Simple command-line interface
  • 💪 Robust Error Handling: Clear error messages and helpful suggestions

🚀 Installation

  1. Clone the repository:
git clone https://github.com/xin700/copy-copy.git
cd copy-copy
  1. Install dependencies:
pip install -r requirements.txt

Platform-Specific Requirements

Linux

Install xclip:

# Ubuntu/Debian
sudo apt-get install xclip

# Fedora
sudo dnf install xclip

# Arch Linux
sudo pacman -S xclip

🎯 Usage

Basic Usage

python copy_to_clipboard.py [options] file_path

Options

  • -c, --content: Copy file contents (default mode)
    • Text files: copies as text
    • Image files: copies as image
  • -p, --path: Copy file path
  • -f, --file: Copy file itself (like system's native file copy)

Examples

# Copy file contents (default)
python copy_to_clipboard.py document.txt

# Copy file path
python copy_to_clipboard.py -p document.txt

# Copy the entire file (can be pasted in file manager)
python copy_to_clipboard.py -f document.txt

💡 How It Works

Copy-Copy uses platform-specific mechanisms to ensure native compatibility:

  • macOS: Uses AppleScript for file operations and native clipboard handling
  • Windows: Utilizes Win32 API through pywin32
  • Linux: Implements xclip for clipboard operations

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

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

🙏 Acknowledgments

  • Thanks to all the contributors who have helped with the project
  • Inspired by the need for a cross-platform file copying solution

📞 Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue if your problem isn't already listed
  3. Provide as much detail as possible, including your OS and Python version

Made with ❤️ by [ XIN ]

About

An command line tool use for copy a file with one tap!

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages