diff --git a/resources/recipes/onionavclub.recipe b/resources/recipes/onionavclub.recipe new file mode 100644 index 0000000000..5bc069b6ed --- /dev/null +++ b/resources/recipes/onionavclub.recipe @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2008, Kovid Goyal ' +''' +bbc.co.uk +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class BBC(BasicNewsRecipe): + title = u'The Onion AV Club' + __author__ = 'Stephen Williams' + description = 'Film, Television and Music Reviews' + no_stylesheets = True + oldest_article = 2 + max_articles_per_feed = 100 + + keep_only_tags = [dict(name='div', attrs={'id':'content'}) + ] + + remove_tags = [dict(name='div', attrs={'class':['footer','tools_horizontal']}), + dict(name='div', attrs={'id':['tool_holder','elsewhere_on_avclub']}) + ] + extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }' + + feeds = [ + ('Interviews', 'http://www.avclub.com/feed/interview/'), + ('AV Club Daily', 'http://www.avclub.com/feed/daily'), + ('Film', 'http://www.avclub.com/feed/film/'), + ('Music', 'http://www.avclub.com/feed/music/'), + ('DVD', 'http://www.avclub.com/feed/dvd/'), + ('Books', 'http://www.avclub.com/feed/books/'), + ('Games', 'http://www.avclub.com/feed/games/'), + ('Interviews', 'http://www.avclub.com/feed/interview/'), + ] diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index a3eb4272ba..7f1b524033 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -454,7 +454,7 @@ from calibre.devices.hanvon.driver import N516, EB511, ALEX from calibre.devices.edge.driver import EDGE from calibre.devices.teclast.driver import TECLAST_K3 from calibre.devices.sne.driver import SNE -from calibre.devices.misc import PALMPRE +from calibre.devices.misc import PALMPRE, KOBO from calibre.ebooks.metadata.fetch import GoogleBooks, ISBNDB, Amazon from calibre.library.catalog import CSV_XML, EPUB_MOBI @@ -536,7 +536,8 @@ plugins += [ EDGE, SNE, ALEX, - PALMPRE + PALMPRE, + KOBO, ] plugins += [x for x in list(locals().values()) if isinstance(x, type) and \ x.__name__.endswith('MetadataReader')] diff --git a/src/calibre/devices/misc.py b/src/calibre/devices/misc.py index c903458634..534e944415 100644 --- a/src/calibre/devices/misc.py +++ b/src/calibre/devices/misc.py @@ -28,3 +28,24 @@ class PALMPRE(USBMS): EBOOK_DIR_MAIN = 'E-books' +class KOBO(USBMS): + + name = 'Kobo Reader Device Interface' + gui_name = 'Kobo Reader' + description = _('Communicate with the Kobo Reader') + author = 'Kovid Goyal' + + supported_platforms = ['windows', 'osx', 'linux'] + + # Ordered list of supported formats + FORMATS = ['epub', 'pdf'] + + VENDOR_ID = [0x2237] + PRODUCT_ID = [0x4161] + BCD = [0x0110] + + VENDOR_NAME = 'KOBO_INC' + WINDOWS_MAIN_MEM = '.KOBOEREADER' + + EBOOK_DIR_MAIN = 'e-books' +