View Single Post
Old 10-06-2013, 11:32 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,455
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by At_Libitum View Post
I've been going through the resources folder but seem to be out of luck. I would like to make some minor customization to the final stage of opds output so that it displays series and series_index below the author name when viewing a list of books.

Seems that I can customize the webinterface but not the feed
Calibre's OPDS server provides XML output intended to be consumed by an OPDS client. It is the client that chooses how to display the information provided. Clients care about the structure of the information in the XML, but they do not (or at least should not) care about the order of information.

To explain a bit more fully, here is an example of the XML sent by the calibre's OPDS server:
Code:
  <entry>
    <title>1632</title>
    <author>
      <name>Flint, Eric</name>
    </author>
    <id>urn:uuid:d00834a3-dfdc-4bfd-9193-ff37315c3483</id>
    <updated>2013-10-06T15:06:23+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">RATING: ★★★★<br/>
TAGS: Adventure, Alternate History, Fantasy, Historical, Science Fiction, War<br/>
SERIES: 1632 [1]<br/>
<p class="description">SUMMARY:<br/>When part of West Virginia is transported to 1632 East Germany during the Thirty Year's War, the new citizens repel marauding mercenaries, house German refugees, determine citizenship, and establish relationships and identities.</p></div>
    </content>
    <link href="/get/epub/74" type="application/epub+zip" rel="http://opds-spec.org/acquisition"/>
    <link href="/get/cover/74" type="image/jpeg" rel="http://opds-spec.org/cover"/>
    <link href="/get/thumb/74" type="image/jpeg" rel="http://opds-spec.org/thumbnail"/>
  </entry>
As you can see, much of the information is in a structured form defined by the OPDS spec, for example the links, authors, ids, etc. The OPDS spec does not define an official structure for tags, ratings, series, or several other metadata fields. To work around this, calibre includes them in the "content" section as lines starting with distinctive labels and ending in <br/>. The order of these special elements in the content section is not guaranteed. Calibre provides no way to change how these fields are written to the content section, both because it wants to guarantee the structure and expects any formatting to be done by the client.
chaley is offline   Reply With Quote