|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#16 | |
Connoisseur
![]() Posts: 63
Karma: 46
Join Date: Feb 2011
Device: Kindle 3 (cracked screen!); PW1; Oasis
|
Quote:
|
|
![]() |
![]() |
![]() |
#17 | |
onlinenewsreader.net
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 327
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
plus ça change
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 101
Karma: 32134
Join Date: Dec 2009
Location: France
Device: Kindle PW2, Voyage
|
Thanks, nick -- the fix is working here on XP. It's great finally having a back button that works in periodicals again.
|
![]() |
![]() |
![]() |
#19 |
onlinenewsreader.net
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 327
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
|
This is probably my last update on this. I have learned that Kindlegen 1.1 handles the masthead images properly as well as descriptions in the "Articles List" view. Why these features vanished with Kindlegen 1.2 I don't know but if you use Kindlegen 1.1 instead you can have them back and I recommend that.
Amazon doesn't distribute Kindlegen 1.1 any more but you can get it here http://www.megaupload.com/?d=IJTAIWYR (I trust this doesn't violate MobileRead's prohibition on uploading apps since it's a link to an external site). The URL is also in the Instructions file. You can also use Kindlegen 1.2 but you won't get masthead images or descriptions in the "Articles List" view. As before, if you are updating from an earlier Calibre-Kindle, be sure to replace ALL the files in the folder. My thanks to veezh, tylau0, oneillpt and dwanthny for taking the time to help sort out the issues with the earlier versions--I think we have something stable now. Last edited by nickredding; 07-18-2011 at 06:02 PM. |
![]() |
![]() |
![]() |
#20 |
Connoisseur
![]() Posts: 82
Karma: 10
Join Date: Oct 2010
Device: Kindle
|
You're right. Here I include the windows script of my implementation for completeness. I also change my python code a bit according to what I learn from nickredding's implementation - especially the use of a ending "*" to work around the "bug" that Kindle masthead title skips the last word - that's a very useful observation and a clever fix!
Last edited by tylau0; 07-21-2011 at 01:43 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
Connoisseur
![]() Posts: 63
Karma: 46
Join Date: Feb 2011
Device: Kindle 3 (cracked screen!); PW1; Oasis
|
Quote:
news.bat: recipes named with embedded blanks cause failure. For example, news "The Irish Times" -verbose (using "The Irish Times.recipe") I thought I had solved this, but I've overridden my news.bat, and need to redo the modifications, and have not succeeded yet. Copying the recipe with a new name without embedded blanks solves the problem of course. update-recipe.py: Two problems may arise. Custom recipes created in Calibre (possibly only for certain versions) may use class ...(AutomaticNewsRecipe): rather than class ...(BasicNewsRecipe): (although Calibre 0.8.10 hides this when displaying the recipe, substituting BasicNewsRecipe, the custom recipe in C:\Users\Joe\AppData\Roaming\calibre\custom_recipe s retains AutomaticNewsRecipe unless the recipe is edited and resaved). If custom recipes are copied from ...\custom_recipes, update_recipe.py needs to check for either (BasicNewsRecipe): or (AutomaticNewsRecipe): Further, custom recipes created in Calibre may start with class, and may not preceed this with any other lines such as "__license__ = 'GPL v3'" or "from calibre.web.feeds.news import BasicNewsRecipe", and in such cases, where the 'c' of class is the first character encountered, update-recipe.py fails. Both these problems are corrected by the followings lines at the end of editRecipe in update-recipe.py: Code:
pph_result = re.search(r'\s*def\s+postprocess_html[^(]*\([^)]*\)\s*:',infile_str,re.S|re.I) if pph_result: infile_str = re.sub(r'def\s+postprocess_html','def orig_postprocess_html',infile_str,re.S|re.I) pph_result = re.search(r'\s*def orig_postprocess_html[^(]*\([^)]*\)\s*:',infile_str,re.S|re.I) #news_result = re.search(r'\s*class[^(]+\(basicnewsrecipe\)\s*:',infile_str,re.S|re.I) news_result = re.search(r'\s*class[^(]+\(((automat)|(bas))icnewsrecipe\)\s*:',infile_str,re.S|re.I) if (news_result==None): print "Cannot find news recipe class" return if (news_result.start() > 0): outfile_str = infile_str[:news_result.start()+1]+recipe_header_str+\ infile_str[news_result.start():news_result.end()+1]+news_prefix_str+\ infile_str[news_result.end():pph_result.start()+1]+postprocess_html_frag_str+\ infile_str[pph_result.end():] else: outfile_str = recipe_header_str+\ infile_str[news_result.start():news_result.end()+1]+news_prefix_str+\ infile_str[news_result.end():pph_result.start()+1]+postprocess_html_frag_str+\ infile_str[pph_result.end():] else: #news_result = re.search(r'\s*class[^(]+\(basicnewsrecipe\)\s*:',infile_str,re.S|re.I) news_result = re.search(r'\s*class[^(]+\(((automat)|(bas))icnewsrecipe\)\s*:',infile_str,re.S|re.I) if (news_result==None): print "Cannot find news recipe class" return if (news_result.start() > 0): outfile_str = infile_str[:news_result.start()+1]+recipe_header_str+\ infile_str[news_result.start():news_result.end()+1]+news_prefix_str+\ postprocess_html_str+infile_str[news_result.end():] else: outfile_str = recipe_header_str+\ infile_str[news_result.start():news_result.end()+1]+news_prefix_str+\ postprocess_html_str+infile_str[news_result.end():] outfile.write(outfile_str) outfile.flush() outfile.close() |
|
![]() |
![]() |
![]() |
#23 | ||
onlinenewsreader.net
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 327
Karma: 10143
Join Date: Dec 2009
Location: Phoenix, AZ & Victoria, BC
Device: Kindle 3, Kindle Fire, IPad3, iPhone4, Playbook, HTC Inspire
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Kindle, periodical] Remember last article selected | tylau0 | Recipes | 29 | 07-22-2011 02:23 PM |
Free (Kindle) Remember Why You Play | arcadata | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 10-04-2010 08:17 PM |
Gizmodo article: How To Fix Today's Ebook readers | ekaser | News | 76 | 04-30-2010 05:10 AM |
Kindle Document as Periodical | Gideon | Amazon Kindle | 2 | 04-23-2008 06:50 PM |
Remember Kindle ? | yvanleterrible | Amazon Kindle | 14 | 09-12-2007 09:05 AM |