faxii is the nickname of a little thermal printer on my desk, and this repo has the source code for the Telegram bot that controls it.
- python-telegram-bot
- escpos
- tinydb
- datetime
- Pillow
- emoji
- ujson
- Prints text, images, stickers, and images disguised as documents
- Extracts URLs from text, and prints them as QR codes
- Prints images in portrait layout, unless they'd be super long, then it just prints them landscape
- Print license support, including grant/revoke rights for owner
- Is just generally pretty neat?
- Prints timestamp on messages from anyone other than admin, timezones from this list are supported.
The bot requires a file in it's root directory, named config.json, with the following layout:
{ "token": "your_bot_token",
"admin_id": your_id,
"port": "your_printer_port",
"baud": your_printer_baudrate,
"auto_cut": true_false_auto_cut,
"max_width": your_max_print_width,
"timezone": "your_timezone",
"url_start_tags": ["https://", "http:/"],
"url_end_tags": [" ", ". ", "\n", ", ", "https://", "http:/"]}
- Image > ASCII art converter
- Haiku recognition
- Support for re-requesting a print license after it's been revoked
- More feedback for the user
- Logging
- Code comments