1.0.1 • Published 2 years ago

@digital-piranesi/iiif-manifest-generator v1.0.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
2 years ago

IIIF Manifest Library

Master Branch

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.

Documentation

Building

Installing Dependencies

NodeJS and NPM must be installed on the system in order to use the package manager and automated dependency management.

npm install

Usage & Targets

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.

NodeJS

TODO

Web

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.

Usage

NodeJS

TODO

Web

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.

Example

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