Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2011, 03:41 PM   #1
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Cicero (DE) update

The recipe "Cicero" is broken and need to be replace. I made a new working version called "Cicero Online". Feel free to use it. Let me know if something is wrong.

Spoiler:
Code:

class BasicUserRecipe1316245412(AutomaticNewsRecipe):
#    from calibre.utils.magick import Image, PixelWand
    title = u'Cicero Online'
    description = u'Magazin f\xfcr politische Kultur (RSS Version)'
    publisher = 'Ringier Publishing GmbH'
    category = 'news, politics, Germany'
    language = 'de'
    encoding = 'UTF-8'
    __author__ = 'Armin Geller' # Upd. 2011-09-23
        
    oldest_article        = 7
    max_articles_per_feed = 100
    no_stylesheets = True 
    auto_cleanup = False
    
#    remove_javascript = True    

    remove_tags = [
                    dict(name='div', attrs={'id':["header", "navigation", "skip-link", "header-print", "header-print-url", "meta-toolbar", "footer"]}),
                    dict(name='div', attrs={'class':["region region-sidebar-first column sidebar", "breadcrumb",
                                                      "breadcrumb-title", "meta", "comment-wrapper",
                                                      "field field-name-field-show-teaser-right field-type-list-boolean field-label-above",
                                                      "page-header",
                                                      "view view-alle-karikaturen view-id-alle_karikaturen view-display-id-default view-dom-id-1",
                                                      "pagination",
                                                      "view view-letzte-videos view-id-letzte_videos view-display-id-default view-dom-id-1",
                                                      "view view-letzte-videos view-id-letzte_videos view-display-id-default view-dom-id-2", # 2011-09-23
                                                      "view view-alle-karikaturen view-id-alle_karikaturen view-display-id-default view-dom-id-2", # 2011-09-23
                                                      ]}),
                    dict(name='div', attrs={'title':["Dossier Auswahl"]}),
                    dict(name='h2', attrs={'class':["title comment-form"]}),
                    dict(name='form', attrs={'class':["comment-form user-info-from-cookie"]}),
                    dict(name='table', attrs={'class':["mcx-social-horizontal", "page-header"]}),
                   ]
    
    feeds = [
              (u'Das gesamte Portfolio', u'http://www.cicero.de/rss.xml'),
              (u'Berliner Republik', u'http://www.cicero.de/berliner-republik.xml'),
              (u'Weltb\xfchne', u'http://www.cicero.de/weltbuehne.xml'),
              (u'Kapital', u'http://www.cicero.de/kapital.xml'),
              (u'Salon', u'http://www.cicero.de/salon.xml'),
              (u'Blogs', u'http://www.cicero.de/blogs.xml'), #seems not to be in use at the moment
             ]
 
    def print_version(self, url):
          return url + '?print'
          
#    def get_cover_url(self):
#          return 'http://www.cicero.de/sites/all/themes/cicero/logo.png' # need to find a good logo on their home page!



Edit 2011-09-18 change to Code view
Edit 2011-09-19 update because of clean-up on first feed historical caricature- and video preview pictures and social icons
Edit 2011-09-23 update because of new classes on historical caricature- and video preview pictures and social icons
Attached Files
File Type: txt Cicero_AGe.recipe.txt (2.9 KB, 144 views)

Last edited by Divingduck; 09-23-2011 at 04:37 AM.
Divingduck is offline   Reply With Quote
Old 09-17-2011, 04:02 PM   #2
djdag
Junior Member
djdag began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2011
Device: Kindle 3
First of all, thank you for you efforts.

If I try to import the fixed recipe Calibre returns below error message:

calibre, version 0.8.17
ERROR: Invalid input: <p>Could not create recipe. Error:<br>expected an indented block (recipe20.py, line 6)

Any idea what the problem could be?
djdag is offline   Reply With Quote
Advert
Old 09-17-2011, 04:26 PM   #3
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
It´s a format isue. here is the text file. Rename it to Cicero_AGe.receipe and you can import the file in your recipes.
2011-09-19 update, see first post
2011-09-23 Attached file moved to post #1

Last edited by Divingduck; 09-23-2011 at 04:31 AM.
Divingduck is offline   Reply With Quote
Old 09-17-2011, 04:30 PM   #4
djdag
Junior Member
djdag began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2011
Device: Kindle 3
Hat funktioniert. Super!

Vielen Dank!

Many Thanks!
djdag is offline   Reply With Quote
Old 09-17-2011, 09:14 PM   #5
JayKindle
Connoisseur
JayKindle began at the beginning.
 
JayKindle's Avatar
 
Posts: 69
Karma: 10
Join Date: Sep 2011
Device: Kindle Fire HD 8
Yes, this error happens when using the spoiler brackets than the code brackets in a forum such as this. Code that needs special indents require a structure, and if its not there, whether the code is good, it will fail. Notice that when you open the spoiler box, all the code is flushed to the left. Where in the original code, some of the code should have been tabbed (indented) a bit right.

Perhaps we should start using the code brackets when presenting such work in the future. Avoid the spoiler bracket.

Last edited by JayKindle; 09-17-2011 at 09:16 PM.
JayKindle is offline   Reply With Quote
Advert
Old 09-18-2011, 12:58 AM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,472
Karma: 78880114
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Actually what you could try is nesting a code block IN a spoiler

Spoiler:

See the formatting is preserved
Code:
a
  indented
     deeper indent
top level
  indented again
PeterT is offline   Reply With Quote
Old 09-18-2011, 01:56 AM   #7
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Thanks for your suggestion. I did the change.
Divingduck is offline   Reply With Quote
Old 09-19-2011, 08:50 AM   #8
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
I have made an update on the recipe. See updated post #1+3.
A clean-up on first feed historical caricature-, video preview pictures and social icon was necessary.

Last edited by Divingduck; 09-19-2011 at 09:06 AM.
Divingduck is offline   Reply With Quote
Old 09-23-2011, 04:24 AM   #9
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
It seems they like to keep me running. I found some new classes for historical caricature-, video preview pictures what need to be fixed. I update post #1 and move the file there as well.
Divingduck is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sony PRS-650 - Calibre newsfeed - Le Monde – Cicero – Recipes - wonderose Recipes 17 06-05-2012 05:06 PM
Other Non-Fiction Cicero, M. Tullius: Orationes (Scriptorum Classicorum Bibl. Oxon.). V1. 7 Jul 2011 darseno BBeB/LRF Books 0 07-07-2011 04:34 PM
Other Non-Fiction Cicero, M. Tullius: Orationes (Scriptorum Classicorum Bibl. Oxon.). V1. 7 Jul 2011 darseno ePub Books 0 07-07-2011 04:10 PM
Philosophy Eliot, Charles W. (editor): Harvard Classics 09: Cicero & Pliny. v1. 27 July 07 RWood Kindle Books 1 03-09-2009 06:57 PM
Philosophy Eliot, Charles W. (editor): Harvard Classics 09: Cicero & Pliny. v1, 13 June 07 RWood BBeB/LRF Books 0 06-13-2007 08:20 PM


All times are GMT -4. The time now is 12:32 PM.


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