PENGUIN PARSER
A simple Linux text parser and translation tool. I built this because I couldn't get Lunar Translator working on my system. It's my first Python project and first Linux app, so the code is kinda messy, more than half of it was written with AI help. But hey, it works! It works only on the gnome DE and ptyxis terminal (it used by gnome by default)
Linux with XDG Desktop Portal support Python 3.10+ Tesseract OCR A DeepSeek API key
On Fedora:
sudo dnf install tesseract python3-devel gcc
gobject-introspection-devel cairo-gobject-devel
libportal-devel
On Ubuntu/Debian, install the equivalent packages: sudo apt install tesseract-ocr python3-gi gir1.2-xdp-1.0
Installation
- git clone https://github.com/knyslys/PenguinParser.git
- cd PenguinParser
- python3 -m venv .venv
- source .venv/bin/activate
- pip install -r requirements.txt
- Add custom shortcut. Name it OCR Region or something like that. Command should be: /home/YOURNAME/PenguinParser/.venv/bin/python3 /home/YOURNAME/PenguinParser/trigger.py
- Add api key to config.json file
config.json: { "api-key": "YOUR_DEEPSEEK_API_KEY", "context": "Your translation instructions", "base_url": "https://api.deepseek.com", "model": "deepseek-chat" }
- chmod +x ./start_translator.sh
USAGE:
- ./start_translator.sh
- Press the shortcut that you defined in instalation step 6.
- Select the region.