Commit Graph

10 Commits

Author SHA1 Message Date
mikkeli 65aa617935 fix(songs): skip pages with existing non-auto-generated content
If a wiki page exists but was written manually (no Auto-generated
banner), the bot now skips it instead of attempting an overwrite
that triggers MediaWiki CAPTCHA. Clear stderr warning tells user
to delete the page or add the banner to hand ownership to the bot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 18:23:14 +09:00
mikkeli 3895cb5c25 fix(songs): skip files without wiki.publish:true before validation
Files with no frontmatter or wiki.publish not set should be silently
ignored rather than failing the whole pipeline run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 18:13:55 +09:00
mikkeli d49b2f0bca Merge pull request 'automation/songs' (#1) from automation/songs into main
Just get it done
2026-06-09 09:03:35 +00:00
mikkeli df7195511f render: replace generated_at timestamp with commit SHA in banner
Timestamps made the idempotency check always false — every run would
rewrite every page. Commit SHA is stable: same source commit produces
identical wikitext, so unchanged pages are correctly skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 18:01:46 +09:00
mikkeli 58507edfd5 workflows: replace github.server_url with vars.URL_TO_GITEA
Gitea blocks vars/secrets prefixed with GITEA_ or GITHUB_.
Also avoids relying on github.server_url which resolves to
github.com rather than the local Gitea instance on this runner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 17:48:32 +09:00
mikkeli 7f1bf2f995 Implement songs pipeline v1
- render.py: frontmatter validation, h1 strip, pandoc conversion,
  banner/category injection, idempotent MediaWiki writes via mwclient
- requirements.txt: python-frontmatter, mwclient, PyYAML
- template_auto_generated.wikitext: paste into wiki as Template:Auto-generated
- .gitea/workflows/publish-songs.yml: reusable workflow; job container
  python:3.12-slim installs pandoc via apt (no host-level pandoc needed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 16:40:05 +09:00
wan 6d51a3dd2b docs: split root README cross-cutting; expand songs pipeline README 2026-06-09 11:22:41 +09:00
wan 6f451f616a Added gitignore. Ignoring Claude local settings 2026-06-09 11:18:49 +09:00
wan f573460c41 songs: schema doc and v1 scope readme 2026-06-09 10:51:47 +09:00
mikkeli 375eb7af1f Initial commit 2026-06-09 00:03:55 +00:00