|
| 1 | +# Paste Bar Code |
| 2 | + |
| 3 | +A Python desktop application for real-time barcode detection and automated text input. Built with PySide6 and OpenCV, this application captures video from cameras or other sources, detects barcodes/QR codes, and automatically types the decoded content. |
| 4 | + |
| 5 | +## Download |
| 6 | + |
| 7 | +[](https://github.com/vasigaranandangel/paste-bar-code/releases/latest) |
| 8 | + |
| 9 | +## Features |
| 10 | + |
| 11 | +### Core Functionality |
| 12 | +- **Real-time Barcode Detection**: Detects and decodes barcodes and QR codes from video feeds |
| 13 | +- **Automatic Text Input**: Automatically types detected codes into any active application |
| 14 | +- **Visual Feedback**: Shows video feed with highlighted detected barcodes |
| 15 | +- **Audio Feedback**: Optional beep sound when codes are detected |
| 16 | + |
| 17 | +### Capture Sources |
| 18 | +- **Camera Capture**: Direct capture from webcams and cameras |
| 19 | +- **Flask Web Interface**: Capture from web-based camera feeds *Not implemented yet (need help)* |
| 20 | + |
| 21 | +### Configuration Options |
| 22 | +- **Lock Interval**: Configurable delay between code detections (default: 1.5 seconds) |
| 23 | +- **Auto-Press Enter**: Option to automatically press Enter after typing codes |
| 24 | +- **Audio Feedback**: Toggle beep sound on/off *Not implemented in UI yet* |
| 25 | +- **Type Codes**: Toggle automatic typing of detected codes *Not implemented in UI yet* |
| 26 | +- **Window Management**: Always-on-top mode and position memory *Not implemented in UI yet* |
| 27 | +- **Video Settings**: Frame flipping and capture source selection |
| 28 | + |
| 29 | +## Usage |
| 30 | + |
| 31 | +### Quick Start |
| 32 | +1. **Download the latest release** from the GitHub releases page (see download button above) |
| 33 | +2. **Run the executable** - No installation required, just double-click the `.exe` file |
| 34 | +3. **Start scanning** - The application will open with camera feed ready for barcode detection |
| 35 | + |
| 36 | +### How to Use |
| 37 | +1. **Launch the application** - The main window will open showing the camera feed |
| 38 | +2. **Select capture source** - Choose from the dropdown menu |
| 39 | +3. **Configure settings** - Adjust lock interval, enable/disable features as needed |
| 40 | +4. **Scan barcodes** - Point camera at barcodes/QR codes |
| 41 | +5. **Automatic input** - Detected codes will be typed automatically into the active application |
| 42 | + |
| 43 | +## Development |
| 44 | + |
| 45 | +### Prerequisites |
| 46 | +- Python 3.13 |
| 47 | + |
| 48 | +### Setup |
| 49 | +1. Clone the repository: |
| 50 | +```bash |
| 51 | +git clone <repository-url> |
| 52 | +cd paste-bar-code |
| 53 | +``` |
| 54 | + |
| 55 | +2. Install dependencies using UV: |
| 56 | +```bash |
| 57 | +uv sync |
| 58 | +``` |
| 59 | + |
| 60 | +Or using pip: |
| 61 | +```bash |
| 62 | +pip install -e . |
| 63 | +``` |
| 64 | + |
| 65 | +### Running the Application |
| 66 | +```bash |
| 67 | +python src/main.py |
| 68 | +``` |
| 69 | + |
| 70 | +Or use UV to run: |
| 71 | +```bash |
| 72 | +uv run python src/main.py |
| 73 | +``` |
| 74 | + |
| 75 | +### Command Line Options |
| 76 | +- `--version`: Display version information and exit |
| 77 | + |
| 78 | +### Building Executable |
| 79 | + |
| 80 | +Install PyInstaller and build: |
| 81 | +```bash |
| 82 | +uv sync --group setup |
| 83 | +uv run pyinstaller main.spec |
| 84 | +``` |
| 85 | + |
| 86 | +The executable will be created in the `dist/` directory. |
| 87 | + |
| 88 | +## Dependencies |
| 89 | + |
| 90 | +- **PySide6**: Qt-based GUI framework |
| 91 | +- **OpenCV**: Computer vision and image processing |
| 92 | +- **pyzbar**: Barcode/QR code decoding |
| 93 | +- **PyAutoGUI**: Automated keyboard input |
| 94 | +- **Flask**: Web interface for camera streaming |
| 95 | +- **eventlet**: WebSocket support for Flask |
| 96 | + |
| 97 | +## License |
| 98 | + |
| 99 | +This project is licensed under the MIT License. |
| 100 | + |
| 101 | +## Contributing |
| 102 | + |
| 103 | +1. Fork the repository |
| 104 | +2. Create a feature branch |
| 105 | +3. Make your changes |
| 106 | +4. Add tests if applicable |
| 107 | +5. Submit a pull request |
0 commit comments