diff --git a/recipes/app_funds.recipe b/recipes/app_funds.recipe new file mode 100644 index 0000000000..d5734fc451 --- /dev/null +++ b/recipes/app_funds.recipe @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__author__ = 'teepel ' + +''' +appfunds.blogspot.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class app_funds(BasicNewsRecipe): + title = u'APP Funds' + __author__ = 'teepel ' + language = 'pl' + description ='Blog inwestora dla inwestorów i oszczędzających' + INDEX='http://appfunds.blogspot.com' + remove_empty_feeds= True + oldest_article = 7 + max_articles_per_feed = 100 + simultaneous_downloads = 5 + remove_javascript=True + no_stylesheets=True + auto_cleanup = True + + feeds = [(u'blog', u'http://feeds.feedburner.com/blogspot/etVI')] + diff --git a/recipes/fronda.recipe b/recipes/fronda.recipe index 06b86d83bb..6755770329 100644 --- a/recipes/fronda.recipe +++ b/recipes/fronda.recipe @@ -23,6 +23,7 @@ class Fronda(BasicNewsRecipe): extra_css = ''' h1 {font-size:150%} .body {text-align:left;} + div.headline {font-weight:bold} ''' earliest_date = date.today() - timedelta(days=oldest_article) diff --git a/recipes/icons/adventure_zone_pl.png b/recipes/icons/adventure_zone_pl.png index bfa597c39c..32488eb74e 100644 Binary files a/recipes/icons/adventure_zone_pl.png and b/recipes/icons/adventure_zone_pl.png differ diff --git a/recipes/icons/app_funds.png b/recipes/icons/app_funds.png new file mode 100644 index 0000000000..98a8b2b5d9 Binary files /dev/null and b/recipes/icons/app_funds.png differ diff --git a/recipes/icons/ekundelek_pl.png b/recipes/icons/ekundelek_pl.png new file mode 100644 index 0000000000..5117245f55 Binary files /dev/null and b/recipes/icons/ekundelek_pl.png differ diff --git a/recipes/icons/gosc_niedzielny.png b/recipes/icons/gosc_niedzielny.png new file mode 100644 index 0000000000..9f7c9ed350 Binary files /dev/null and b/recipes/icons/gosc_niedzielny.png differ diff --git a/recipes/icons/kp.png b/recipes/icons/kp.png new file mode 100644 index 0000000000..6cdf52104d Binary files /dev/null and b/recipes/icons/kp.png differ diff --git a/recipes/icons/samcik_blox.png b/recipes/icons/samcik_blox.png new file mode 100644 index 0000000000..b9f231785f Binary files /dev/null and b/recipes/icons/samcik_blox.png differ diff --git a/recipes/kp.recipe b/recipes/kp.recipe new file mode 100644 index 0000000000..f52fcef60b --- /dev/null +++ b/recipes/kp.recipe @@ -0,0 +1,52 @@ + +from calibre.web.feeds.news import BasicNewsRecipe + +class KrytykaPolitycznaRecipe(BasicNewsRecipe): + __license__ = 'GPL v3' + __author__ = u'intromatyk ' + language = 'pl' + version = 1 + + title = u'Krytyka Polityczna' + category = u'News' + description = u' Lewicowe pismo zaangażowane w bieg spraw publicznych w Polsce.' + cover_url='' + remove_empty_feeds= True + no_stylesheets=True + oldest_article = 7 + max_articles_per_feed = 100000 + recursions = 0 + + no_stylesheets = True + remove_javascript = True + simultaneous_downloads = 3 + + keep_only_tags =[] + keep_only_tags.append(dict(name = 'h1', attrs = {'class' : 'print-title'})) + keep_only_tags.append(dict(name = 'div', attrs = {'class' : 'print-content'})) + + remove_tags =[] + remove_tags.append(dict(attrs = {'class' : ['field field-type-text field-field-story-switch', 'field field-type-filefield field-field-story-temp' , 'field field-type-text field-field-story-author', 'field field-type-text field-field-story-lead-switch']})) + + extra_css = ''' + body {font-family: verdana, arial, helvetica, geneva, sans-serif ;} + td.contentheading{font-size: large; font-weight: bold;} + ''' + + feeds = [ + ('Wszystkie', 'http://www.krytykapolityczna.pl/rss.xml') + ] + + def print_version(self, url): + soup = self.index_to_soup(url) + print_ico = soup.find(attrs = {'class' : 'print-page'}) + print_uri = print_ico['href'] + self.log('PRINT', print_uri) + return 'http://www.krytykapolityczna.pl/' + print_uri + + def preprocess_html(self, soup): + for alink in soup.findAll('a'): + if alink.string is not None: + tstr = alink.string + alink.replaceWith(tstr) + return soup diff --git a/recipes/newsweek_polska.recipe b/recipes/newsweek_polska.recipe index b1d6359d11..ec50e0f438 100644 --- a/recipes/newsweek_polska.recipe +++ b/recipes/newsweek_polska.recipe @@ -13,7 +13,7 @@ import datetime class Newsweek(BasicNewsRecipe): # how many issues to go back, 0 means get the most current one - BACK_ISSUES = 1 + BACK_ISSUES = 2 EDITION = '0' DATE = None diff --git a/recipes/samcik_blox.recipe b/recipes/samcik_blox.recipe new file mode 100644 index 0000000000..69bb836c76 --- /dev/null +++ b/recipes/samcik_blox.recipe @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__author__ = 'teepel ' + +''' +samcik.blox.pl +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class samcik(BasicNewsRecipe): + title = u'Maciej Samcik Blog' + __author__ = 'teepel ' + language = 'pl' + description =u'Blog Macieja Samcika, długoletniego dziennikarza ekonomicznego Gazety Wyborczej . O finansach małych i dużych. Mnóstwo ciekawostek na temat pieniędzy.' + oldest_article = 7 + max_articles_per_feed = 100 + remove_javascript=True + no_stylesheets=True + simultaneous_downloads = 3 + + remove_tags =[] + remove_tags.append(dict(name = 'table', attrs = {'border' : '0'})) + + feeds = [(u'Wpisy', u'http://samcik.blox.pl/rss2')] diff --git a/src/calibre/gui2/main_window.py b/src/calibre/gui2/main_window.py index 088ea53ad0..9646211750 100644 --- a/src/calibre/gui2/main_window.py +++ b/src/calibre/gui2/main_window.py @@ -7,9 +7,8 @@ __copyright__ = '2008, Kovid Goyal ' import StringIO, traceback, sys, gc -from PyQt4.Qt import QMainWindow, QString, Qt, QFont, QTimer, \ - QAction, QMenu, QMenuBar, QIcon, pyqtSignal, QObject -from calibre.gui2.dialogs.conversion_error import ConversionErrorDialog +from PyQt4.Qt import (QMainWindow, QTimer, QAction, QMenu, QMenuBar, QIcon, + pyqtSignal, QObject) from calibre.utils.config import OptionParser from calibre.gui2 import error_dialog from calibre import prints