Skip to content

Conversation

@PouyaMohseni
Copy link
Contributor

@PouyaMohseni PouyaMohseni commented Dec 17, 2025

  • Fetch all images from Wikidata and save in wikidata_images.csv.
  • Preserve primary images as thumbnails and originals; add additional images with _i suffix.
  • Ensure unique image URLs per instrument class.
  • Support .svg images via cairosvg.
  • Improve instrument detail page to show extra images.

resolves #464, ref: #424

test

- In `import_instruments.py`, query Wikidata via SPARQL to retrieve all image statements
  for each instrument in `umil_instruments`
- Record results in `wikidata_images.csv` as `instrument,image`, allowing multiple
  rows per instrument
- Continue recording the primary Wikidata image as both the thumbnail and original image
- Preserve the existing image indexing scheme; newly added images are suffixed with `_{i}`,
  starting from 1
- Download additional images using the existing logic in `import_instrument.py`
- rank results based on `wikibase:PreferredRank`, having the Wikidata prefered image in the thumbnail
@PouyaMohseni PouyaMohseni changed the title Image wikidata feat: fetch and display all Wikidata images for instruments Dec 17, 2025
@PouyaMohseni PouyaMohseni marked this pull request as ready for review December 17, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some images are not successfully downloaded.

2 participants