10-04-2011, 01:44 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Oct 2011
Device: Amazon Kindle 3
|
WordLive daily bible reading progress
I'm making a recipe to download the daily bible reading from WordLive (UK). I'm glad to say that there are RSS feeds for the different daily output.
The basic feed is at http://feeds.feedburner.com/org/ELCH?format=xml. This seems a good start. I'm now tweaking. Later I will add a subscription login so the user can set preferences. Right now I have a problem with bible verse numbers: Calibre sees the first few as header numbers. They are actually in sup tags, typically: Code:
<sup class="versenum" id="en-TNIV-25582">1</sup> <p> Now the tax collectors... </p> Here's my current recipe: Spoiler:
Last edited by Dizzley; 10-04-2011 at 01:44 PM. Reason: minor brainfade in original |
10-05-2011, 10:31 AM | #2 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
https://www.mobileread.com/forums/sho...d.php?t=121439 Specifically the tips on writing recipes using ebook-convert. |
|
Advert | |
|
10-05-2011, 11:40 AM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: Oct 2011
Device: Amazon Kindle 3
|
Thanks for replying Starson17.
It might not be the sup tag. The unwanted effect is a line break after the verse number "11". This is visible when viewing the input HTML file for article_1 from the debug directory in a browser. Yes, I'm already running it on the command line - good idea. It seems like the first one, or first few verses get picked up and breaks the layout. I suppose it could be the sup tag or the p tag - classed as "calibre9". Today's feed seems to only break the first verse (11) across lines. Verse 12 onwards is fine. Here's an extract of the feed XML: Spoiler:
The content of the article seems the same in input, parsed and processed HTML. Here's an extract from today's feed's input HTML debug output: Spoiler:
I notice two changes in the input HTML (in Bold) - 1) there's a new <p> tag near versnum 11, and 2) some <p> tag changes near versenum 13 (which still renders correctly as a new paragraph). You can check the feed at http://feeds.feedburner.com/org/ELCH but it changes daily of course. I'l begin by looking at the CSS. I'm somewhat Python savvy so I'm willing to do what it takes. Last edited by Dizzley; 10-05-2011 at 11:41 AM. Reason: typo |
10-05-2011, 02:40 PM | #4 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
I also see you're using embedded content from the RSS feed. (You've doubled some lines in the posted recipe, but that shouldn't be a problem.) You might try not using the embedded content. Still another possibility is that the problem is in the RSS feed, but you're not seeing it if you are looking with a browser (browsers sometimes change the raw source before showing the page). You can print the raw XML soup Calibre sees with : Code:
def preprocess_html (self, soup): print 'the Soup is:', soup return soup Last edited by Starson17; 10-06-2011 at 09:18 AM. |
|
10-06-2011, 09:06 AM | #5 |
Junior Member
Posts: 3
Karma: 10
Join Date: Oct 2011
Device: Amazon Kindle 3
|
Thanks for the patience.
Thanks for the feed debug code. Today's feed soup contains: Spoiler:
So I can now see the feed Calibre is working on. It does look like the offending text has a <p> tag following the </sup> tag (bolded). Also there are empty <p> tags (red). I might try cleaning sequence </sup><p>text</p> up to be </sup>text Also as you suggest, I'll try not using the embedded text. |
Advert | |
|
Tags |
recipe, superscript |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Classic Hide Reading Progress Bar | grapaslingo | Barnes & Noble NOOK | 2 | 05-16-2012 05:54 PM |
Bible Gateway Reading Plans | somedayson | Recipes | 1 | 03-06-2011 02:24 AM |
Classic Nook Reading Progress Bar Goes Blank | gidgiddonihah | Barnes & Noble NOOK | 8 | 08-30-2010 11:56 AM |
PRS-300 Can I use the Daily Edition reading light cover with it? | m-reader | Sony Reader | 13 | 02-02-2010 12:23 AM |
Classic Synchronize book reading progress between Blackberry & Nook? | Greg G | Barnes & Noble NOOK | 11 | 12-10-2009 08:51 PM |