02-09-2011, 01:38 PM | #1 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
One Recipe, Multiple Feeds, Different Printer-Friendly Subs
Please help a newbie! I'm sure this must have been answered somewhere, but I can't find it.
I have a recipe that includes multiple feeds from a single source: it's a newspaper with a feed for "Headlines", another for "Editorials", and so forth. Getting the printer-friendly version for each feed is easy, you simply substitute "&template=printart" for a string in the url. But the string to replace is different for each feed. For one feed, all the articles have "/1478/rss", for another it's "/1016/rss05", etc. I can get them to work for each feed individually, but how do I handle multiple substitutions within the same recipe? |
02-09-2011, 05:01 PM | #2 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
Advert | |
|
02-09-2011, 09:11 PM | #3 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
Thanks!
I thought that was the way to go, but couldn't get it working. After another look at it, I got the syntax right, and that did it! |
02-10-2011, 09:57 AM | #4 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
02-10-2011, 10:11 PM | #5 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
And great it is!
After getting past that problem, the next issue turned out to be that the printer-friendly page was laid out with tables, which make my Nook gag. After a refresher course in regular expressions--have not used those since SunriseXP, years ago--I got around that. A couple more minor clean-up items, and I'll be golden! I'll probably then submit that to wherever these things get submitted. (In case anyone is interested, it's the Detroit News.) |
Advert | |
|
02-11-2011, 10:17 AM | #6 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
02-11-2011, 10:54 AM | #7 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
|
02-11-2011, 11:10 AM | #8 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Recipe specific options to control the conversion of the downloaded content into an e-book. These will override any user or plugin specified values, so only use if absolutely necessary. For example: Code:
conversion_options = { 'base_font_size' : 16, 'tags' : 'mytag1,mytag2', 'title' : 'My Title', 'linearize_tables' : True, } Convenient flag to disable loading of stylesheets for websites that have overly complex stylesheets unsuitable for conversion to ebooks formats If True stylesheets are not downloaded and processed Code:
no_stylesheets = True List of attributes to remove from all tags For example: Code:
remove_attributes = ['style', 'font'] http://calibre-ebook.com/user_manual...ownloaded-html |
|
02-11-2011, 11:25 AM | #9 |
Intentionally Left Blank
Posts: 172
Karma: 300106
Join Date: Feb 2006
Location: Royal Oak, MI, USA
Device: Nook STR
|
OK, I'm using "no_stylesheets", and have looked at "remove_attributes", but had no idea what "linearize_tables" meant. I'll give it a try this evening.
|
02-11-2011, 01:04 PM | #10 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
It just removes the table, row and data tags so that the rows in the table are treated like lines (linearized) of text. You get all the data, and the advantages of automatic line breaks and reflow to fit a small screen, but you lose vertical alignment of different cells in the table.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Kindles, Multiple News Feeds | filmprof | Recipes | 10 | 02-20-2012 10:38 AM |
Displaying Multiple RSS Feeds in a Single Section? | commandercup | Recipes | 5 | 03-01-2011 05:34 PM |
Auto send diff feeds to multiple devices tutorial | mean_gene | Calibre | 0 | 12-27-2010 02:26 PM |
HP Starts Shipping iPad-Friendly Printer | kjk | Apple Devices | 7 | 06-29-2010 04:19 PM |
RSS feeds + combining multiple html into ebook? | hapax legomenon | Calibre | 2 | 08-20-2008 02:32 PM |