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>
27 lines
1.0 KiB
Markdown
27 lines
1.0 KiB
Markdown
# OSDB — Obstsortendatenbank
|
|
|
|
A full-stack fruit-variety database (Go + Vue 3).
|
|
|
|
## Features
|
|
|
|
- Users can view a "Hello, OSDB!" landing page that confirms the backend is reachable via the Vite proxy.
|
|
- Users can create, view, edit, and delete fruit varieties, including managing synonyms and uploading images.
|
|
- Administrators can bulk-import the legacy fruit database from XML using `scripts/import_fruits.py`, and then import all publications (cover images, linked fruits, PDFs, fruit images) using `scripts/import_publications.py`.
|
|
- Users can manage publications (books, catalogues) with cover images, linked fruits, per-fruit PDF descriptions, and fruit images; fruit detail pages show publication descriptions and images.
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
cp .env.example .env # set credentials
|
|
make dev-db # start Postgres (waits until healthy)
|
|
make migrate-up # apply schema migrations
|
|
make run-backend # Echo API on :3000
|
|
make run-frontend # Vite dev server on :5000
|
|
```
|
|
|
|
## Testing
|
|
|
|
```bash
|
|
make test
|
|
```
|