The web server now runs a scheduler over schedules kept in SQLite
(~/.local/share/receipt-maker, outside the clone). A schedule is a
trigger, a receipt made of blocks, and options:
- Triggers: once, recurring (rrule-based, DST-safe), sun times,
reminders before calendar (ICS) events, RSS/JSON watchers, webhooks
with per-schedule secrets.
- Blocks, rendered fresh as one job: templated notes ({date},
{days_until:..}, rotating {choice}, trigger vars), QR, saved images,
random image, calendar agenda, feed headlines, dividers.
- Rules: quiet hours (hold/skip/ignore), daily cap, pause, catch-up
window for missed runs (never replayed), retries on connect failure
only; a mid-job drop (new PrinterDropped) is never resent.
receipt.py renders through composable Blocks (render_note/image/qr are
wrappers, output unchanged). Print history persists, with Print again.
The page moves to web/ with Print (note/image/QR + paper preview),
Schedules (presets, editor with live preview and next runs), History
and Settings tabs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
72 lines
2.0 KiB
TOML
72 lines
2.0 KiB
TOML
[project]
|
|
name = "receipt-maker"
|
|
version = "1.0.0"
|
|
description = "Print images and text notes to an Epson TM-T20II thermal receipt printer"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"python-escpos>=3.0",
|
|
"Pillow>=10.0",
|
|
"requests>=2.31",
|
|
"pyusb>=1.2", # printer.Usb backend for --usb
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
tui = [
|
|
"textual>=1.0",
|
|
"rich>=13.0", # imported directly by receipt_tui
|
|
]
|
|
web = [
|
|
"fastapi>=0.110",
|
|
"uvicorn>=0.29",
|
|
"python-multipart>=0.0.9", # FastAPI's form/upload parsing
|
|
"python-dateutil>=2.8", # recurrence rules
|
|
"icalendar>=5.0",
|
|
"recurring-ical-events>=2.1", # expands recurring calendar events
|
|
"feedparser>=6.0",
|
|
"astral>=3.2", # sunrise/sunset
|
|
"tzdata", # zoneinfo data where the OS has none (slim images)
|
|
]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"ruff>=0.4",
|
|
"textual>=1.0",
|
|
"rich>=13.0",
|
|
"fastapi>=0.110",
|
|
"uvicorn>=0.29", # imported by receipt_web.serve(), which the tests call
|
|
"python-multipart>=0.0.9",
|
|
"httpx>=0.27", # FastAPI's TestClient
|
|
"python-dateutil>=2.8", # recurrence rules
|
|
"icalendar>=5.0",
|
|
"recurring-ical-events>=2.1", # expands recurring calendar events
|
|
"feedparser>=6.0",
|
|
"astral>=3.2", # sunrise/sunset
|
|
"tzdata", # zoneinfo data where the OS has none (slim images)
|
|
]
|
|
|
|
[project.scripts]
|
|
receipt = "receipt:main"
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools]
|
|
py-modules = [
|
|
"receipt", "receipt_tui", "receipt_web", "receipt_store", "receipt_models",
|
|
"receipt_sources", "receipt_triggers", "receipt_content", "receipt_scheduler",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I", "UP", "B", "SIM", "S"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*" = ["S101"] # asserts are the point
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
pythonpath = ["."] # tests import receipt/receipt_tui without an editable install
|