biiif icon indicating copy to clipboard operation
biiif copied to clipboard

Generate Ranges

Open edsilv opened this issue 7 years ago • 1 comments

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

edsilv avatar Apr 23 '18 13:04 edsilv

targeting time-based media:

structures:
  - Stories
    - _video1#t=100,200
    - _video1#t=200,300
    - _video1#t=300,400

edsilv avatar Sep 19 '18 09:09 edsilv