diff --git a/resources/images/news/emg_en.png b/resources/images/news/emg_en.png new file mode 100644 index 0000000000..74930f2b64 Binary files /dev/null and b/resources/images/news/emg_en.png differ diff --git a/resources/images/news/emg_rs.recipe b/resources/images/news/emg_rs.recipe new file mode 100644 index 0000000000..74930f2b64 Binary files /dev/null and b/resources/images/news/emg_rs.recipe differ diff --git a/resources/recipes/emg_en.recipe b/resources/recipes/emg_en.recipe new file mode 100644 index 0000000000..fc76dc2c97 --- /dev/null +++ b/resources/recipes/emg_en.recipe @@ -0,0 +1,45 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +emg.rs/en/news +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class emportal_en(BasicNewsRecipe): + title = 'Ekonom:east News' + __author__ = 'Darko Miletic' + description = 'Daily business news from Serbia.' + publisher = 'Ekonom:east Media Group' + category = 'Business, SEE, Serbia, Belgrade, news, Ekonomist, EMportal' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'en' + remove_empty_feeds = True + masthead_url = 'http://www.emg.rs/img/emportal-rss.png' + extra_css = ' body{font-family: Arial,Helvetica,sans-serif } ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + remove_tags = [dict(attrs={'class':['text-share']})] + keep_only_tags = [dict(attrs={'class':'text'})] + remove_tags_after = dict(attrs={'class':'text-share'}) + remove_attributes = ['width','height'] + + feeds = [(u'Serbia' , u'http://www.emg.rs/en/news/serbia/rss.xml')] + + def print_version(self, url): + return url.replace('.html','.print.html') + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup diff --git a/resources/recipes/emg_rs.recipe b/resources/recipes/emg_rs.recipe new file mode 100644 index 0000000000..7dfc0769ce --- /dev/null +++ b/resources/recipes/emg_rs.recipe @@ -0,0 +1,51 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +emg.rs/vesti +''' + +import re +from calibre.web.feeds.news import BasicNewsRecipe + +class emportal_rs(BasicNewsRecipe): + title = 'Ekonom:east Vesti' + __author__ = 'Darko Miletic' + description = 'Vasa dnevna doza poslovnih informacija iz Srbije, regiona i sveta. Vesti, Berze, Dogadaji, Casopisi.' + publisher = 'Ekonom:east Media Group' + category = 'Ekonom:east Media Group, Ekonomist, Budelar, Bankar, EMportal, Preduzeca, Moja Posla, EU praktikum, ekonomija, Srbija, Beograd, investicije, finansije, energetika, berza' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'sr' + remove_empty_feeds = True + masthead_url = 'http://www.emg.rs/img/emportal-rss.png' + extra_css = ' @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: Arial,Helvetica,sans1,sans-serif } .article_description{font-family: sans1, sans-serif} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')] + remove_tags = [dict(attrs={'class':['text-share']})] + keep_only_tags = [dict(attrs={'class':'text'})] + remove_tags_after = dict(attrs={'class':'text-share'}) + remove_attributes = ['width','height'] + + feeds = [ + (u'Srbija' , u'http://www.emg.rs/vesti/srbija/rss.xml') + ,(u'Region' , u'http://www.emg.rs/vesti/region/rss.xml') + ,(u'Svet' , u'http://www.emg.rs/vesti/svet/rss.xml' ) + ] + + def print_version(self, url): + return url.replace('.html','.print.html') + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup