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

publication in OPDS2 feed might be an OPDSPublication or an R2Publication #1261

Closed
panaC opened this issue Nov 19, 2020 · 1 comment
Closed
Labels

Comments

@panaC
Copy link
Member

panaC commented Nov 19, 2020

https://github.com/readium/r2-opds-js/blob/c262484a98040c9ea901131701ce0265f39adede/src/opds/opds2/opds2.ts#L57

https://drafts.opds.io/opds-2.0#12-publications

Publications must either be:

a Readium Web Publication with no restrictions in terms of access (no payment, no credentials required, no limitations whatsoever)
or an OPDS Publication

How to add it into the serializer @danielweck ?

I think we need to add a converter before the OPDSPublicaition serialization.

For example :
this R2Publication https://r2-streamer-js-aghvbovdia-ey.a.run.app/pub/aHR0cHM6Ly9uZ25peC1zZXJ2ZXItbmNuZGFkd3M0cS1leS5hLnJ1bi5hcHAvcHVibGljL0FjY2Vzc2libGVfRVBVQl8zLmVwdWI=/manifest.json

become

{
    "metadata": {
        "@type": "http://schema.org/Book",
        "title": "Accessible EPUB 3",
        "identifier": "urn:isbn:9781449328030",
        "author": "Matt Garrish",
        "publisher": "Tools of Change",
        "language": "en",
        "modified": "2020-11-19T08:17:07.811Z",
        "description": "<p>With the introduction of EPUB 3, publishers now have the means to create a single rich data source for audiences of all reading abilities. Through practical tips and examples, <i>Accessible EPUB 3</i> takes you inside the EPUB 3 format and explores how you can enrich and enhance content for all readers. Author Matt Garrish demystifies the process of making content easier to access, demonstrating how accessible practices are intertwined with standard content best practices.</p>",
        "rights": "Copyright © 2012 ",
        "subject": "COMPUTERS / Electronic Publishing"
    },
    "links": [
        {
            "type": "application/webpub+json",
            "rel": "http://opds-spec.org/acquisition/open-access",
            "href": "https://r2-streamer-js-aghvbovdia-ey.a.run.app/pub/aHR0cHM6Ly9uZ25peC1zZXJ2ZXItbmNuZGFkd3M0cS1leS5hLnJ1bi5hcHAvcHVibGljL0FjY2Vzc2libGVfRVBVQl8zLmVwdWI=/manifest.json"
        }
    ],
    "images": [
        {
            "type": "image/jpeg",
            "height": 1000,
            "width": 761,
            "href": "https://r2-streamer-js-aghvbovdia-ey.a.run.app/pub/aHR0cHM6Ly9uZ25peC1zZXJ2ZXItbmNuZGFkd3M0cS1leS5hLnJ1bi5hcHAvcHVibGljL0FjY2Vzc2libGVfRVBVQl8zLmVwdWI=/OEBPS/orm_front_cover.jpg"
        }
    ]
}

same metadata, just extract cover and add webpub acquisition OPDSLink

@panaC
Copy link
Member Author

panaC commented Feb 24, 2021

opds-community/drafts#39

@panaC panaC closed this as completed Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants