The library was created to address the problem of translating from Scalar's RDF JSON-LD format for use in IIIF Presentation API-compliant viewers such as Mirador and Seadragon.
This software aims to be an easy-to-use library and command line tool that can be used in both web applications and as a utility.
Released under the Apache License found in LICENSE
NodeJS and NPM must be installed on the system in order to use the package manager and automated dependency management.
npm install
When building the manifest generator, there are various ways to build it. This includes building a web-compatible JavaScript library, a NodeJS package, and a command-line utility. By building the project with various flags, you can target those environments and exclude all other source that is unnecessary.
To build the library as a web-compatible JavaScript library, use the following commands.
$ npm install # Installs dependencies for building the project
$ gulp clean # Cleans the build environment and removes previously built code.
$ gulp target-web # Builds the project with the web library as the target.
The output in the dist
folder can then be included into any Web project. The
file I3F.build.js
can be included into any HTML file.
The build
folder will contain the NodeJS package, with index.js
containing
the export. Include require('path/index.js').default
to include the project.
Install the library into your project by running:
$ npm install @digital-piranesi/iiif-manifest-library
Then, include the library in any NodeJS script as:
const I3 = require('@digital-piranesi/iiif-manifest-library').default;
After building the project, it can be included into an HTML file and used by accessing the I3F
object. This is exported by webpack
as the container object for the library.
All available I3F library classes, methods, constants, and functions documented are available through this object.
<script src="./I3F.build.js"></script>
<script>
// The I3F object contains the library in its scope.
var label = new I3F.Label("en", "Hello, world!");
</script>