mhl / guardian-for-kindle

A script to generate an edition of the Guardian for reading on the Amazon Kindle using the Guardian Open Platform
http://longair.net/blog/2010/10/04/the-guardian-on-your-kindle/
GNU Affero General Public License v3.0
176 stars 33 forks source link

Periodical navigation buggy on Kindle Touch #5

Open danchoi opened 12 years ago

danchoi commented 12 years ago

I generated a MOBI file for the guardian using the Python script and copied it to my Kindle Touch. Most of it works well, except the two-column table of contents. If you click the Sections on the left, the Articles on the right do not update correctly.

mhl commented 12 years ago

Hi @danchoi - thanks for reporting this problem. Unfortunately, I don't see any reasonable way to go about solving this type of problem at the moment. I don't see the problem you describe on my Kindle 3rd generation, but there are certainly more subtle problems with the navigation on that device as well.

Unless someone gets hold of a .opf and .ncx that works properly, or Amazon actually release the specification for those files for the case of generating periodicals, I'm afraid I'm not sure there's a way to fix these kinds of bugs. We can hope, I suppose...

danchoi commented 12 years ago

@mhl The problem is specific to the Kindle Touch. I actually solved the problem by tinkering for an hour with the NCX and OPF section. I'm not sure exactly how I did it yet, but I'll let you know when I've pinned this down. Thank you for writing and releasing this script.

mhl commented 12 years ago

Great :) I look forward to hearing what the required changes are - perhaps they will fix some of the other problems too...

danchoi commented 12 years ago

This is what I think I did. Here is a gist for reference. The top is an opf generated by your Python script. The bottom is an opf generated by my Ruby script. I also include the nav-contents.ncx that my script generated.

https://gist.github.com/1589856

What's different about mine is that I have manifest items not just for each article but also each section. Also, in the <spine> section, I include the section items along with the article items in the same flat ordered list. At any rate, this is what I changed to get the table of contents working in the Kindle Touch.

I hope this is clear enough and that it helps. I'm not 100% percent sure that everything I changed is necessary to get the navigation working on the Kindle touch, but at least some of it is, based on my experiments.