View Single Post
Old 12-31-2009, 01:44 PM   #1
Kolenka
<Insert Wit Here>
Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.Kolenka ought to be getting tired of karma fortunes by now.
 
Kolenka's Avatar
 
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
Sony's Periodicals & Extensions to ePub

This isn't so much a rant that Sony is extending the ePub format, per se, but rather an explanation on how this stuff seems to work. I was curious what it would take to create an ePub from RSS feeds (similar to Calibre) that looked and acted like periodicals on the Sony.

In the ePub files itself, there are two new XML files:

- META-INF/metadata.xml
- OPS/atom.xml (referenced in META-INF/container.xml)

The Metadata XML file is an RDF file with extensions from Dublin Core and a couple Sony-specific extensions (to specify a thumbnail and logo that lives in the ePub). It sets up the description of the periodical, and I'm assuming is what turns on most of the logic that drives it to be categorized as a periodical.

The Atom.XML is an Atom feed that acts like yet another TOC focused more on describing the articles themselves. Title, Author, Update timestamp, word count and so on all appear here. Included is some information on if it is a section or article of a newspaper, and what section an article belongs to. This seems to form the backbone of the navigation buttons that you see on the PRS-900 that let you jump between articles and sections.

Beyond that, it seems to be a run of the mill ePub. The OPF file has a normal manifest and spine, although the guide only includes references to each section (dunno if this is important in any way yet).

The NCX TOC seems to be formatted in a fairly standard manner as well, with each Section getting a nav point, and all articles and a second nav point for the section within the section's main nav point. The playOrder attribute seems important though, as it does increment, and the section's main nav point and its twin inside itself share the same value. Again, this could be pretty standard in NCX files (since the parent nav point can't actually be jumped to on Sony readers, in particular, and I wouldn't be surprised if this is duplicated on other devices).

The XHTML itself seems to be able to be practically whatever you want, although Sony is providing templates to newspapers to help speed them along a bit. Possibly even a tool to generate the publication based on a fixed CSS file the newspaper tweaks and feeds in.

I've also noticed that if you drop this completed ePub into the Reader's database/media/downloads folder, it will appear as a 'new delivery', even if it is side-loaded via USB. The Reader is just picking the periodical with the most recent modification time (and is unread) to display.

As for the raw specifics of what goes into each file, I have to leave that as an exercise to the reader for now, unfortunately. I don't have the specifics wrapped up in anything that can be used to replicate it (although it is pretty straight-forward once you see the contents of these files), but it does work. I've been able to use this to get the Seattle Times onto my PRS-900 and have it show up as a periodical instead of a book.
Kolenka is offline   Reply With Quote