From 8e69681fc39c7b174f46180e9795e8c3aea52e71 Mon Sep 17 00:00:00 2001 From: Adam French Date: Sat, 7 Mar 2026 14:38:38 +0000 Subject: [PATCH] Update to include subcommands --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3da67bb --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# Receipt Maker + +Prints random images from 4chan's /bant/ board to an Epson TM-T20II thermal receipt printer over Ethernet. + +## How it works + +1. `connect_recipt.sh` — configures the network interface and connects to the printer at `192.168.192.168:9100` +2. `receipt.py` — CLI with subcommands to print random /bant/ images, text notes, or local images (resized to full printer width, 576px) + +## Requirements + +- Python 3 +- `python-escpos` +- `Pillow` +- `requests` +- `nmap` (for connection script) +- Epson TM-T20II connected via USB-to-Ethernet adapter + +## Usage + +```bash +# 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 script +- `connect_recipt.sh` — network setup for USB Ethernet adapter +- `img/` — downloaded images cache +- `img_fullwidth/` — resized images ready for printing