From 338ab5d211d09eff95ca35a72d987fcb9be0d483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Wed, 6 Mar 2013 20:28:12 +0100 Subject: [PATCH] recipes provided by luka6000 --- recipes/biweekly.recipe | 51 ++++++++++++++++++++++++++++++++++ recipes/dwutygodnik.recipe | 51 ++++++++++++++++++++++++++++++++++ recipes/icons/biweekly.png | Bin 0 -> 603 bytes recipes/icons/dwutygodnik.png | Bin 0 -> 603 bytes recipes/jazzpress.recipe | 50 +++++++++++++++++++++++++++++++++ 5 files changed, 152 insertions(+) create mode 100644 recipes/biweekly.recipe create mode 100644 recipes/dwutygodnik.recipe create mode 100644 recipes/icons/biweekly.png create mode 100644 recipes/icons/dwutygodnik.png create mode 100644 recipes/jazzpress.recipe diff --git a/recipes/biweekly.recipe b/recipes/biweekly.recipe new file mode 100644 index 0000000000..affe0047d2 --- /dev/null +++ b/recipes/biweekly.recipe @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__license__ = 'GPL v3' +__copyright__ = u'Łukasz Grąbczewski 2011' +__version__ = '2.0' + +import re, os +from calibre.ptempfile import PersistentTemporaryFile +from calibre.ebooks.conversion.cli import main + +class biweekly(BasicNewsRecipe): + __author__ = u'Łukasz Grąbczewski' + title = 'Biweekly' + language = 'en_EN' + 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 + } + + def build_index(self): + browser = self.get_browser() + rc = browser.open('http://www.biweekly.pl/') + + # find the link + epublink = browser.find_link(text_regex=re.compile('ePUB VERSION')) + + # 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')) + oebdir = self.output_dir + '/INPUT/' + main(['ebook-convert', book_file.name, oebdir]) + + # feed calibre + index = os.path.join(oebdir, 'content.opf') + + return index diff --git a/recipes/dwutygodnik.recipe b/recipes/dwutygodnik.recipe new file mode 100644 index 0000000000..d2e967d0ac --- /dev/null +++ b/recipes/dwutygodnik.recipe @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__license__ = 'GPL v3' +__copyright__ = u'Łukasz Grąbczewski 2011' +__version__ = '2.0' + +import re, os +from calibre.ptempfile import PersistentTemporaryFile +from calibre.ebooks.conversion.cli import main + +class dwutygodnik(BasicNewsRecipe): + __author__ = u'Łukasz Grąbczewski' + title = 'Dwutygodnik' + language = 'pl_PL' + publisher = 'Narodowy Instytut Audiowizualny' + publication_type = 'magazine' + description = u'Strona Kultury: literatura, teatr, film, sztuka, muzyka, felietony, rozmowy' + + conversion_options = { + 'authors' : 'Dwutygodnik.com' + ,'publisher' : publisher + ,'language' : language + ,'comments' : description + ,'no_default_epub_cover' : True + ,'preserve_cover_aspect_ratio': True + } + + def build_index(self): + browser = self.get_browser() + rc = browser.open('http://www.dwutygodnik.com/') + + # find the link + epublink = browser.find_link(text_regex=re.compile('Wersja 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')) + oebdir = self.output_dir + '/INPUT/' + main(['ebook-convert', book_file.name, oebdir]) + + # feed calibre + index = os.path.join(oebdir, 'content.opf') + + return index diff --git a/recipes/icons/biweekly.png b/recipes/icons/biweekly.png new file mode 100644 index 0000000000000000000000000000000000000000..00356e091d5d65a4738ce58b63e885d02c34ec8f GIT binary patch literal 603 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%9|WRD45bDP46hOx7_4S6Fo+k-*%fF5lsFLJ z6XN>+|NoC4KCD}_X3>HL5ANUp`}gmb&6`)PT)Ae|>Mx%^pFMNN%-BR(UO`<&b=J(8 zCWc1GjvoE>>zA#im8F@vhpVfqqEb^sqq&KxvA%(?m$#p{&#hax&YwG{qoMic&6}w3 zh~Dn*j<&Y4;*wi8Z@M};C&efH`}Z#*G_1X~b<%{1Dhi4hFI?>F>HYKPPjy9Qduv-& zdBwD;Q}5ortEZ(M9ugW68d{WJaPh(g69dDY+jq>HGk4zHx%21F+p%r?)vH%$Oq(wD z(4YtC7se!ScNc~ZR#^`qhqJ&VvKUB%*d7dSC$sHa&K%Ck;oRfUv;S zfZ*pB8@L-9)cU8HO=_6M#^2A!?Bo#M-|imI>v^ET{j`9`LDrrv6+ON_zGojWJriJ$ zRM-*`6?yx{jT^Uao)&oQuK;wC8Lw+i(2;dON2!*$MwFx^mZVxG7o`Fz1|tJQV_gFv zG7T{@ure~UGP2M%Ftjo-c%IUgf}$ZeKP5A*5~RTZs9M*^AjH7f%D~LZ&_LV32&lpQ Ssoo@@1_n=8KbLh*2~7YWao?8! literal 0 HcmV?d00001 diff --git a/recipes/icons/dwutygodnik.png b/recipes/icons/dwutygodnik.png new file mode 100644 index 0000000000000000000000000000000000000000..00356e091d5d65a4738ce58b63e885d02c34ec8f GIT binary patch literal 603 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%9|WRD45bDP46hOx7_4S6Fo+k-*%fF5lsFLJ z6XN>+|NoC4KCD}_X3>HL5ANUp`}gmb&6`)PT)Ae|>Mx%^pFMNN%-BR(UO`<&b=J(8 zCWc1GjvoE>>zA#im8F@vhpVfqqEb^sqq&KxvA%(?m$#p{&#hax&YwG{qoMic&6}w3 zh~Dn*j<&Y4;*wi8Z@M};C&efH`}Z#*G_1X~b<%{1Dhi4hFI?>F>HYKPPjy9Qduv-& zdBwD;Q}5ortEZ(M9ugW68d{WJaPh(g69dDY+jq>HGk4zHx%21F+p%r?)vH%$Oq(wD z(4YtC7se!ScNc~ZR#^`qhqJ&VvKUB%*d7dSC$sHa&K%Ck;oRfUv;S zfZ*pB8@L-9)cU8HO=_6M#^2A!?Bo#M-|imI>v^ET{j`9`LDrrv6+ON_zGojWJriJ$ zRM-*`6?yx{jT^Uao)&oQuK;wC8Lw+i(2;dON2!*$MwFx^mZVxG7o`Fz1|tJQV_gFv zG7T{@ure~UGP2M%Ftjo-c%IUgf}$ZeKP5A*5~RTZs9M*^AjH7f%D~LZ&_LV32&lpQ Ssoo@@1_n=8KbLh*2~7YWao?8! literal 0 HcmV?d00001 diff --git a/recipes/jazzpress.recipe b/recipes/jazzpress.recipe new file mode 100644 index 0000000000..5370a4732d --- /dev/null +++ b/recipes/jazzpress.recipe @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__license__ = 'GPL v3' +__copyright__ = u'Łukasz Grąbczewski 2011-2013' +__version__ = '2.0' + +import re, zipfile, os +from calibre.ptempfile import PersistentTemporaryFile +from calibre.ebooks.conversion.cli import main + +class jazzpress(BasicNewsRecipe): + __author__ = u'Łukasz Grąbczewski' + title = 'JazzPRESS' + language = 'pl' + publisher = 'Fundacja Popularyzacji Muzyki Jazzowej EuroJAZZ' + publication_type = 'magazine' + description = u'Internetowa gazeta poświęcona muzyce improwizowanej' + + conversion_options = { + 'authors' : 'Fundacja Popularyzacji Muzyki Jazzowej EuroJAZZ' + ,'publisher' : publisher + ,'language' : language + ,'preserve_cover_aspect_ratio': True + ,'remove_first_image': True + } + + def build_index(self): + browser = self.get_browser() + rc = browser.open('http://radiojazz.fm/') + + # find the link + epublink = browser.find_link(url_regex=re.compile('e_jazzpress\d\d\d\d\_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')) + oebdir = self.output_dir + '/INPUT/' + main(['ebook-convert', book_file.name, oebdir]) + + # feed calibre + index = os.path.join(oebdir, 'content.opf') + + return index