@archival-iiif/presentation-migrator
v1.0.1
Published
Migrates manifests to other IIIF versions.
Downloads
2
Readme
Supported migration
- Presentation API 3.0 -> Presentation API 2.1 (not feature complete)
Installation
presentation-builder is available as an npm package.
// with npm
npm -i @archival-iiif/presentation-migrator
// with yarn
yarn add @archival-iiif/presentation-migrator
Usage
Code
import {Manifest, Collection} from "@archival-iiif/presentation-builder";
import {migrateManifestV3ToV2, migrateCollectionV3ToV2, igrateManifestOrCollectionV3ToV2} from "@archival-iiif/presentation-migrator";
const manifestV3 = new Manifest('https://example.org/iiif/book1/manifest', 'Book 1');
let manifestV2 = migrateManifestV3ToV2(m);
// same result:
manifestV2 = migrateManifestOrCollectionV3ToV2(m);
const collectionV3 = new Collection(
'https://example.org/iiif/collection/top',
{ "en": [ "Collection for Example Organization" ] }
);
const collectionV2 = migrateCollectionV3ToV2(c);
License
This software is released under the MIT license.