diff --git a/recipes/astroflesz.recipe b/recipes/astroflesz.recipe new file mode 100644 index 0000000000..0b92fdfa29 --- /dev/null +++ b/recipes/astroflesz.recipe @@ -0,0 +1,19 @@ +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai +from calibre.web.feeds.news import BasicNewsRecipe + +class Astroflesz(BasicNewsRecipe): + title = u'Astroflesz' + oldest_article = 7 + __author__ = 'fenuks' + description = u'astroflesz.pl - to portal poświęcony astronomii. Informuje zarówno o aktualnych wydarzeniach i odkryciach naukowych, jak również zapowiada ciekawe zjawiska astronomiczne' + category = 'astronomy' + language = 'pl' + cover_url = 'http://www.astroflesz.pl/templates/astroflesz/images/logo/logo.png' + ignore_duplicate_articles = {'title', 'url'} + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + keep_only_tags = [dict(id="k2Container")] + remove_tags_after = dict(name='div', attrs={'class':'itemLinks'}) + remove_tags = [dict(name='div', attrs={'class':['itemLinks', 'itemToolbar', 'itemRatingBlock']})] + feeds = [(u'Wszystkie', u'http://astroflesz.pl/?format=feed')] diff --git a/recipes/czas_gentlemanow.recipe b/recipes/czas_gentlemanow.recipe new file mode 100644 index 0000000000..6df677f25f --- /dev/null +++ b/recipes/czas_gentlemanow.recipe @@ -0,0 +1,20 @@ +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai +from calibre.web.feeds.news import BasicNewsRecipe + +class CzasGentlemanow(BasicNewsRecipe): + title = u'Czas Gentlemanów' + __author__ = 'fenuks' + description = u'Historia mężczyzn z dala od wielkiej polityki' + category = 'blog' + language = 'pl' + cover_url = 'http://czasgentlemanow.pl/wp-content/uploads/2012/10/logo-Czas-Gentlemanow1.jpg' + ignore_duplicate_articles = {'title', 'url'} + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + remove_empty_feeds = True + use_embedded_content = False + keep_only_tags = [dict(name='div', attrs={'class':'content'})] + remove_tags = [dict(attrs={'class':'meta_comments'})] + remove_tags_after = dict(name='div', attrs={'class':'fblikebutton_button'}) + feeds = [(u'M\u0119ski \u015awiat', u'http://czasgentlemanow.pl/category/meski-swiat/feed/'), (u'Styl', u'http://czasgentlemanow.pl/category/styl/feed/'), (u'Vademecum Gentlemana', u'http://czasgentlemanow.pl/category/vademecum/feed/'), (u'Dom i rodzina', u'http://czasgentlemanow.pl/category/dom-i-rodzina/feed/'), (u'Honor', u'http://czasgentlemanow.pl/category/honor/feed/'), (u'Gad\u017cety Gentlemana', u'http://czasgentlemanow.pl/category/gadzety-gentlemana/feed/')] diff --git a/recipes/ekologia_pl.recipe b/recipes/ekologia_pl.recipe new file mode 100644 index 0000000000..2b0933b58d --- /dev/null +++ b/recipes/ekologia_pl.recipe @@ -0,0 +1,24 @@ +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai +from calibre.web.feeds.news import BasicNewsRecipe +import re +class EkologiaPl(BasicNewsRecipe): + title = u'Ekologia.pl' + __author__ = 'fenuks' + description = u'Portal ekologiczny - eko, ekologia, ochrona przyrody, ochrona środowiska, przyroda, środowisko online. Ekologia i ochrona środowiska. Ekologia dla dzieci.' + category = 'ecology' + language = 'pl' + cover_url = 'http://www.ekologia.pl/assets/images/logo/ekologia_pl_223x69.png' + ignore_duplicate_articles = {'title', 'url'} + extra_css = '.title {font-size: 200%;}' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + remove_empty_feeds = True + use_embedded_content = False + remove_tags = [dict(attrs={'class':['ekoLogo', 'powrocArt', 'butonDrukuj']})] + + feeds = [(u'Wiadomo\u015bci', u'http://www.ekologia.pl/rss/20,53,0'), (u'\u015arodowisko', u'http://www.ekologia.pl/rss/20,56,0'), (u'Styl \u017cycia', u'http://www.ekologia.pl/rss/20,55,0')] + + def print_version(self, url): + id = re.search(r',(?P\d+)\.html', url).group('id') + return 'http://drukuj.ekologia.pl/artykul/' + id diff --git a/recipes/film_org_pl.recipe b/recipes/film_org_pl.recipe new file mode 100644 index 0000000000..442e273b1b --- /dev/null +++ b/recipes/film_org_pl.recipe @@ -0,0 +1,19 @@ +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai +from calibre.web.feeds.news import BasicNewsRecipe +import re +class FilmOrgPl(BasicNewsRecipe): + title = u'Film.org.pl' + __author__ = 'fenuks' + description = u"Recenzje, analizy, artykuły, rankingi - wszystko o filmie dla miłośników kina. Opisy efektów specjalnych, wersji reżyserskich, remake'ów, sequeli. No i forum filmowe. Jedne z największych w Polsce." + category = 'film' + language = 'pl' + cover_url = 'http://film.org.pl/wp-content/themes/KMF/images/logo_kmf10.png' + ignore_duplicate_articles = {'title', 'url'} + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + remove_empty_feeds = True + use_embedded_content = True + preprocess_regexps = [(re.compile(ur'

Przeczytaj także:

.*', re.IGNORECASE|re.DOTALL), lambda m: ''), (re.compile(ur'
Artykuł
', re.IGNORECASE), lambda m: ''), (re.compile(ur'
Ludzie filmu
', re.IGNORECASE), lambda m: '')] + remove_tags = [dict(name='img', attrs={'alt':['Ludzie filmu', u'Artykuł']})] + feeds = [(u'Recenzje', u'http://film.org.pl/r/recenzje/feed/'), (u'Artyku\u0142', u'http://film.org.pl/a/artykul/feed/'), (u'Analiza', u'http://film.org.pl/a/analiza/feed/'), (u'Ranking', u'http://film.org.pl/a/ranking/feed/'), (u'Blog', u'http://film.org.pl/kmf/blog/feed/'), (u'Ludzie', u'http://film.org.pl/a/ludzie/feed/'), (u'Seriale', u'http://film.org.pl/a/seriale/feed/'), (u'Oceanarium', u'http://film.org.pl/a/ocenarium/feed/'), (u'VHS', u'http://film.org.pl/a/vhs-a/feed/')] diff --git a/recipes/icons/astroflesz.png b/recipes/icons/astroflesz.png new file mode 100644 index 0000000000..37a9e21675 Binary files /dev/null and b/recipes/icons/astroflesz.png differ diff --git a/recipes/icons/czas_gentlemanow.png b/recipes/icons/czas_gentlemanow.png new file mode 100644 index 0000000000..0d20f80c05 Binary files /dev/null and b/recipes/icons/czas_gentlemanow.png differ diff --git a/recipes/icons/ekologia_pl.png b/recipes/icons/ekologia_pl.png new file mode 100644 index 0000000000..797421420d Binary files /dev/null and b/recipes/icons/ekologia_pl.png differ diff --git a/recipes/icons/poradnia_pwn.png b/recipes/icons/poradnia_pwn.png new file mode 100644 index 0000000000..6cafb534fc Binary files /dev/null and b/recipes/icons/poradnia_pwn.png differ diff --git a/recipes/icons/tvp_info.png b/recipes/icons/tvp_info.png new file mode 100644 index 0000000000..1414f38d5c Binary files /dev/null and b/recipes/icons/tvp_info.png differ diff --git a/recipes/icons/zaufana_trzecia_strona.png b/recipes/icons/zaufana_trzecia_strona.png new file mode 100644 index 0000000000..cdaeb95d27 Binary files /dev/null and b/recipes/icons/zaufana_trzecia_strona.png differ diff --git a/recipes/poradnia_pwn.recipe b/recipes/poradnia_pwn.recipe new file mode 100644 index 0000000000..ac2c81a5d0 --- /dev/null +++ b/recipes/poradnia_pwn.recipe @@ -0,0 +1,64 @@ +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai +from calibre.web.feeds.news import BasicNewsRecipe +import re +class PoradniaPWN(BasicNewsRecipe): + title = u'Poradnia Językowa PWN' + __author__ = 'fenuks' + description = u'Internetowa poradnia językowa Wydawnictwa Naukowego PWN. Poradnię prowadzi Redaktor Naczelny Słowników Języka Polskiego, prof. Mirosław Bańko. Pomagają mu eksperci - znani polscy językoznawcy. Współpracuje z nami m.in. prof. Jerzy Bralczyk oraz dr Jan Grzenia.' + category = 'language' + language = 'pl' + #cover_url = '' + oldest_article = 14 + max_articles_per_feed = 100000 + INDEX = "http://poradnia.pwn.pl/" + no_stylesheets = True + remove_attributes = ['style'] + remove_javascript = True + use_embedded_content = False + #preprocess_regexps = [(re.compile('', re.IGNORECASE), lambda m: ''), (re.compile('', re.IGNORECASE), lambda m: '')] + keep_only_tags = [dict(name="div", attrs={"class":"searchhi"})] + feeds = [(u'Poradnia', u'http://rss.pwn.pl/poradnia.rss')] + + '''def find_articles(self, url): + articles = [] + soup=self.index_to_soup(url) + counter = int(soup.find(name='p', attrs={'class':'count'}).findAll('b')[-1].string) + counter = 500 + pos = 0 + next = url + while next: + soup=self.index_to_soup(next) + tag=soup.find(id="listapytan") + art=tag.findAll(name='li') + for i in art: + if i.h4: + title=i.h4.a.string + url=self.INDEX+i.h4.a['href'] + #date=soup.find(id='footer').ul.li.string[41:-1] + articles.append({'title' : title, + 'url' : url, + 'date' : '', + 'description' : '' + }) + pos += 10 + if not pos >=counter: + next = 'http://poradnia.pwn.pl/lista.php?kat=18&od=' + str(pos) + print u'Tworzenie listy artykułów dla', next + else: + next = None + print articles + return articles + + def parse_index(self): + feeds = [] + feeds.append((u"Poradnia", self.find_articles('http://poradnia.pwn.pl/lista.php'))) + + return feeds''' + + def preprocess_html(self, soup): + for i in soup.findAll(name=['ul', 'li']): + i.name="div" + for z in soup.findAll(name='a'): + if not z['href'].startswith('http'): + z['href'] = 'http://poradnia.pwn.pl/' + z['href'] + return soup diff --git a/recipes/tvp_info.recipe b/recipes/tvp_info.recipe new file mode 100644 index 0000000000..64528d4194 --- /dev/null +++ b/recipes/tvp_info.recipe @@ -0,0 +1,20 @@ +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai +from calibre.web.feeds.news import BasicNewsRecipe +class TVPINFO(BasicNewsRecipe): + title = u'TVP.INFO' + __author__ = 'fenuks' + description = u'Serwis informacyjny TVP.INFO' + category = 'news' + language = 'pl' + cover_url = 'http://s.v3.tvp.pl/files/tvp-info/gfx/logo.png' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + remove_empty_feeds = True + remove_javascript = True + use_embedded_content = False + ignore_duplicate_articles = {'title', 'url'} + keep_only_tags = [dict(id='contentNews')] + remove_tags = [dict(attrs={'class':['toolbox', 'modulBox read', 'modulBox social', 'videoPlayerBox']}), dict(id='belka')] + feeds = [(u'Wiadomo\u015bci', u'http://tvp.info/informacje?xslt=tvp-info/news/rss.xslt&src_id=191865'), + (u'\u015awiat', u'http://tvp.info/informacje/swiat?xslt=tvp-info/news/rss.xslt&src_id=191867'), (u'Biznes', u'http://tvp.info/informacje/biznes?xslt=tvp-info/news/rss.xslt&src_id=191868'), (u'Nauka', u'http://tvp.info/informacje/nauka?xslt=tvp-info/news/rss.xslt&src_id=191870'), (u'Kultura', u'http://tvp.info/informacje/kultura?xslt=tvp-info/news/rss.xslt&src_id=191869'), (u'Rozmaito\u015bci', u'http://tvp.info/informacje/rozmaitosci?xslt=tvp-info/news/rss.xslt&src_id=191872'), (u'Opinie', u'http://tvp.info/opinie?xslt=tvp-info/news/rss.xslt&src_id=191875'), (u'Komentarze', u'http://tvp.info/opinie/komentarze?xslt=tvp-info/news/rss.xslt&src_id=238200'), (u'Wywiady', u'http://tvp.info/opinie/wywiady?xslt=tvp-info/news/rss.xslt&src_id=236644')] diff --git a/recipes/zaufana_trzecia_strona.recipe b/recipes/zaufana_trzecia_strona.recipe new file mode 100644 index 0000000000..13e7d98cce --- /dev/null +++ b/recipes/zaufana_trzecia_strona.recipe @@ -0,0 +1,16 @@ +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai +from calibre.web.feeds.news import BasicNewsRecipe +class ZTS(BasicNewsRecipe): + title = u'Zaufana Trzecia Strona' + __author__ = 'fenuks' + description = u'Niezależne źródło wiadomości o świecie bezpieczeństwa IT' + category = 'IT, security' + language = 'pl' + cover_url = 'http://www.zaufanatrzeciastrona.pl/wp-content/uploads/2012/08/z3s_h100.png' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + remove_empty_feeds = True + keep_only_tags = [dict(name='div', attrs={'class':'post postcontent'})] + remove_tags = [dict(name='div', attrs={'class':'dolna-ramka'})] + feeds = [(u'Strona g\u0142\xf3wna', u'http://feeds.feedburner.com/ZaufanaTrzeciaStronaGlowna'), (u'Drobiazgi', u'http://feeds.feedburner.com/ZaufanaTrzeciaStronaDrobiazgi')] diff --git a/src/calibre/ebooks/pdf/render/engine.py b/src/calibre/ebooks/pdf/render/engine.py index 496dca1cd0..216b612104 100644 --- a/src/calibre/ebooks/pdf/render/engine.py +++ b/src/calibre/ebooks/pdf/render/engine.py @@ -202,8 +202,9 @@ class PdfEngine(QPaintEngine): @property def features(self): - # TODO: Remove unsupported features from this - return QPaintEngine.AllFeatures + return (QPaintEngine.Antialiasing | QPaintEngine.PainterPaths | + QPaintEngine.PaintOutsidePaintEvent | QPaintEngine.PorterDuff | + QPaintEngine.PrimitiveTransform) def begin(self, device): try: