From 60bbd5ac25f349ac135fd909f1e2c6e1b0c16775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 16 Oct 2017 22:56:32 +0200 Subject: [PATCH 1/3] removing biweekly recipe latest article is from 2015 --- recipes/biweekly.recipe | 52 ------------------------------------- recipes/icons/biweekly.png | Bin 355 -> 0 bytes 2 files changed, 52 deletions(-) delete mode 100644 recipes/biweekly.recipe delete mode 100644 recipes/icons/biweekly.png diff --git a/recipes/biweekly.recipe b/recipes/biweekly.recipe deleted file mode 100644 index 09b7af5bcd..0000000000 --- a/recipes/biweekly.recipe +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -__license__ = 'GPL v3' -__copyright__ = u'Łukasz Grąbczewski 2011' -__version__ = '2.0' - -import re -import os -from calibre import walk -from calibre.utils.zipfile import ZipFile -from calibre.ptempfile import PersistentTemporaryFile -from calibre.web.feeds.news import BasicNewsRecipe - - -class biweekly(BasicNewsRecipe): - __author__ = u'Łukasz Grąbczewski' - title = 'Biweekly' - language = 'en_PL' - publisher = 'National Audiovisual Institute' - publication_type = 'magazine' - description = u'link with culture [English edition of Polish magazine]: literature, theatre, film, art, music, views, talks' - - conversion_options = { - 'authors': 'Biweekly.pl', 'publisher': publisher, 'language': language, 'comments': description, 'no_default_epub_cover': True, 'preserve_cover_aspect_ratio': True # noqa - } - - def build_index(self): - browser = self.get_browser() - browser.open('http://www.biweekly.pl/') - - # find the link - epublink = browser.find_link(text_regex=re.compile('EPUB')) - - # download ebook - self.report_progress(0, _('Downloading ePUB')) - response = browser.follow_link(epublink) - book_file = PersistentTemporaryFile(suffix='.epub') - book_file.write(response.read()) - book_file.close() - - # convert - self.report_progress(0.2, _('Converting to OEB')) - oeb = self.output_dir + '/INPUT/' - if not os.path.exists(oeb): - os.makedirs(oeb) - with ZipFile(book_file.name) as f: - f.extractall(path=oeb) - - for f in walk(oeb): - if f.endswith('.opf'): - return f diff --git a/recipes/icons/biweekly.png b/recipes/icons/biweekly.png deleted file mode 100644 index cef9c4df3219cfbba47bc9fe26ca424d0ce66e83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 355 zcmV-p0i6DcP)c@0b(}LREW>|dU}B(_%!_a^QXF^5~8}jwGF75 zfQG8_3W!UlO`Qr6#i!x!-Mc`gKsh}v?eLJ$h)@tJ$}hmF;o^l0m=R=RV2IC2JGbwc zH)rm=xpU{wod-cXwr#(9_3Dgi(}A%>dEz4x0080fA}e^YvGo7|002ovPDHLkV1i}8 Bq;dcN From f4e1244803f7f840cf26c50ab651d45e7d683b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 16 Oct 2017 23:06:33 +0200 Subject: [PATCH 2/3] removing overclock.pl recipe no new content since 2016 --- recipes/icons/overclock_pl.png | Bin 634 -> 0 bytes recipes/overclock_pl.recipe | 30 ------------------------------ 2 files changed, 30 deletions(-) delete mode 100644 recipes/icons/overclock_pl.png delete mode 100644 recipes/overclock_pl.recipe diff --git a/recipes/icons/overclock_pl.png b/recipes/icons/overclock_pl.png deleted file mode 100644 index 20a3a0049b7fe6ce8a13d23cf975070a95f4cec0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 634 zcmV-=0)_pFP)+TqK+5Yte1z|ChIkC;-T6jF11JDOMm2Un(Y-C=f@B{C zoRPXChK;YxPb|{v?+F130P1fCr`))Y@{6z=a0Z`A<&<&bVA^%;3MxPWh_ku8RPq5s*{S9^BncD%Oby*eEGH+l$9$?1<9OTHFCOg5%A>g4 zO;(Q7u|MDH@SZg8wp^^`v7Ur1KmlabXmz!Y%TMaKybRl>_gpMxy0+-Iehzgl#>KvF z?C-@t1yBHBxtQIm{d@!N+I9clX!SWMcjM4s2}$(J*`(Da2%rE0#^u)cwO_o2Q?0f` zWiox|=JoZ*`}yYQsZ2$`b#e33yVrKTb}bKomentarze do aktualności:.*?', re.DOTALL), - lambda match: ''), (re.compile(ur'

Nawigacja

', re.DOTALL), lambda match: '')] - keep_only_tags = [ - dict(name='div', attrs={'class': 'news'}), dict(id='articleContent')] - remove_tags = [dict(name='span', attrs={'class': 'info'}), dict( - attrs={'class': 'shareit'})] - feeds = [(u'Aktualno\u015bci', u'http://www.overclock.pl/rss.news.xml'), - (u'Testy i recenzje', u'http://www.overclock.pl/rss.articles.xml')] - - def print_version(self, url): - if 'articles/show' in url: - return url.replace('show', 'showall') - else: - return url From 55dfcdedeb25306f3c7fece2169900bd78751e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 16 Oct 2017 23:15:03 +0200 Subject: [PATCH 3/3] fix recipe --- recipes/lomza.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/lomza.recipe b/recipes/lomza.recipe index 0d7c3c8874..9b0f559586 100644 --- a/recipes/lomza.recipe +++ b/recipes/lomza.recipe @@ -13,5 +13,5 @@ class Lomza(BasicNewsRecipe): max_articles_per_feed = 100 remove_tags = [ dict(name='div', attrs={'class': ['bxbanner', 'drukuj', 'wyslijznajomemu']})] - keep_only_tags = [dict(name='div', attrs={'class': 'wiadomosc'})] + keep_only_tags = [dict(name='div', attrs={'id': 'srodek'})] feeds = [(u'Łomża', u'http://feeds.feedburner.com/4lomza.pl')]