iiif-commons / biiif Goto Github PK
View Code? Open in Web Editor NEWOrganise your files according to a simple naming convention to generate IIIF Presentation API json using nodejs (Dat and IPFS compatible)
License: MIT License
Organise your files according to a simple naming convention to generate IIIF Presentation API json using nodejs (Dat and IPFS compatible)
License: MIT License
"label": {
"@none": [
"my label"
]
}
becomes
"label": {
"none": [
"my label"
]
}
Following the biiif-template I found two issues regarding thumbnails:
Root collection has /collection/
on its thumbnail path, but the image is actually at the root level:
Canvas thumbnail has the canvas path before the manifest path:
For debugging purposes, please check this manifest: https://iiif.tiju.ca/
Possible using just node? https://github.com/oliver-moran/jimp
An info.json with a level 0 image service would need to be generated in the _canvas folder and referenced in the index.json.
Would it be possible to get git tags for each release which correspond to the npm release?
Need to be able to ignore certain files within a canvas directory. For example, a jpg being used as a texture for a 3D model should not be annotated onto the canvas. Maybe use a .gitignore style file?
I see that most recent versions of biiif state support for IIIF Presentation API v3, but I noticed that older versions seemed to be more in line with IIIF Presentation API v2. Was biiif always made to work with API v3 or was this a conscious shift?
I noticed that this commit created a big divide between v2 and v3 in the biiif code: 6e55301
But I think the README already said it was supporting v3 at that point.
Looks like your initial commit was from November 2017 and v2.1.1 was released June 2017, but I don't know when v3 docs started being created.
Judging from UniversalViewer/universalviewer#470, it looks like v3 was already well under way in June 2017?
Currently has:
"id": "https://sophiedixon.github.io/3d-portfolio/collection/human_skull/index.json",
"type": "Manifest",
"items": [
{
"type": "Sequence",
"items": [
{
"id": "https://sophiedixon.github.io/3d-portfolio/collection/human_skull/index.json/canvas/0",
"type": "Canvas",
Should be:
"id": "https://sophiedixon.github.io/3d-portfolio/collection/human_skull/index.json",
"type": "Manifest",
"items": [
{
"id": "https://sophiedixon.github.io/3d-portfolio/collection/human_skull/index.json/canvas/0",
"type": "Canvas",
Hi great work!,please can I use this api in a serverless context to generate iiif from a remote folder and store my index.json in s3?, thanks.
suggestion: perhaps rather than providing just a destination directory, you can explore an optional callback function that has the JSON returned as payload, for other services to explore.
If an error is encountered, such as using @
in an info.yml value, return the error so that the UV electron app can display it.
Allow adding arbitrary structure grouping canvases (e.g. chapter 1, chapter 2, etc) by extending info.yml with a structures
property.
label: A Book with Chapters
structures:
- Chapter 1
- _page1
- _page2
- _page3
- Chapter 2
- _page3
- _page4
- _page5
Here "Chapter 1" will be the label for the parent range, and canvases are included by their folder name. The canvas range label is retrieved using the existing label logic for canvases.
structures: [
{
"id": ".../index.json/ranges/range0",
"type": "Range",
"label": {
"@none": [
"Chapter 1"
]
},
"items": [
{
"id": "...index.json/canvases/canvas0",
"label": {
"@none": [
"page 1"
]
},
"type": "Canvas"
},
{
"id": "...index.json/canvases/canvas1",
"label": {
"@none": [
"page 2"
]
},
"type": "Canvas"
},
{
"id": "...index.json/canvases/canvas2",
"label": {
"@none": [
"page 3"
]
},
"type": "Canvas"
}
]
}
]
Would mean allowing nested canvas folders.
Allow annotations with motivations other than painting
on canvases.
Look for yml files in canvas folders other than info.yml. Use the name of the yml file to determine the motivation, contents of the yml file to determine the body:
commenting.yml
type: TextualBody,
value: This is a comment on the image
Instead of using a biiifignore file (#20), use a painting.yml
file to control what gets annotated.
id: assets/model.gltf
model.gltf can go in _canvas/assets/
. biiif figures out the full path, type
, format
, and label
as before.
biiif myfolder -d
deletes all existing index.json
files.
e.g. indexingHint: "schema:author"
https://www.adamvowles.co.uk/blog/json-ld-local/
Should this be a separate lib to biiif? Perhaps presentation api and json-ld are plugins?
When there is a json schema for IIIF Presentation 3, generate a TS definition file from it using https://github.com/bcherny/json-schema-to-typescript and use that to type the various pieces of boilerplate json.
When someone wants to quickly test what a 3D file or image looks like in a viewer, they don't necessarily want to have to create a _myfile
canvas folder. It's more convenient to simply have a folder with a single file (or set of files) in it.
When encountering a folder with a set of paintable files in it, biiif could create canvas folders for each of them before continuing.
Are canvas folders always necessary? Perhaps when encountering a folder with just paintable files in it, biif treats that as a manifest folder and generates the canvas json, leaving them in place?
Put a thumb.*
in canvas folders to have it set as the content annotation's thumbnail
property?
Allow setting locale in the info.yml, e.g.
- - en
label: The Lord of the Rings
- de
Etikette: Die Herr der Ringe
- - en
description: The Lord of the Rings Trilogy
- de
Beschreibung: Die Herr der Ringe-Trilogie
related: UniversalViewer/uv-app-starter#12
Bearing in mind that the UX for this doesn't exist in the UV yet...
What would be the most user-friendly way to specify a choice of images? http://iiif.io/api/presentation/2.0/#choice-of-alternative-resources
If there isn't a use case for metadata on each image, you could simply list every image in the canvas folder excluding thumb.jpg. Otherwise, perhaps adding a further folder starting with an underscore could signify choice?
If there's no thumb.[jpg,png,gif] in a canvas folder, but an image is being annotated, generate a thumb using https://github.com/oliver-moran/jimp.
Use sensible defaults for dimensions, e.g. 100 x 100px.
Allow dimensions to be overridden. Maybe add an options parameter to build
that accepts thumbs.width
and thumbs.height
properties.
build(dir, url, {
thumbs: {
width: 50,
height: 50
}
});
Hi there,
Thanks a lot for your lib.
I am using it in a TypeScript project. I can see you are using TypeScript too but unfortunately you don't publish the type declaration of your API.
It's a shame as users can't benefit form your typings and have to redeclare those locally in a biiif.d.ts
with :
declare module "bifff" {
type build = (dir: string, url: string, virtualName?: string) => Promise<void>;
}
You might consider adding typescript declaration in your build.
Sometimes it's necessary to be able to include a manifest that has been copied from elsewhere. There is no index.json
to generate in this case. Maybe include a _index.json
in the folder to indicate that it can skip generating an index.json
?
Once ipfs/js-ipfs#209 is ready it should be possible to publish to a mutable address which can be used as the url
parameter.
http://prezi3.iiif.io/api/presentation/3.0/
labels and all text values must always be a language map. Assume @none
by default #8
Use items
instead of sequences
and canvas.content
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.