Pull explanations from 50ohm.de when available
This commit is contained in:
+17
-7
@@ -27,7 +27,8 @@ entry is purely additive — no regenerate ceremony beyond
|
||||
|
||||
### Per-entry schema
|
||||
|
||||
Every entry MUST have exactly these four fields:
|
||||
Every entry MUST have these four required fields, and MAY carry the one
|
||||
optional field below:
|
||||
|
||||
| Field | Type | Constraint |
|
||||
|---------------|---------|--------------------------------------------|
|
||||
@@ -35,13 +36,22 @@ Every entry MUST have exactly these four fields:
|
||||
| `explanation` | string | Non-empty. **English.** Correct & helpful, WHY-focused |
|
||||
| `source` | string | Non-empty. URL or citation like `AFuV §16(2)` |
|
||||
| `confidence` | integer | `1..10` inclusive. See scale in §5 |
|
||||
| `provenance` | string | *Optional.* Only allowed value: `"50ohm-loesungsweg"` |
|
||||
|
||||
Extra keys are rejected by `load_explanations()` — the build fails
|
||||
with `unknown fields [...]` listing them. The loader is similarly
|
||||
strict about types: a JSON `true` will not satisfy the integer
|
||||
contract for `revision` or `confidence`. If you need to track
|
||||
editorial metadata that isn't shown on the card, propose a schema
|
||||
change rather than smuggling fields in.
|
||||
`provenance` records **how the text was produced**, which `source` (a
|
||||
citation) does not. Set it to `"50ohm-loesungsweg"` only on entries
|
||||
that are genuinely a translation/condensation of a 50ohm.de worked
|
||||
solution (`contents/solutions/<ID>.md` in `DARC-e-V/50ohm-contents-dl`).
|
||||
The build uses it — and *not* the `source` domain — to decide whether
|
||||
to show the CC BY 4.0 derivative-work credit on the card (CC BY
|
||||
requires naming the author team and indicating modification). Do **not**
|
||||
add it just because an entry cites a 50ohm.de study page; merely citing
|
||||
a page is not a derivative work. Any other value, or any other extra
|
||||
field, is rejected by `load_explanations()` with
|
||||
`unknown fields [...]` / `provenance must be one of [...]`. The loader
|
||||
is also strict about types: a JSON `true` will not satisfy the integer
|
||||
contract for `revision` or `confidence`. To track other editorial
|
||||
metadata, propose a schema change rather than smuggling fields in.
|
||||
|
||||
Top-level keys (the question numbers) must also match the catalog
|
||||
exactly. An entry keyed on a number that no live question carries
|
||||
|
||||
Reference in New Issue
Block a user