Bring the docs in line with the code
- python-backend/README: track analysis is implemented (2e0e6ad); the cache layout, the module table (lirc, screen, timers, podcasts, tippen) and the route table (track analysis, HA proxy, typing game) were missing pieces. - docs/REPO_OVERVIEW: Mein Zimmer and the clock are implemented; Home Assistant is also reached over HTTP through the room page's proxy, not MQTT only; the IR remote, scripts/, the optional config sections and figure kind were not mentioned. - web/README: the key table was the mockup's (Ctrl transport keys, TAB over 'all'); ?pi=1 is now a preset with per-browser overrides, not a read-once flag; the room page and the typing game exist; eslint is part of the checks. - Docstrings that described earlier designs: HaConfig (written as browser-direct in the same commit that built the proxy,a8ed350), services/__init__, events, playback, media, colors, tippen progress and AppHeader, lowPower.ts, and the 'Hoerbuecher' spelling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -94,7 +94,10 @@ the prompt becomes a regression test by pasting it into a `.txt` file.
|
||||
| `musicmouse/reactions/` | The policy. `@on(SomeEvent)` functions that get the app and act. |
|
||||
| `musicmouse/library/` | The music collection: scanning, tags, cover art and its colours, the cache, and the seams for future track analysis. |
|
||||
| `musicmouse/services/mqtt/` | Home Assistant entities: three lights, a player sensor, a volume number, transport buttons, device triggers, a tag scanner. |
|
||||
| `musicmouse/services/web/` | The browser front-end's API: the library, a state websocket, command endpoints, and parent-mode settings. |
|
||||
| `musicmouse/services/web/` | The browser front-end's API: the library, a state websocket, command endpoints, parent-mode settings, the typing game and the Home Assistant proxy. |
|
||||
| `musicmouse/services/lirc/` | The IR remote, as a lircd TCP client. |
|
||||
| `musicmouse/services/` (`screen.py`, `timers.py`, `podcasts.py`) | The monitor's on/off and idle auto-off; the parents' timer and school-day calendar; the podcast feed poller. |
|
||||
| `musicmouse/tippen/` | The typing game's curriculum, progress and track unlocks. |
|
||||
| `musicmouse/simulator/` | Fake transport and player, the driver vocabulary, the REPL and the script runner. |
|
||||
| `musicmouse/config.py` | Pydantic schema, validation, and human-readable error formatting. |
|
||||
|
||||
@@ -186,8 +189,9 @@ different amounts to produce:
|
||||
|
||||
```
|
||||
index.json cheap: tags and structure. Rebuilt freely.
|
||||
covers/<album_id>.jpg medium: art extracted from an ID3 APIC frame
|
||||
analysis/<track_key>.json expensive: reserved for offline audio analysis
|
||||
covers/<album_id>.jpg medium: the album's art, downscaled to 384 px
|
||||
covers/<album_id>.thumb.jpg medium: the same at 256 px, for cards and rows
|
||||
analysis/<track_key>.json expensive: track analysis (plus .beats.json, .curve.json)
|
||||
```
|
||||
|
||||
Deleting the whole directory is safe; deleting it throws away analysis that is minutes
|
||||
@@ -199,13 +203,16 @@ change to how the scanner derives a title, artist or series is invisible until t
|
||||
is invalidated: bump `_INDEX_VERSION` in `musicmouse/library/cache.py` when you touch
|
||||
that logic.
|
||||
|
||||
**Track analysis is not implemented.** `musicmouse/library/analysis.py` fixes the shape
|
||||
of the results - scalars (`tempo`, `energy`, `valence`, `brightness`) travel inline with
|
||||
the index, and a beat grid lives in its own file and is fetched per track - so an
|
||||
analyzer can be added later without touching the scanner, the API or the frontend. It
|
||||
will go behind an optional dependency group, and because results are content-keyed
|
||||
files, they can equally well be computed on a workstation and the `analysis/` folder
|
||||
copied to the device.
|
||||
**Track analysis** drives the web front-end's ambient background. It is optional: install
|
||||
the `analysis` extra (`pip install -e '.[analysis]'`, librosa and numpy) and
|
||||
`musicmouse/library/librosa_analyzer.py` works through the music shelf in the
|
||||
background, in a pool of niced worker processes (`musicmouse/library/workers.py`), and
|
||||
pauses while anything is playing. Without the extra, `build_analyzer()` returns a no-op
|
||||
and the background stays static. Scalars (`tempo`, `energy`, `valence`, `brightness`,
|
||||
`pulse`) travel inline with the index; the beat grid and per-second curves live in their
|
||||
own files and are fetched only for the playing track. Results are content-keyed, so they
|
||||
can be computed on a workstation and the `analysis/` folder copied to the device
|
||||
(`scripts/sync-library.sh` does that).
|
||||
|
||||
## The web front-end
|
||||
|
||||
@@ -226,6 +233,9 @@ copied to the device.
|
||||
| `POST /api/screen/toggle` `/screen/activity` | the kiosk's Del key; its key presses and taps, holding off the idle screen-off |
|
||||
| `GET` `PUT /api/settings` | parent mode |
|
||||
| `POST` `DELETE /api/timer` | parent mode's countdown: `{minutes}` or `{until: "HH:MM"}`; stop or silence it |
|
||||
| `GET /api/tracks/{album_id}/{index}/analysis` | beat grid and mood curves of one track, or 404 |
|
||||
| `GET /api/ha`, `GET /api/ha/states/{entity}`, `POST /api/ha/services/{domain}/{service}` | the room page's Home Assistant proxy; 404 without an `ha` section |
|
||||
| `GET /api/tippen/curriculum` `/progress`, `PUT /api/tippen/settings`, `POST /api/tippen/runs` | the typing game; 404 without a `tippen` section |
|
||||
|
||||
Two decisions worth knowing:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user