sites: the instance writes its own site handlers as JSON files under sites/, the stack's learn.microsoft.com handlers become data files in the same format (#210); 10.0.0-beta.4
CI / verify (push) Successful in 8m26s
CI / pwsh (push) Successful in 2m35s
Release / release (push) Successful in 35s
Release / wiki-mirror (push) Skipped

Files changed:
- .gitignore
- AGENTS.md
- CHANGES.md
- VERSION
- docs/explanation/architecture.md
- docs/how-to/README.md
- docs/how-to/write-a-site-handler.md
- docs/reference/commands/instance-health.md
- docs/reference/commands/raw-material-and-uploads.md
- docs/reference/configuration.md
- instructions/dev/doc-pull-through.md
- raw/CONTRACT.md
- sites/CONTRACT.md
- tools/CONTRACT.md
- tools/README.md
- tools/chemenu/commands/dist_cmd.py
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/commands/doctor.py
- tools/chemenu/commands/git_publish.py
- tools/chemenu/commands/raw/fetch.py
- tools/chemenu/ownership.py
- tools/chemenu/sites/__init__.py
- tools/chemenu/sites/data.py
- tools/chemenu/sites/handlers/learn-microsoft-powershell-module.json
- tools/chemenu/sites/handlers/learn-microsoft.json
- tools/chemenu/sites/learn_microsoft.py
- tools/chemenu/sites/site.schema.json
- tools/chemenu/tests/test_dist_cmd.py
- tools/chemenu/tests/test_doctor.py
- tools/chemenu/tests/test_site_files.py
- tools/chemenu/toc.py

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
torbenandClaude Code committed 2026-10-11 15:17:17 +02:00
1 parent 2213d68900
commit 0f39cfdb49
31 files changed
+916 -124

No files matched your search

+9 -5
View File
@@ -248,8 +248,9 @@ not claim.
website often exists under many URLs - in every language, with tracking parameters - and carries
page furniture the browser hides but the HTML contains: an action bar, a sign-in notice, a
feedback footer. Left in, it ends up in the derived text, and with it in every claim made from the
page. A *site handler* - code in the stack, one module per website under `tools/chemenu/sites/`,
chosen by host name and the longest matching path pattern - states what is known about that
page. A *site handler* - a JSON file per website, the stack's under `tools/chemenu/sites/handlers/`
and the instance's under `sites/`, chosen by host name and the longest matching path pattern -
states what is known about that
website: the standard form of its URLs, the page furniture to leave out of the derived text, and
hints about what the derivation cannot do for the reader. For `learn.microsoft.com` that is the
locale segment (`en-us`, so two people ingesting the German and the English page get the same
@@ -258,12 +259,15 @@ from, which is not fetched. A handler's hints are printed as `CHECK` lines, only
to the page; act on one before accepting the capture.
The standard form is what is fetched and what `url:` and the stem come from; the URL as typed is
kept in the header as `requested_url:`, and `site:` names the handler. The `.html` is still the
kept in the header as `requested_url:`, and `site:` names the handler (`<name> (instance)` for
one of the instance's own). The `.html` is still the
response body byte for byte - only the derived text is cleaned. `--html --url <url>` removes the
same furniture from a saved page but keeps the URL as typed, since no fetch happened. A URL no
handler claims behaves exactly as without handlers. The instance does not write handlers: its
handler claims behaves exactly as without handlers. The instance writes its own handlers as files
under `sites/` and may replace a stack handler for the same host and path; the format, the
resolution and what a broken file does are in [sites/CONTRACT.md](../sites/CONTRACT.md). Its
`sites` section in the settings ([docs/reference/configuration.md](../docs/reference/configuration.md))
switches one off, sets the locale, and adds hint lines of its own per host and path pattern,
switches a handler off, sets the locale, and adds hint lines of its own per host and path pattern,
printed as `CHECK` lines too - at most three per pattern.
Whether a capture is a whole article or only its teaser cannot be told mechanically - a teaser