opds-community / drafts

Contains all the current drafts for the OPDS specifications
36 stars 10 forks source link

OPDS 1 entry supports a summary, should OPDS 2 link object support a similar property? #51

Open llemeurfr opened 2 years ago

llemeurfr commented 2 years ago

In https://gallica.bnf.fr/opds we find entries like

<entry>
<title>Dernières mises en ligne</title>
<id>
https://gallica.bnf.fr/services/engine/search/opds?operation=searchRetrieve&version=1.2&exactSearch=false&query=dc.format%20all%20%22epub%22%20sortby%20indexationdate%2Fsort.descending%20&filter=provenance%20all%20%22bnf.fr%22
</id>
<updated>2021-11-12T18:43:37</updated>
<summary type="text">Tout juste ajouté sur Gallica</summary>
<link type="application/atom+xml;profile=opds-catalog;kind=navigation" href="https://gallica.bnf.fr/services/engine/search/opds?operation=searchRetrieve&version=1.2&exactSearch=false&query=dc.format%20all%20%22epub%22%20sortby%20indexationdate%2Fsort.descending%20&filter=provenance%20all%20%22bnf.fr%22" rel="http://opds-spec.org/sort/popular"/>
</entry>

There is currently no way to map the summary to an internal object modelled after OPDS 2. DO we live with the absence of this possibly useful information?

mickael-menu commented 2 years ago

Isn't this the same as the publication.metadata.description key?

https://github.com/readium/webpub-manifest/blob/e5edaef5d7b6010b17c809a5679630ad00b403c5/schema/metadata.schema.json#L115-L117

mickael-menu commented 2 years ago

In the Swift OPDS 1 parser, we take content then summary as a fallback for description:

description: tag("content") ?? tag("summary"),
llemeurfr commented 2 years ago

No it is the "summary" of an OPDS 1 entry, which is mapped to an OPDS 2 Link object.

danielweck commented 2 years ago

Example OPDS1 feed: http://gallica.bnf.fr/opds

The current TypeScript implementation (r2-opds-js) converts OPDS1 title to OPDS2 Title property of the Link object, and converts OPDS1 summary to an untyped JSON "additional property" named title_summary. See: http://readium2.herokuapp.com/opds-v1-v2-convert/%20http%3A%2F%2Fgallica.bnf.fr%2Fopds%20

Thorium displays the OPDS1 summary as a tooltip to the main Entry title (I will post screenshots below shortly)

danielweck commented 2 years ago

Thorium screenshot:

OPDS
mickael-menu commented 2 years ago

Following the work done for the additional EPUB metadata, we could store it as an extension by expanding the XML namespace of the <summary> tag:

{
  "properties": {
      "http://www.w3.org/2005/Atom#summary": "Tout juste ajouté sur Gallica"
  },
  "type": "application/atom+xml;profile=opds-catalog;kind=navigation",
  "title": "Dernières mises en ligne",
  "rel": "http://opds-spec.org/sort/popular",
  "href": "https://gallica.bnf.fr/services/engine/search/opds?operation=searchRetrieve&version=1.2&exactSearch=false&query=dc.format%20all%20%22epub%22%20sortby%20indexationdate%2Fsort.descending%20&filter=provenance%20all%20%22bnf.fr%22"
}
HadrienGardeur commented 2 months ago

We've inherited summary from Atom, but it's never something that was very useful IMO.

Various organizations have rolled out OPDS 2.0 support over the years but no one ever expressed their interest in such an extension. I'll tag this issue with the "OPDS 2.0" label, but I wouldn't consider adding this to our roadmap of topics to cover without broader interest.