Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 09-28-2010, 05:50 PM   #1
SteffenH
Enthusiast
SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.
 
Posts: 43
Karma: 475341
Join Date: May 2007
Location: Berlin, Germany
Device: Kindle 3, Kindle Paperwhite 2, Kobo Mini, TrekStor Pyrus Mini
How to make a Vox-Europe Recipe

Unfortunately Vox-Europes (voxeu.org) RSS-Feed (http://www.voxeu.org/rss.php?q=recent) provides only short feeds including a link to the full article (i.e. http://www.voxeu.org/index.php?q=node/5567) but not to a printable page. I would like to build an receipe with a collection of the full articles. Can anybody give me some advice to build on?

Best

Steffen
SteffenH is offline   Reply With Quote
Old 09-29-2010, 04:36 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Did you try just putting the feed in there and letting Calibre have a go? I just did, and it downloaded the full article.
Manichean is offline   Reply With Quote
Advert
Old 09-29-2010, 07:52 AM   #3
SteffenH
Enthusiast
SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.
 
Posts: 43
Karma: 475341
Join Date: May 2007
Location: Berlin, Germany
Device: Kindle 3, Kindle Paperwhite 2, Kobo Mini, TrekStor Pyrus Mini
Yes, but I will try it again.
SteffenH is offline   Reply With Quote
Old 09-30-2010, 02:06 AM   #4
SteffenH
Enthusiast
SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.
 
Posts: 43
Karma: 475341
Join Date: May 2007
Location: Berlin, Germany
Device: Kindle 3, Kindle Paperwhite 2, Kobo Mini, TrekStor Pyrus Mini
You are right it works. I have no clue what went wrong the first time. Thank you. One further question. How to remove needles links etc?
SteffenH is offline   Reply With Quote
Old 09-30-2010, 03:45 AM   #5
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Do you mean needless links? If so, that's a case for the recipe wizards.
Manichean is offline   Reply With Quote
Advert
Old 09-30-2010, 04:01 PM   #6
SteffenH
Enthusiast
SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.
 
Posts: 43
Karma: 475341
Join Date: May 2007
Location: Berlin, Germany
Device: Kindle 3, Kindle Paperwhite 2, Kobo Mini, TrekStor Pyrus Mini
Yes, of course, needless links. What is a recipe wizard?
SteffenH is offline   Reply With Quote
Old 09-30-2010, 05:03 PM   #7
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
A wizard in the area of creating recipes.
Manichean is offline   Reply With Quote
Old 09-30-2010, 06:55 PM   #8
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by SteffenH View Post
Yes, of course, needless links. What is a recipe wizard?
Depends on what the links are that you wish to remove. If they are links on the rss page itself like for instance if you have say a Gallery link full of photos but you don't want that in the fetch then you would simply do something along this.
if you had at http://blah.com/mypage.rss

- Lovely article
- Another Beautiful article
- Gallery: - Lovely photos of a dumpster
- More Stuff
- And More stuff
- Gallery: Dirt samples

you could go something like this in your code
Spoiler:

Code:
def get_article_url(self, article): 
        link = article.get('link')
        if 'gallery' not in link:
             return link

the above would search the rss feed links and if the link doesn't contain gallery it will return it otherwise they will be skipped.

if it is actually links inside the articles themselves for instance if you have

this little piggy went to the market. this little piggy stayed home. gallery: this little piggy's home

then you could do something along these lines:
Spoiler:

Code:
def preprocess_html(self, soup) :
    
      weblinks = soup.findAll(['head','h2'])
       if weblinks is not None:
          for link in weblinks:
            if re.search('(Gallery)(:)',str(link)):
               link.parent.extract()
        return soup

what the above will do is take and find all head and h2 tags in the soup (you will have to change it to suit your needs) then if it finds those tags it moves on down to the for look and checks each tag that is stored inside weblinks. by taking and doing a regexpress search for the values of Gallery: that is inside the link. if it finds it then it gets rid of it. then it returns the soup.
TonytheBookworm is offline   Reply With Quote
Old 10-02-2010, 04:48 AM   #9
slex
Addict
slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.slex ought to be getting tired of karma fortunes by now.
 
Posts: 294
Karma: 1196776
Join Date: Nov 2008
Location: Bulgaria
Device: Kindle 4 NT, Onyx Boox M92
I also need a recipe for VoxEu.org. I've tried just including the RSS and Calibre does a relatively good job leaving only the article and trimming everything else, however on my reader (Lbook V3, i.e. Hanlin V3) the text does not wrap to the screen and is instead broader than the screen space itself.

I have tried editing the recipe, too, and the text gets wrapped well to the screen. The problem is, though, that I only get the first page of the article. When I press next page, starts the next article.

BTW, this happens with export to EPUB. If I export to FB2, I have no problems with the wrapping of the text, but almost every article has some kind of table, and tables are not supported in FB2, so this is not a solution.
slex is offline   Reply With Quote
Old 10-06-2010, 04:09 AM   #10
SteffenH
Enthusiast
SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.
 
Posts: 43
Karma: 475341
Join Date: May 2007
Location: Berlin, Germany
Device: Kindle 3, Kindle Paperwhite 2, Kobo Mini, TrekStor Pyrus Mini
Thank you for your instructions. I will give them a try.

Best

Steffen
SteffenH is offline   Reply With Quote
Old 10-06-2010, 04:09 AM   #11
SteffenH
Enthusiast
SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.SteffenH ought to be getting tired of karma fortunes by now.
 
Posts: 43
Karma: 475341
Join Date: May 2007
Location: Berlin, Germany
Device: Kindle 3, Kindle Paperwhite 2, Kobo Mini, TrekStor Pyrus Mini
Thank you for your instructions. I will give them a try.

Best

Steffen
SteffenH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FREE May 9th ONLY - Angel’s Vox 1.4 Xanthe Deals and Resources (No Self-Promotion or Affiliate Links) 0 05-09-2010 12:05 PM
Let's make Irex sell the DR800SG in Europe from October menelic News 17 10-01-2009 03:28 PM
Could some kind soul make a recipe for politico.com Dragoro Calibre 3 03-13-2009 11:48 PM
how to make Europe iliad support Chinese? foxql iRex 2 03-12-2009 12:50 AM
Make: HOW TO - Make PDFs for the Sony Reader (Ebook e-ink device) kalivoodoo Sony Reader 6 02-01-2007 11:56 AM


All times are GMT -4. The time now is 07:08 AM.


MobileRead.com is a privately owned, operated and funded community.