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 10-13-2013, 09:52 AM   #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,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Carta [DE] update

Kovid,
It looks like Carta had a little coding change on the print page. I made a small update for this recipe to get rid of the footer.


Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'

'''
Fetch Carta.info.
'''

from calibre.web.feeds.news import BasicNewsRecipe


class Carta(BasicNewsRecipe):

    title = u'Carta'
    description = 'News about electronic publishing'
    __author__ = 'Oliver Niesner' # AGe Update 2013-10-13
    use_embedded_content   = False
    timefmt = ' [%a %d %b %Y]'
    oldest_article = 7
    max_articles_per_feed = 50
    no_stylesheets = True
    remove_javascript = True
    #html2epub_options = 'linearize_tables = True\nbase_font_size2=14'
    encoding = 'utf-8'
    language = 'de'



    remove_tags_after = [dict(name='div', attrs={'id':'BlogContent'})] # AGe 2013-10-13

    remove_tags = [dict(name='p', attrs={'class':'print'}),
                   dict(name='p', attrs={'class':'tags-blog'}),
                   dict(name='p', attrs={'class':'mail'}),
                   dict(name='p', attrs={'style':'text-align: center;'}),
                   dict(name='p', attrs={'align':'left'}),
                   dict(name='p', attrs={'class':'date'}),
                   dict(id='comments'),
                   dict(id='headerleft'),
                   dict(id='subnav'),
                   dict(id='headerright')]


    feeds =  [ (u'Carta', u'http://feeds2.feedburner.com/carta-standard-rss') ]


    def print_version(self, url):
        return url + 'print/'
Attached Files
File Type: zip Carta_AGE 2013-10-13.zip (781 Bytes, 246 views)
Divingduck is offline   Reply With Quote
Old 07-15-2014, 03:28 PM   #2
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,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Kovid,
an update for Carta recipe.

Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'

'''
Fetch Carta.info.
'''

from calibre.web.feeds.news import BasicNewsRecipe


class Carta(BasicNewsRecipe):

    title           = u'Carta'
    description     = 'News about electronic publishing'
    __author__      = 'Armin Geller' # AGe Update 2014-07-15
    
    timefmt                = ' [%a %d %b %Y]'
    oldest_article         = 7
    max_articles_per_feed  = 50
    #no_stylesheets        = True
    #use_embedded_content  = False
    remove_javascript      = True
    encoding               = 'utf-8'
    language               = 'de'

    cover_source   = 'http://carta.info/carta/wp-content/uploads/2012/09/gross.jpg'
    masthead_url   = 'http://www.carta.info/carta/wp-content/themes/carta4/images/logo.png'
    extra_css      =  '''
                      h2 {font-size: 1.3em; font-style: italic}
                      .excerpt {font-size: 1.2em; font-style: italic}
                      '''

    keep_only_tags = [
                       dict(name='div', attrs={'class':'postarea'}),
                      ]

    remove_tags_after = [
                          dict(name='div', attrs={'class':'the-content'})
                         ]

    remove_tags = [
                   dict(name='div', attrs={'id':['header', 'subnavbar']}),
                   dict(name='div', attrs={'addthis':'title'}),
                   dict(name='p', attrs={'class':'print'}),
                   dict(name='div', attrs={'style':'clear: both;'}),
                   ]


    feeds =  [ (u'Carta', u'http://feeds2.feedburner.com/carta-standard-rss') ]
Attached Files
File Type: rar Carta_AGE 2014-07-15.rar (813 Bytes, 178 views)
Divingduck is offline   Reply With Quote
Advert
Old 09-28-2014, 06:54 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,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Pls. find attached a new update due to changes of the article layout

Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'

'''
Fetch Carta.info.
'''

from calibre.web.feeds.news import BasicNewsRecipe


class Carta(BasicNewsRecipe):

    title           = u'Carta'
    description     = 'News about electronic publishing'
    __author__      = 'Armin Geller' # AGe Update 2014-09-28
    
    timefmt                = ' [%a %d %b %Y]'
    oldest_article         = 7
    max_articles_per_feed  = 50
    no_stylesheets        = True
    #use_embedded_content  = False
    remove_javascript      = True
    encoding               = 'utf-8'
    language               = 'de'

    cover_url   = 'http://carta.info/carta/wp-content/uploads/2012/09/gross.jpg'
    #masthead_url   = 'http://www.carta.info/carta/wp-content/themes/carta4/images/logo.png'
    masthead_url   ='http://upload.wikimedia.org/wikipedia/de/b/ba/Carta_logo.png' 
    extra_css      =  '''
                      h2 {font-size: 1.3em; font-style: italic}
                      .excerpt {font-size: 1.2em; font-style: italic}
                      '''

    keep_only_tags = [
                       dict(name='div', attrs={'class':['article-text','author']}),
                       dict(name='p', attrs={'class':'tags'}),
                      ]

    remove_tags = [
                   dict(name='ul', attrs={'class':'meta'}),
                   ]


    feeds =  [ (u'Carta', u'http://feeds2.feedburner.com/carta-standard-rss') ]
Attached Files
File Type: zip Carta_AGE 2014-09-29.zip (805 Bytes, 233 views)
Divingduck is offline   Reply With Quote
Old 09-01-2017, 05:25 PM   #4
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,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Please find attached a new update.

Spoiler:
Code:
#!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe
__license__   = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net, Armin Geller>'

class Carta(BasicNewsRecipe):
    # Update 2017-09-01
    # Armin Geller

    title           = u'Carta'
    description     = 'Authors blog for politics, economics and digital community'
    __author__      = 'Armin Geller' # AGe Update 2017-09-01
    
    timefmt                = ' [%a %d %b %Y]'
    oldest_article         = 14
    max_articles_per_feed  = 50
    no_stylesheets        = True
    #use_embedded_content  = False
    remove_javascript      = True
    remove_empty_feeds     = True
    encoding               = 'utf-8'
    language               = 'de'

    cover_url      ='http://www.carta.info/wp-content/themes/carta2014/img/carta-logo.svg' # AGe Update 2014-10-05 new cover
    masthead_url   ='http://upload.wikimedia.org/wikipedia/de/b/ba/Carta_logo.png'
#    masthead_url   ='http://www.carta.info/wp-content/themes/carta2014/img/carta-logo.svg'
    extra_css      =  '''
                      h2 {font-size: 1.3em; font-style: italic}
                      .excerpt {font-size: 1.2em; font-style: italic}
                      '''

    keep_only_tags = [
                       dict(name='div', attrs={'class':['article-text','author']}),
                       dict(name='p', attrs={'class':'tags'}),
                      ]

    remove_tags = [
                   dict(name='ul', attrs={'class':'meta'}),
                   ]


    feeds =  [ (u'CARTA - Standard', u'http://feeds2.feedburner.com/carta-standard-rss'),
               (u'CARTA - Homepage', u'http://feeds2.feedburner.com/carta-homepage-rss'),
               (u'CARTA - Agenda',u'http://feeds2.feedburner.com/carta-agenda-rss'),
               (u'CARTA - Ökonomie',u'http://feeds2.feedburner.com/carta-oekonomie-rss'),
               (u'CARTA - Medien',u'http://feeds2.feedburner.com/carta-medien-rss'),
              ]
Attached Files
File Type: zip Carta_AGE 2017-09-01.zip (972 Bytes, 157 views)
Divingduck is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The secret behind the new Paperwhite: E Ink Carta Alexander Turcic News 86 09-23-2013 12:25 AM
won't update...after completing the update cycle edge returns to the first screen WeAreBorrg enTourage Archive 2 03-18-2011 06:39 PM
How can I update creation time for a title when I update the book info or convert it setherd Calibre 3 10-30-2010 01:51 PM
Firmware Update Can I reinstall the official amazon update after the update file from this site ? yuenslhk Amazon Kindle 2 06-20-2010 11:24 AM
PRS-500 What file to change to re-update reader with latest update? pitolee Sony Reader Dev Corner 2 05-24-2007 11:56 PM


All times are GMT -4. The time now is 04:57 PM.


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