![]() |
#631 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No you should just need to remove the feeds you dont want
|
![]() |
![]() |
#632 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Quote:
Code:
class AdvancedUserRecipe1249153260(BasicNewsRecipe): title = u'DailyMail' oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True encoding = 'cp1252' keep_only_tags = [dict(name='div', attrs={'id':'js-article-text'})] remove_tags = [dict(name='div', attrs={'class':['relatedItems','article-icon-links-container']})] remove_tags_after = dict(name='h3', attrs={'class':'social-links-title'}) feeds = [(u'Sports', u'http://www.dailymail.co.uk/sport/index.rss')] def print_version(self, url): main = url.partition('?')[0] return main + '?printingPage=true' |
|
![]() |
Advert | |
|
![]() |
#633 |
Member
![]() Posts: 19
Karma: 10
Join Date: Mar 2009
Device: Sony PRS-505
|
I did a search but I didn't find anything for the following idea:
I read a lot of fixed width (80 character often) texts. Does anyone have a script to turn these into paragraphized texts? Some examples: http://www.ietf.org/rfc/rfc793.txt (RFC: TCP) http://www.gutenberg.org/files/345/345.txt (Dracula from Gutenberg) (Yes, I know there is an HTML version of that one.) |
![]() |
![]() |
#634 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jul 2009
Device: Sony PRS-505
|
Hey guys im tryin to grab a print version using the advanced version but i need to set the url.replace to change two things in the url.
here an example of the original url http://www.dpreview.com/reviews/olympusep1/?from=rss this is the url for the print version http://www.dpreview.com/reviews/prin...iew=OlympusEP1 how do i get it to remove the /?from=rss at the end This is what i currently have def print_version(self, url): return url.replace('http://www.dpreview.com/reviews/', 'http://www.dpreview.com/reviews/print.asp?review=') |
![]() |
![]() |
#635 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
Quote:
Code:
def print_version(self, url): baseurl = url.rpartition('/?')[0] turl = baseurl.partition('/reviews/')[2] return 'http://www.dpreview.com/reviews/print.asp?review=' + turl |
|
![]() |
Advert | |
|
![]() |
#636 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jul 2009
Device: Sony PRS-505
|
Thank you so much for that, only thing missing are the pictures lol.
How do i retain those in the finished epub. |
![]() |
![]() |
#637 | ||
Kindle DX
![]() Posts: 21
Karma: 10
Join Date: Aug 2009
Location: The Netherlands
Device: iPad and Kindle DX
|
Problem parsing guardian rss feed:
I have tried to update the Guardian Recipe to fix some problems with changes in the web site etc. I am almost there, but I am hitting the odd article that causes the following errors in ebook-convert: Quote:
Quote:
John |
||
![]() |
![]() |
#638 | |
Kindle DX
![]() Posts: 21
Karma: 10
Join Date: Aug 2009
Location: The Netherlands
Device: iPad and Kindle DX
|
One extra thought:
Checking: Quote:
Adding a PHP Code:
My PHP is not up to fixing the _parse_xhtml code myself though. Can anyone suggest a better work around (that doesn't delete any valid content) or a fix to the PHP code? John P.S. I've attached the offending article as an example of the empty <a> tags. index.txt is after porcessing by the recipe and problem.txt is the original html file. |
|
![]() |
![]() |
#639 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Will be fixed in next release.
|
![]() |
![]() |
#640 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
I tried creating recipe for a new version and was not able to make conversion_options work.
Is it operational at all? This is what I tried: Code:
conversion_options = { 'tags':'aa,bb' , 'publisher': 'pub' , 'comments': 'desc' , 'language': 'en' } |
![]() |
![]() |
#641 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
EDIT: Actually, looking at the code, it should be.
|
![]() |
![]() |
#642 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
well it does not work. Do you want issue for this?
Last edited by kovidgoyal; 08-06-2009 at 12:23 PM. |
![]() |
![]() |
#643 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
#644 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 820
Karma: 8820388
Join Date: Dec 2008
Device: Sony PRS-505, -350; Kindle 3 3G, DX, PW 2; various tablets
|
Smmithsonian Magazine - crappy edition
Since I couldn't find the Smithsonian Magazine in a search of this thread, and it's my sister's favorite magazine, I humbly submit this bare minimum effort (don't know Python) in case anyone else might like it and doesn't mind skipping over some poor formatting.
It's merely the RSS assembling from this page. Note that I set oldest_article = 30 for this monthly magazine. Change as you see fit. |
![]() |
![]() |
#645 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,981
Karma: 11862367
Join Date: Apr 2008
Device: Sony Reader PRS-T2
|
Attached is the errors I got when I tried to download the Sydney Morning Herald - too long for a simple post..
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column read ? | pchrist7 | Calibre | 2 | 10-04-2010 02:52 AM |
Archive for custom screensavers | sleeplessdave | Amazon Kindle | 1 | 07-07-2010 12:33 PM |
How to back up preferences and custom recipes? | greenapple | Calibre | 3 | 03-29-2010 05:08 AM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |