Publish blog-style daily articles

This commit is contained in:
hbrain 2026-05-16 08:50:49 +00:00
parent 480e6d08ea
commit b7e417636e
3 changed files with 149 additions and 48 deletions

View file

@ -4,7 +4,7 @@ Cron-friendly Home Assistant observer:
- every 30 minutes: collect compact Home Assistant snapshots into `./data`
- every day at 05:00: send the last day of snapshots to AI
- publish a funny local webpage at `./web/index.html`
- publish a funny local blog at `./web/index.html` with daily article archive links
- save Markdown AI reports in `./reports`
## Setup
@ -102,12 +102,14 @@ Run the 05:00-style analysis/publishing step:
./run_ha_observer.sh analyze
```
Open the page served by nginx:
Open the blog served by nginx:
```text
http://localhost/haobserver/
```
Daily articles are written under `web/articles/YYYY-MM-DD.html`, and `index.html` links to the archive. New articles include context from previous reports from the last `ARTICLE_CONTEXT_DAYS` days.
This uses a symlink from `/var/www/html/haobserver` to the project's `./web` directory.
## Install cron jobs
@ -133,7 +135,7 @@ Manual crontab equivalent:
```text
/home/hbrain/haobserver/data/ 30-minute JSON snapshots
/home/hbrain/haobserver/reports/ daily Markdown AI reports
/home/hbrain/haobserver/web/ local funny webpage, index.html
/home/hbrain/haobserver/web/ local funny blog, index.html and articles/*.html
/var/www/html/haobserver symlink to web/ for nginx
/home/hbrain/haobserver/cron.log cron logs
```