Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Ranges #22

Open
edsilv opened this issue Apr 23, 2018 · 1 comment
Open

Generate Ranges #22

edsilv opened this issue Apr 23, 2018 · 1 comment

Comments

@edsilv
Copy link
Member

edsilv commented Apr 23, 2018

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
Copy link
Member Author

edsilv commented Sep 19, 2018

targeting time-based media:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant