Skip to content

buda-base/buda-thumbnail-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 14, 2025
5196919 · Feb 14, 2025
Apr 12, 2020
May 11, 2020
Mar 29, 2020
Aug 23, 2024
May 11, 2020
Oct 21, 2022
Feb 14, 2025
May 10, 2020
May 11, 2020
May 30, 2022
Jan 11, 2024
Dec 7, 2021

Repository files navigation

Thumbnail generator for BUDA

Dependencies

$ sudo apt install -y liblcms2-dev liblcms2-2 libtiff5 libtiff5-dev python3-libtiff
$ pip3 install --no-cache-dir -I pillow
$ pip3 install -r requirements.txt

Running

To update the database:

curl 'https://ldspdi.bdrc.io/query/table/AO_mustbeonmirror?format=csv&pageSize=50000' | tail -n +2 | sed -re 's/^"bdr:(.*)"$/\1/g' | sort > ricmodelist.txt
python3 thumbnailgen.py path_to_iinstance_repo

with the third argument properly set. Then to derive and upload the RDF:

python3 derivemodel.py iiif_prefix
curl -v -X PUT -H 'Content-Type:text/turtle' --url 'http://buda5.bdrc.io:13180/fuseki/corerw?graph=http%3A%2F%2Fpurl.bdrc.io%2Fgraph%2Fthumbnails' -T thumbnails.ttl

where iiif_prefix is the start of the iiifserv url, defaulting to https://iiif.bdrc.io/.

Configuration

The script supposes that it can access AWS credentials with the name thumbgen, and that they allow:

  • read the archive.tbrc.org bucket

It also supposes that a thumbnailgen AWS user is configured on the machine and has credentials accessible to the script.

About

Thumbnail generator for BUDA

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages