Skip to main content

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/" 

Metadata

Release files for iiif-downgrade 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iiif-downgrade 0.1.3
File Size Uploaded
iiif_downgrade-0.1.3.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iiif-downgrade 0.1.3
File Interpreter ABI Platform
iiif_downgrade-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / iiif_downgrade-0.1.3.tar.gz

Download URL iiif_downgrade-0.1.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c26776f1baad94214ad42b4eda3813427d22515c07f853bcb93240c06c9c6a51
BLAKE2b-256 checksum
How to use checksums
b2da1f6f56a36f095c08ba9a2d3a44257f6fb26ed377b8500d87d05df431cd7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.12 Darwin/23.6.0

Release files / iiif_downgrade-0.1.3-py3-none-any.whl

Download URL iiif_downgrade-0.1.3-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38d1a0566727aed0820fa03557837d47ed19fb9cf8f04e528e7d483f972aa0b7
BLAKE2b-256 checksum
How to use checksums
682b2205fe6fdb906a72667b34afa243fb9d9e74abed4c395d2f8b7d47002e46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.12 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page