From 6c20fb318cb97ceecc2355d207a47bf826419227 Mon Sep 17 00:00:00 2001
From: drc <pass@cooco.de>
Date: Mon, 13 May 2024 18:01:33 +0200
Subject: [PATCH] Update readme file

---
 README.md | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 65c0cb5..e41c0f2 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,30 @@
 # python-infodisplay
 
-## Intent
+## Getting started
 
-This project is intended to replace the existing infodisplay tech stack.
\ No newline at end of file
+Install required python libraries, e.g.
+
+```
+pip install -r requirements.txt
+```
+
+Set required environment variables in a sensible way.
+
+```
+# API access token for homeassistant.s0
+HOMEASSISTANT_TOKEN=
+# Matrix API token for chat.stratum0.org
+MATRIX_TOKEN=
+# If necessary, force IPv4-only connections
+IP_MODE=legacy
+```
+
+Then, start the server and open http://localhost:8888
+
+```
+python3 index.py
+```
+
+## Structure of the application
+
+Every widget on the infodisplay is rendered into Jinja templates by a handler residing in `handlers`. The `index.htm` uses HTMX to reload each widget independently on different timers. Handlers using external data sources use the `@cached` decorator to avoid frequent requests to their respective upstream services.
-- 
GitLab