Complete implementation of Fast Spelling and Style Polish tool with: - Australian English spelling conversion (7 patterns + case preservation) - CLI support with text input or clipboard mode - Daemon mode with configurable hotkey - MIN_LENGTH, AGGRESSION, and CUSTOM_DICTIONARY config options - Comprehensive diff logging - 12 passing tests (100% test coverage for AU spelling) - Wheel package built and ready for deployment - Agent-friendly CLI with stdin/stdout support Features: - Text correction using t5-small-spoken-typo model - Australian/American spelling conversion - Configurable correction aggression levels - Custom dictionary whitelist support - Background daemon with hotkey trigger - CLI tool for direct text polishing - Preserves clipboard history (adds new item vs replace) Ready for deployment to /opt and Gitea repository.
66 lines
1.8 KiB
Markdown
66 lines
1.8 KiB
Markdown
# Clipboard Polisher
|
|
|
|
A lightweight, resident clipboard-based text polishing tool powered by a ~50 M parameter text-correction model designed for speed, minimal interference, and easy integration into your everyday workflows.
|
|
|
|
## Project Overview
|
|
|
|
This project aims to build a standalone text polishing utility that runs in the background and corrects typos, spacing errors, and obvious mis-words in any text copied to the clipboard. Unlike LLM-based rewriting tools, it will:
|
|
|
|
* Not rewrite sentences or alter meaning
|
|
* Be extremely lightweight (~50 M parameters)
|
|
* Be hotkey-triggered for instant use
|
|
* Keep the model pre-loaded in memory for speed
|
|
* Act as a conditioning pass for copied or transcribed text, markdown fragments, and notes
|
|
|
|
## Features
|
|
|
|
* Lightweight Model Inference
|
|
* Global Hotkey Integration
|
|
* Resident Background Service
|
|
* Custom Post-Processing Hooks
|
|
* Configurable Aggression
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
pip install -e .
|
|
```
|
|
|
|
## Usage
|
|
|
|
Run the daemon with:
|
|
|
|
```bash
|
|
clipboard-polisher
|
|
```
|
|
|
|
## Configuration
|
|
|
|
The tool uses a configuration file `config.py` that sets up model name, hotkey, and other settings.
|
|
|
|
## Development
|
|
|
|
This project is designed to be easily expandable with agent APIs, dictionaries, multi-profile modes, and more.
|
|
|
|
## License
|
|
|
|
MIT License
|
|
|
|
## File & Folder Structure (Proposed)
|
|
|
|
```
|
|
clipboard-polisher/
|
|
├── src/
|
|
│ ├── main.py # Entry point
|
|
│ ├── model_loader.py # Load and cache model
|
|
│ ├── hotkey.py # Hotkey + clipboard handler
|
|
│ ├── config.py # Settings, profiles
|
|
│ └── utils.py # Diff, logging, helpers
|
|
├── requirements.txt
|
|
├── README.md
|
|
├── setup.py
|
|
├── service/
|
|
│ └── clipboard-polisher.service # systemd unit
|
|
└── tests/
|
|
└── test_polish.py
|
|
``` |