Disambiguator for various different identifier types used in University of Edinburgh Digital Libraries systems
Mike's original ERIC has been expanded to take into account
- LUNA URLs
- Archipelago Digital Objects
- Archipelago Cantloupe URLs
- IIIF Manifests
- ARKs
A massive thank you is due to him for getting us going.
Project layout:
app.pyis the Flask web app.scripts/contains operational/admin scripts.data/input/contains source input files such astinyurls.csv.data/output/contains generated CSV exports.data/logs/anddata/db/hold local runtime artifacts.docs/andarchive/keep notes and old snapshots out of the app root.
Useful commands:
python3 scripts/init_db.pycreates the current schema and seed rows.python3 scripts/repair_ark_url_construct.pypreviews the one-off repair for the ARK link template; add--applyto update the existing database row.python3 scripts/get_data.py --resumecrawlsdams-live2oldest-first and resumes from the last completed source page usingdata/output/get_data_checkpoint.json.python3 scripts/get_data.py --clear-csvs --resumeclears the generated export CSVs but keeps the crawl checkpoint, so the next batch starts where the previous crawl left off.python3 scripts/get_data.py --freshclears the generated export CSVs and checkpoint before starting a new crawl from the beginning.python3 scripts/ingest_csv.pyis safe to rerun; it reuses existing objects and only fills in missing identifiers, dimensions, and ARKs.python3 scripts/sync_archipelago_images.py --dry-runsweeps Archipelago directly and previews image reconciliation without committing.python3 scripts/sync_archipelago_images.py --max-pages 1 --dry-runis the quickest way to time one page of image-sync work.python3 scripts/sync_archipelago_images.py --resumecontinues an interrupted full sync fromdata/output/image_sync_checkpoint.json.python3 scripts/sync_archipelago_images.py --from-snapshot --dry-runpreviews reconciliation of only live Archipelago image UUIDs absent from ERIC. It requires a completedimagessnapshot and is the intended incremental cron mode.python3 scripts/sync_archipelago_images.py --repair-missing-cantaloupe-from-snapshot --dry-runpreviews Cantaloupe-ID repair only for live ERIC images which do not yet have one.python3 scripts/snapshot_archipelago_uuids.py imagescreates a resumable, file-backed snapshot of the live image UUIDs. Use--resumeafter an interrupted run; a completed snapshot must be deliberately replaced with--fresh.python3 scripts/prune_archipelago_snapshot.py imagespreviews image objects whose Archipelago UUID is absent from a completed snapshot. Add--applyonly after reviewing the report. The equivalentcollectionscommands handle Compound Objects.python3 scripts/ingest_luna_routes.pyloads the MariaDB TinyURL export atdata/tinyurls.txtintoluna_route. It is safe to re-run: existing tokens are updated only when their stored route changes. Use--dry-runto verify the source first, or passdata/output/recent_item_tinyurls.csvto import the generated CSV workflow instead.