Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yale-web-technologies/IIIF-Manifest-Generator
PHP library to generate Manifest files
https://github.com/yale-web-technologies/IIIF-Manifest-Generator
Last synced: about 1 month ago
JSON representation
PHP library to generate Manifest files
- Host: GitHub
- URL: https://github.com/yale-web-technologies/IIIF-Manifest-Generator
- Owner: yale-web-technologies
- License: gpl-3.0
- Created: 2016-09-22T15:46:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T13:47:25.000Z (10 months ago)
- Last Synced: 2024-08-04T04:07:12.118Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 1.06 MB
- Stars: 18
- Watchers: 8
- Forks: 12
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-iiif - IIIF Manifest Generator - PHP library for generating IIIF manifests. (Presentation API Libraries / Image viewers (Image API only))
README
# IIIF Manifest Generator #
This is a IIIF Manifest Generator written in PHP. It implements the [IIIF API Specification](http://iiif.io/api). Currently this only supports the [Presentation API](http://iiif.io/api/presentation/2.1/).
### Installation ###
composer require yale-web-technologies/iiif-manifest-generator### Usage ###
Resources are mapped to class types. Methods are available to add objects embedded within a resource. Passing true to the constructor of a resource will make it a top level resource within the JSON.
```PHP
setID("http://example.org/iiif/book1/manifest");
$manifest->addLabel("Book 1");
$thumbnail = new Thumbnail();
$manifest->addThumbnail($thumbnail);
$thumbnail->setID("http://example.org/images/book1-page1/full/80,100/0/default.jpg");
$service_thumbnail = new Service();
$thumbnail->setService($service_thumbnail);
$service_thumbnail->setContext("http://iiif.io/api/image/2/context.json");
$service_thumbnail->setID("http://example.org/images/book1-page1");
$service_thumbnail->setProfile("http://iiif.io/api/image/2/level1.json");
$sequence = new Sequence();
$manifest->addSequence($sequence);
$sequence->setID("http://example.org/iiif/book1/sequence/normal");
$sequence->addLabel("Current Page Order");$canvas = new Canvas();
$sequence->addCanvas($canvas);
$canvas->setID("http://example.org/iiif/book1/canvas/p1");
$canvas->addLabel("p. 1");
$canvas->setWidth(500);
$canvas->setHeight(500);
```
See the docs folder for implementation specifications.### TODO ###
- Implement Image API
- Unit tests for Utils