# KBL / Royal Danish Library open-image harvesting This folder contains scripts for harvesting open-license image material from the Royal Danish Library COP/Digital Collections API for Danish CLIP training. Included by default: - `Billeder` - `Kort og Atlas`, kept separable with `source_subset=maps` Excluded before scraping: - aerial photographs / `Danmark set fra luften` - `Danske aviser 1666-1883` - text-heavy COP editions: books, letters, manuscripts, pamphlets, printed matter and catalogues The scraper over-collects records using license keywords, then filters by actual MODS `accessCondition` rights text. KBL commonly expresses public-domain/no-known-rights material as `Materialet er fri af ophavsret`. ## Commands ```powershell cd "c:\Users\V4lde\Downloads\DanishCLIP\new datasets\kbl" python scrape_kbl_cop_metadata.py --out-dir data/kbl_open_metadata $env:HF_TOKEN = "" python create_dataset_card.py --repo-id "/kbl-open-images" --metadata-summary data/kbl_open_metadata/summary.json --out data/README.md --upload python upload_kbl_metadata.py --repo-id "/kbl-open-images" --metadata-dir data/kbl_open_metadata python build_upload_kbl_images.py --repo-id "/kbl-open-images" --metadata-jsonl data/kbl_open_metadata/kbl_open_metadata.jsonl --work-dir data/kbl_image_work --upload --skip-existing --records-per-shard 500 --download-workers 12 ``` Do not commit or paste the Hugging Face token into any file.