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 0000000000..00356e091d Binary files /dev/null and b/recipes/icons/biweekly.png differ diff --git a/recipes/icons/dwutygodnik.png b/recipes/icons/dwutygodnik.png new file mode 100644 index 0000000000..00356e091d Binary files /dev/null and b/recipes/icons/dwutygodnik.png differ 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