updating documentation for the project

This commit is contained in:
2026-04-04 15:31:45 -05:00
parent acd7b95dfc
commit d663509182
2 changed files with 104 additions and 3 deletions

View File

@@ -1,3 +1,62 @@
# morningedition
Morning Edition printable newspaper
A daily morning receipt printer for the Epson TM-T88V thermal printer.
Prints a personalized "newspaper" every morning at 6:30am via cron.
## What it prints
- **Header** — date, time, location (Bridgeland, Cypress TX)
- **On This Day** — historical fact for today's date (when available)
- **Weather** — current conditions, hi/lo, humidity, UV, wind, sunrise/sunset via wttr.in
- **Houston News** — 5 live headlines from ABC13 RSS
- **World News** — 5 live headlines from BBC RSS
- **Thought for the Day** — rotating daily quote
- **Morning Chuckle** — rotating daily joke
- **Did You Know?** — rotating daily fun fact
- **Local Tip** — rotating Bridgeland/Houston tips
## Requirements
- Python 3 (stdlib only, no pip installs needed)
- Epson TM-T88V connected via USB, configured in CUPS as printer name `receipt`
- Internet connection at print time (weather + news)
## Usage
```bash
# Print to printer
python3 morningedition.py
# Preview in terminal (no printing)
python3 morningedition.py --preview
```
## Cron setup
Already configured at 6:30am Central Time:
```
CRON_TZ=America/Chicago
30 6 * * * /usr/bin/python3 /home/rich/Devel/morningedition/morningedition.py
```
## Printer notes
- Prints in **raw ESC/POS mode** (`lpr -P receipt -o raw`) — faster and more reliable than CUPS rendering
- Paper cut is handled via `GS V 0x00` in the ESC/POS byte stream
- ASCII only — no emoji or unicode
- `WIDTH = 30` currently because the printer NV memory is locked to 58mm paper mode
(even though 80mm rolls are loaded). To fix: use Epson TM Utility on Windows to set
Memory Switch → Paper Width → 80mm, then change `WIDTH = 30``WIDTH = 42` in
`morningedition.py` line 23.
## Files
| File | Purpose |
|---|---|
| `morningedition.py` | Main script |
| `diagnose.py` | ESC/POS font/width diagnostic prints |
| `diagnose2.py` | Print area and character spacing diagnostics |
| `fixwidth.py` | NV paper-width fix attempts (v1) |
| `fixwidth2.py` | NV memory switch sweep (v2) |
| `readmsw.py` | Attempted memory switch readback via USB |