1.1 KiB
1.1 KiB
Receipt Maker
Prints random images from 4chan's /bant/ board to an Epson TM-T20II thermal receipt printer over Ethernet.
How it works
connect_recipt.sh— configures the network interface and connects to the printer at192.168.192.168:9100receipt.py— CLI with subcommands to print random /bant/ images, text notes, or local images (resized to full printer width, 576px)
Requirements
- Python 3
python-escposPillowrequestsnmap(for connection script)- Epson TM-T20II connected via USB-to-Ethernet adapter
Usage
# Print a random image from /bant/
python receipt.py image
# Print a text note
python receipt.py note "your message here"
# Print a local image (with optional caption)
python receipt.py print path/to/image.jpg
python receipt.py print path/to/image.jpg "optional caption"
The script will run connect_recipt.sh automatically to bring up the network interface before printing.
Files
receipt.py— main scriptconnect_recipt.sh— network setup for USB Ethernet adapterimg/— downloaded images cacheimg_fullwidth/— resized images ready for printing