feat: import existing publications from XML (story #05)

scripts/import_publications.py imports all osw=1 publications from
03-data/osws.xml — upserts pub rows, loads cover images, scans
03-data/osdb/{pubId}/ for fruit images and PDFs, links matched fruits
by osdb_number. Idempotent re-runs. 17 unit tests. Makefile updated
to include import_publications_test in make test. Added
scripts/README_import.md with run order. Added spec-first rule to
.claude/CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-18 11:47:45 +02:00
co-authored by Claude Sonnet 4.6
parent dfa3d91ab9
commit e8d48d4fcb
6 changed files with 501 additions and 2 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ run-frontend:
test:
cd backend && go test ./...
cd frontend && npm run test -- --run
cd scripts && python3 -m unittest import_fruits_test -v
cd scripts && python3 -m unittest import_fruits_test import_publications_test -v
## fmt: format all code
fmt: