I have been struggling with this as well - I hope someone else will come along to explain everything! I've been generating a daily edition of the Guardian for the Kindle, and haven't found any documentation about how to do this properly as a periodical.
However, I'll explain what I understand about this so far - we can now generate files that work on the Kindle as periodicals using kindlegen from a .opf
and .ncx
file. However, the results aren't quite perfect yet, namely in that I don't know how to add a masthead to the sections and articles page. Update: thanks to the tip from Marco in the comments, this works now, at least with Kindlegen 1.1 - later versions may not work. I've updated the example files below to include a masthead image.
Documentation for the .opf
and .ncx
files can be found here but these only explain how to generate books, not periodicals.
Presumably you can get documentation from Amazon via registering with them to publish a newspaper, but that has to be approved by them, and in my case in my case I don't meet the terms and conditions. (While I'm allowed to use the data from the Guardian API, I don't own it.)
Calibre generates documents in periodical format, but by directly generating the .mobi
/ .azw
file rather than going through a .opf
and .ncx
. I believe that was done by reverse engineering the binary format. Calibre is open source, so you could use that code to generate a periodical.
There is a hint in the Calibre source code that your top level navPoint
should have class="periodical"
and indeed that seems to cause kindlegen to make a book that's presented as a periodical.
As well as discovering that previous breakthrough, oldmanuk worked out how to get the author names and summaries into the article list, which boils down to adding these elements under each article's navPoint
:
<mbp:meta name="description">A summary of this article here</mbp:meta>
<mbp:meta name="author">The list of authors here</mbp:meta>
In case this is of use, I've put a pair of example files here:
... and the source code for the project is here:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…