41 lines
1.1 KiB
Markdown
41 lines
1.1 KiB
Markdown
# 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
|