feat(songs): optional album, categories list, sibling placeholder resolution
- `album` no longer required; category format changed to Category:Album:<name> - New optional `categories` list for additional arbitrary categories - `wiki.siblings` bill of materials: path+tag required for resolution, label optional - Post-Pandoc [[TAG]] substitution with four-tier fallback (link+label, link, plain label, plain tag) - Sibling map built from all published posts in the same run; unresolved siblings degrade gracefully - SCHEMA.md fully updated; README.md deferred items moved to implemented Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,17 +12,18 @@ Implemented:
|
||||
- YAML frontmatter parsing per [SCHEMA.md](SCHEMA.md)
|
||||
- Pandoc-based markdown → wikitext body rendering
|
||||
- First-line h1 stripping
|
||||
- Auto-generated banner (`{{Auto-generated|source=...|commit=<sha>}}`) + album category injection
|
||||
- Auto-generated banner (`{{Auto-generated|source=...|commit=<sha>}}`)
|
||||
- Album category injection (`[[Category:Album:<name>]]`); additional categories via `categories` list
|
||||
- LRC file upload (idempotent SHA1 check) + footer link
|
||||
- Inter-page sibling placeholder resolution (`[[TAG]]` → `[[wiki page title|label]]`)
|
||||
- MediaWiki bot API write with idempotency — no-op if wiki content matches generated output
|
||||
- Files without `wiki.publish: true` silently skipped
|
||||
- Pages with existing non-auto-generated content skipped (logged to stderr) — delete the page or add the banner to hand ownership to the bot
|
||||
|
||||
Deferred (schema reserves the fields; renderer doesn't yet act on them):
|
||||
Not in scope (intentional):
|
||||
|
||||
- LRC parsing and embedding
|
||||
- Inter-page sibling placeholder resolution
|
||||
- Multi-language metadata (the body conveys what languages exist; renderer doesn't introspect)
|
||||
- Auto-generated album index pages (intentionally NOT done — user writes album category-page descriptions freeform)
|
||||
- Auto-generated album index pages — user writes album category-page descriptions freeform
|
||||
|
||||
## Source repo and branch convention
|
||||
|
||||
@@ -79,7 +80,10 @@ The pipeline always runs `--all`: every file with `wiki.publish: true` (not unde
|
||||
| Body rendering | Pandoc-based, with a thin Python pre/post-processor | 2026-06-09 |
|
||||
| Excluded paths | `wip/**`, plus repo-meta files | 2026-06-09 |
|
||||
| Page template | Designed from scratch (no existing wiki pages to mirror) | 2026-06-09 |
|
||||
| Album landing pages | Auto-injected `[[Category:<album>]]`; the wiki category page is user-written and not overwritten | 2026-06-09 |
|
||||
| Album categories | Auto-injected `[[Category:Album:<name>]]`; category page is user-written and not overwritten | 2026-06-09 |
|
||||
| Additional categories | Optional `categories` list in frontmatter; each entry → `[[Category:<value>]]` | 2026-06-10 |
|
||||
| `album` optional | Companion/sibling pages don't need an album; omitting the field emits no album category | 2026-06-10 |
|
||||
| Sibling resolution | Parent declares siblings as a bill of materials (`path` + `tag` + optional `label`); `[[TAG]]` substituted post-Pandoc | 2026-06-10 |
|
||||
| Source-repo branch convention | `autowiki/<song-slug>` short-lived branches in `ncmr-songs` | 2026-06-09 |
|
||||
| Idempotency | Commit SHA in banner (`commit=<sha>`), not timestamp — stable across identical re-runs | 2026-06-09 |
|
||||
| Publish mode | Always `--all`; no diff detection — small repo, simpler than fragile git-diff gating | 2026-06-09 |
|
||||
|
||||
Reference in New Issue
Block a user