mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
recipes provided by luka6000
This commit is contained in:
parent
71529d52d5
commit
338ab5d211
51
recipes/biweekly.recipe
Normal file
51
recipes/biweekly.recipe
Normal file
@ -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
|
51
recipes/dwutygodnik.recipe
Normal file
51
recipes/dwutygodnik.recipe
Normal file
@ -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
|
BIN
recipes/icons/biweekly.png
Normal file
BIN
recipes/icons/biweekly.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 603 B |
BIN
recipes/icons/dwutygodnik.png
Normal file
BIN
recipes/icons/dwutygodnik.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 603 B |
50
recipes/jazzpress.recipe
Normal file
50
recipes/jazzpress.recipe
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user