Manual:Building this wiki
This manual is a static, MediaWiki-styled website built straight from the project's Git repository by wiki/build.py. Every page exists in two languages — Estonian (et) and English (en) — and the chapter tree, page titles, search indexes and revision histories are all generated at build time with no server database.

Layout and files¶
All wiki sources live under wiki/.
| Path | Role |
|---|---|
wiki/manual.json |
Site metadata (name, tagline, namespace, languages, url: https://hydrofonwiki.volli.page) and the chapter tree (chapters: groups, page slugs and et/en titles). |
wiki/pages/et/*.md, wiki/pages/en/*.md |
Markdown source files for every page, plus two special pages outside the chapter tree: main.md (main page) and start.md (the whole manual outline). |
wiki/STYLE.md |
Writing guide covering voice, verifying facts against code, UI label conventions, links, admonitions and images. |
wiki/static/ |
Stylesheet (wiki.css), client-side script (wiki.js: hamburger menu, browser appearance settings in localStorage under hw-prefs, TOC collapse, client-side search over /<lang>/search.json and Special:Random) and screenshots under wiki/static/img/<lang>/. |
wiki/build.py |
Static site generator (python -m wiki.build). |
wiki/screens.py |
Automated offscreen screenshot script (python -m wiki.screens). |
Wiki syntax on top of Markdown¶
wiki/build.py runs Python-Markdown with tables, fenced_code, codehilite (Pygments syntax highlighting in light default and dark monokai themes), toc, admonition, attr_list, def_list, footnotes, sane_lists and md_in_html, plus three wiki-specific conventions.
- Page title. A leading
# Titleline is stripped; the displayed heading always comes fromwiki/manual.json. Any page with 3 or more##/###headings automatically gets a collapsible contents box (exceptmain). - Internal links.
<a href="/en/slug/" class="new" title="slug (page does not exist)">slug</a>,<a href="/en/slug/" class="new" title="slug (page does not exist)">link text</a>or<a href="/en/slug/" class="new" title="slug (page does not exist)">text</a>renders as/<lang>/<slug>/. Links to unknown slugs or not-yet-written pages receiveclass="new"(red links). - Admonitions.
!!! note,!!! tip,!!! warningand!!! dangerblocks (optional quoted title, 4-space indented body) render as styled callout boxes. - Thumbnails. A paragraph containing only an image (
) becomes a captioned<figure class="thumb tnone">; adding{: .right}after it floats the figure on the right (thumb tright).
Building the site (wiki.build)¶
Building writes to wiki/dist/ by default, replacing any previous build at that path. Each page gets clean directory URLs (/<lang>/<slug>/index.html, plus talk/, source/ and history/ tabs), along with /<lang>/special/all-pages/, search/ and random/, a per-language /<lang>/search.json index, app/icon.png copied to /static/icon.png, a browser-language root redirect index.html, and 404.html.
.\.venv\Scripts\python.exe -m wiki.build
.\.venv\Scripts\python.exe -m wiki.build --out C:\temp\hydrofon-wiki
Extra packages for building the wiki
wiki/build.py imports markdown and pygments. Both are installed in the development .venv for wiki builds, outside the desktop app's requirements.txt.
Automated screenshots (wiki.screens)¶
Screenshots are generated reproducibly rather than taken by hand: wiki/screens.py launches the real MainWindow offscreen (QT_QPA_PLATFORM=offscreen, QT_QPA_FONTDIR=C:/Windows/Fonts, TF_CPP_MIN_LOG_LEVEL=2) at 1400 × 860 pixels.
It builds a temporary folder at ~/Documents/Hydrofon demo/data, copies wolfset-bands-v1 and wolfset-yamnet-v1, and creates a Windows NTFS junction (mklink /J) to data/wolfset/ so the real data/ directory and settings.json are never modified. It then plays data/wolfset/A00020T16N00.wav live, records and marks it (live.png), fills notes and saves (review.png), runs Clip analysis with all models (analysis.png), detaches Clip analysis into its own window (detached.png), opens Training (training.png) and Settings (settings.png), writes all six PNGs to wiki/static/img/<lang>/, and deletes the temporary demo folder.
.\.venv\Scripts\python.exe -m wiki.screens
.\.venv\Scripts\python.exe -m wiki.screens en
Revision history from Git¶
Every page's View history tab (/<lang>/<slug>/history/) and footer last-edited date come directly from Git. At build time wiki/build.py locates a runnable git on PATH and queries git log --follow and git cat-file -s for each page's .md file to list commit hashes, dates, authors, file sizes, byte deltas and commit messages. Uncommitted pages (or builds without Git) show as not yet saved.
Deploying to Cloudflare¶
The built static output in wiki/dist is deployed as static assets to https://hydrofonwiki.volli.page using Cloudflare Wrangler (wiki/wrangler.jsonc). Rebuild the site, then deploy:
.\.venv\Scripts\python.exe -m wiki.build
npx wrangler deploy
Deployment configuration
wiki/wrangler.jsonc holds the Cloudflare static-assets configuration pointing at wiki/dist and is used alongside Wrangler in the deployment environment.
See also¶
- Command-line tools — reference for every CLI module in the project
- Manual start — full manual table of contents
- Architecture — module layout of the desktop application