Giter Site home page Giter Site logo

iiif-commons / biiif Goto Github PK

View Code? Open in Web Editor NEW
89.0 89.0 11.0 1.06 MB

Organise your files according to a simple naming convention to generate IIIF Presentation API json using nodejs (Dat and IPFS compatible)

License: MIT License

TypeScript 30.13% JavaScript 69.38% HTML 0.49%
iiif nodejs

biiif's People

Contributors

dependabot[bot] avatar edsilv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

biiif's Issues

Incorrect thumbnail path

Following the biiif-template I found two issues regarding thumbnails:

  1. Root collection has /collection/ on its thumbnail path, but the image is actually at the root level:
    image

  2. Canvas thumbnail has the canvas path before the manifest path:
    image

For debugging purposes, please check this manifest: https://iiif.tiju.ca/

Tags for releases

Would it be possible to get git tags for each release which correspond to the npm release?

.biiifignore

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?

IIIF Presentation API v3 vs v2

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?

Use items instead of sequence

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

Can I use this in serveless?

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.

On error return message

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.

Generate Ranges

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"
            }
        ]
    }
]

Custom annotations

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.

Add -d command

biiif myfolder -d deletes all existing index.json files.

Create manifests from a set of files without canvas folders

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?

Thumbnails

Put a thumb.* in canvas folders to have it set as the content annotation's thumbnail property?

Localisable metadata

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

Image Choice

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?

Generate Thumbs

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
    }
});

publish Type declaration

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.

Support including external manifests

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.