38

Not much can be found on the subject of creating eBooks in kindle/mobipocket. Much less is to be found about periodical format - i.e. the format in which Newspapers are published on Amazon. Yet the instapaper.com can do that and now are local www.idnes.cz do that also. How the hack can they do that?

(Periodical format of azw. is probably some extenstion of mobipocket format - but I'm looking for exact way to create such publication - with sections and articles exactly as for example The New York Times have)

Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
Hurda
  • 4,647
  • 8
  • 35
  • 49

4 Answers4

46

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:

Mark Longair
  • 446,582
  • 72
  • 411
  • 327
  • 5
    THANK YOU! I had figured out most of this, but looking at your example *finally* made me figure out why my code couldn't generate multiple sections. Instapaper's Kindle feature is about to get a lot better. Unfortunately, I can't help yet on the masthead image: the previous method I knew stopped working with the latest firmware update. It was: in the first-level (with the TOC). – Marco Apr 29 '11 at 03:58
  • 2
    After more experimentation, I CAN get the masthead to work with the new periodical renderer in Kindle OS 3.1, but only with an old version of Kindlegen (1.1). The newest version (1.5) not only doesn't support masthead images in this manner and shows text instead, but cuts off the last character of the title when rendering, so "Instapaper" is shown proudly as "Instapape". (Get in touch -- me at marco dotorg -- if you need the old Kindlegen 1.1 binary for Linux or OS X.) – Marco Apr 29 '11 at 16:02
  • @Marco: that's fantastic :) I'm still using a 1.1 binary, so I'll try that out now.... I found that the whole last word was cut off with longer titles, so "The Guardian (Unofficial)" comes up as "The Guardian" slightly off-centre. – Mark Longair Apr 29 '11 at 18:31
  • 1
    I don't suppose anyone has worked out the equivalent mbp:meta elements for use in later versions of kindlegen? – Matthew Wilson Jul 28 '11 at 14:15
4

The other way is to use Calibre directly

http://calibre-ebook.com/user_manual/news.html

you can even use this to download and prepare RSS feed, then edit the html and then compile to mobipocket:

ebook-convert myrecipe.recipe output_dir
ebook-convert output_dir book.mobi

Looks like the generated ncx wont work with kindlegen

Hurda
  • 4,647
  • 8
  • 35
  • 49
4

FYI, the Kindle Previewer (not the actual kindle application) will not render periodicals as periodicals.

I beat my head against the wall on this one for a while before trying it on my actual Kindle.

Michael Pearson
  • 171
  • 1
  • 5
3

referring to here I think the way to do that is adding following code into 'metadata' label in opt file.

<x-metadata>
            <output content-type="application/x-mobipocket-subscription-magazine" encoding="utf-8"/>
</x-metadata>
kerwin
  • 941
  • 2
  • 12
  • 22
  • workink link: http://blog.jocho.cz/post/12591014260/amazon-kindle-periodical-format-mobi – noisy Jul 20 '12 at 12:33