Skip to main content

No project description provided

Project description

IIIF Downgrade

A basic library for converting IIIF v3 manifests to v2.

Why on earth would one do such a thing?

Certain applications (Spotlight until very recently) expect a v2 manifest. This lets someone easily take a v3 manifest from elsewhere and convert it to v2.

Warnings and Other Notes

This only handles the simplest of use cases like images or compound works of images. IIIF Presentation v2 has a much more limited set of applications than v3. This will likely create v2 manifests that are often invalid if you give it things it can't handle.

How to Use

As a library:

from iiif_downgrade import IIIFv3toV2Converter
import json

with open("fixtures/0e9016f7-f9dd-413f-b671-f75d181cbb5e.json") as f:
    data = json.load(f)

converter = IIIFv3toV2Converter(
    manifest=data,
    manifest_id="https://example.org/manifest/v2/123.json"
)

converter.convert()
converter.save("manifest-v2.json")

As a command line utility:

iiif_downgrade convert_directory -i fixtures

You can also find and replace ids and write to a specific directory:

iiif_downgrade convert_directory -i fixtures -o output --id_find "/manifest/" --id_replace "/v2_manifest/" 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iiif_downgrade-0.1.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iiif_downgrade-0.1.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file iiif_downgrade-0.1.3.tar.gz.

File metadata

  • Download URL: iiif_downgrade-0.1.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.12 Darwin/23.6.0

File hashes

Hashes for iiif_downgrade-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c26776f1baad94214ad42b4eda3813427d22515c07f853bcb93240c06c9c6a51
MD5 7f17cb736210e9702d498f06cb4e7316
BLAKE2b-256 b2da1f6f56a36f095c08ba9a2d3a44257f6fb26ed377b8500d87d05df431cd7a

See more details on using hashes here.

File details

Details for the file iiif_downgrade-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: iiif_downgrade-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.12 Darwin/23.6.0

File hashes

Hashes for iiif_downgrade-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 38d1a0566727aed0820fa03557837d47ed19fb9cf8f04e528e7d483f972aa0b7
MD5 5bcbebbb935da36507e4625dd0a24679
BLAKE2b-256 682b2205fe6fdb906a72667b34afa243fb9d9e74abed4c395d2f8b7d47002e46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page