From c69849ddd132943f587bafcfca4a9fd4879d3052 Mon Sep 17 00:00:00 2001 From: hermes Date: Mon, 5 Oct 2026 15:43:48 +0200 Subject: [PATCH] Add TRMNL e-ink feed endpoint /trmnl.json --- app/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/main.py b/app/main.py index ded601c..68ca986 100644 --- a/app/main.py +++ b/app/main.py @@ -14,6 +14,7 @@ from . import db from .config import settings from .generator import generation_exhausted, run_generation, today_local from .templates import CSS, PAGE_TEMPLATE +from .trmnl import trmnl_endpoint logging.basicConfig( level=logging.INFO, @@ -134,6 +135,12 @@ def index(): ) +@app.get("/trmnl.json") +def trmnl(request: Request): + """JSON feed for TRMNL e-ink devices (polling strategy).""" + return trmnl_endpoint(request) + + @app.get("/health") def health(): today = today_local()