diff --git a/resources/recipes/scinexx.recipe b/resources/recipes/scinexx.recipe new file mode 100644 index 0000000000..de1ab51988 --- /dev/null +++ b/resources/recipes/scinexx.recipe @@ -0,0 +1,35 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1265145870(BasicNewsRecipe): + title = u'Scinexx.de' + language = 'de' + __author__ = 'JSuer' + cover_url = 'http://www.g-o.de/grafiken/web_scinexx/head2.gif' + oldest_article = 14 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + encoding = 'ISO-8859-1' + + feeds = [(u'Scinexx.de', u'http://feeds.feedburner.com/scinexx')] + + remove_tags = [{'class':['text1fett']}] + remove_tags = [{'href':['javascript:window.print()']}] + + extra_css = ''' + .text2normal{font-family:Verdana,Geneva,Kalimati,sans-serif; font-size:x-small;} + .text1normalblau{font-family:Verdana,Geneva,Kalimati,sans-serif; font-size:small;} + .text1fett{font-color:grey; font-size:small;} + .titel1{font-family:Georgia,"Times New Roman",Times,serif; font-size:large;} + .titel2{font-family:Georgia,"Times New Roman",Times,serif; } + .titel3{font-family:Georgia,"Times New Roman",Times,serif; font-size:larger;} + h1{font-size:large;} + ''' + + + def print_version(self, url): + id_start = url.rfind('2010') - 6 + id_end = id_start + 5 + id = url[id_start : id_end] + result = 'http://www.scinexx.de/inc/artikel_drucken.php?id=' + id + '&a_flag=1' + return result diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index baffbf2db9..1ad6c03fc2 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, AZBOOKA 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, KOBO +from calibre.devices.misc import PALMPRE, KOBO, AVANT from calibre.devices.htc_td2.driver import HTC_TD2 from calibre.ebooks.metadata.fetch import GoogleBooks, ISBNDB, Amazon @@ -540,7 +540,8 @@ plugins += [ PALMPRE, KOBO, AZBOOKA, - HTC_TD2 + HTC_TD2, + AVANT, ] 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 6cbe8aadec..a375df5694 100644 --- a/src/calibre/devices/misc.py +++ b/src/calibre/devices/misc.py @@ -49,3 +49,22 @@ class KOBO(USBMS): EBOOK_DIR_MAIN = '' +class AVANT(USBMS): + name = 'Booq Avant Device Interface' + gui_name = 'Avant' + description = _('Communicate with the Booq Avant') + author = 'Kovid Goyal' + supported_platforms = ['windows', 'osx', 'linux'] + + # Ordered list of supported formats + FORMATS = ['epub', 'fb2', 'html', 'rtf', 'pdf', 'txt'] + + VENDOR_ID = [0x0525] + PRODUCT_ID = [0xa4a5] + BCD = [0x0319] + + VENDOR_NAME = 'E-BOOK' + WINDOWS_MAIN_MEM = 'READER' + + EBOOK_DIR_MAIN = 'E-books' +