New script scripts/import_publications.py: imports all osw=1 publications from 03-data/osws.xml — upserts pub rows, cover images, fruit links, PDFs, and fruit images
Filesystem scan of 03-data/osdb/{pubId}/ for {osdb_number}_{pubId}_s0.jpg and {osdb_number}_{pubId}.pdf; fruits resolved by osdb_number lookup
Idempotent: deletes and re-inserts linked data on re-run
17 unit tests; make test updated to include new test module
scripts/README_import.md documents run order (fruits first, then publications)
.claude/CLAUDE.md updated: read spec before implementing a story
Test plan
make test passes (60 tests total)
DATABASE_URL=... python3 scripts/import_publications.py runs to completion after import_fruits.py
Re-run is idempotent (row counts unchanged)
GET /api/v1/publications returns populated list after import
## Summary
- New script `scripts/import_publications.py`: imports all `osw=1` publications from `03-data/osws.xml` — upserts pub rows, cover images, fruit links, PDFs, and fruit images
- Filesystem scan of `03-data/osdb/{pubId}/` for `{osdb_number}_{pubId}_s0.jpg` and `{osdb_number}_{pubId}.pdf`; fruits resolved by `osdb_number` lookup
- Idempotent: deletes and re-inserts linked data on re-run
- 17 unit tests; `make test` updated to include new test module
- `scripts/README_import.md` documents run order (fruits first, then publications)
- `.claude/CLAUDE.md` updated: read spec before implementing a story
## Test plan
- [ ] `make test` passes (60 tests total)
- [ ] `DATABASE_URL=... python3 scripts/import_publications.py` runs to completion after `import_fruits.py`
- [ ] Re-run is idempotent (row counts unchanged)
- [ ] `GET /api/v1/publications` returns populated list after import
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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>
julia
merged commit 50bfa30b06 into main2026-06-18 10:20:02 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
scripts/import_publications.py: imports allosw=1publications from03-data/osws.xml— upserts pub rows, cover images, fruit links, PDFs, and fruit images03-data/osdb/{pubId}/for{osdb_number}_{pubId}_s0.jpgand{osdb_number}_{pubId}.pdf; fruits resolved byosdb_numberlookupmake testupdated to include new test modulescripts/README_import.mddocuments run order (fruits first, then publications).claude/CLAUDE.mdupdated: read spec before implementing a storyTest plan
make testpasses (60 tests total)DATABASE_URL=... python3 scripts/import_publications.pyruns to completion afterimport_fruits.pyGET /api/v1/publicationsreturns populated list after import🤖 Generated with Claude Code
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>