diff --git a/resources/recipes/dna.recipe b/resources/recipes/dna.recipe index c9bc5642c1..83c19f3a13 100644 --- a/resources/recipes/dna.recipe +++ b/resources/recipes/dna.recipe @@ -25,7 +25,12 @@ class DNAIndia(BasicNewsRecipe): ('After Hours', 'http://www.dnaindia.com/syndication/rss,catid-7.xml'), ('Digital Life', 'http://www.dnaindia.com/syndication/rss,catid-1089741.xml'), ] - remove_tags = [{'id':'footer'}, {'class':['bottom', 'categoryHead']}] + remove_tags = [{'id':['footer', 'lhs-col']}, {'class':['bottom', 'categoryHead', + 'article_tools']}] + keep_only_tags = dict(id='middle-col') + remove_tags_after=[dict(attrs={'id':'story'})] + remove_attributes=['style'] + no_stylesheets = True def print_version(self, url): match = re.search(r'newsid=(\d+)', url) diff --git a/src/calibre/devices/edge/__init__.py b/src/calibre/devices/edge/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/calibre/devices/edge/driver.py b/src/calibre/devices/edge/driver.py new file mode 100644 index 0000000000..1411b3a08e --- /dev/null +++ b/src/calibre/devices/edge/driver.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + +__license__ = 'GPL v3' +__copyright__ = '2009, John Schember ' +__docformat__ = 'restructuredtext en' + +''' +Device driver for Barns and Nobel's Nook +''' + + +from calibre.devices.usbms.driver import USBMS + +class EDGE(USBMS): + + name = 'Edge Device Interface' + gui_name = _('Entourage Edge') + description = _('Communicate with the Entourage Edge.') + author = 'Kovid Goyal' + supported_platforms = ['windows', 'linux', 'osx'] + + # Ordered list of supported formats + FORMATS = ['epub', 'pdf'] + + VENDOR_ID = [0x2080] + PRODUCT_ID = [0x001] + BCD = [0x322] + + VENDOR_NAME = 'ANDROID' + WINDOWS_MAIN_MEM = '__FILE-STOR_GADG' + WINDOWS_CARD_A_MEM = '__FILE-STOR_GADG' + + MAIN_MEMORY_VOLUME_LABEL = 'Edge Main Memory' + STORAGE_CARD_VOLUME_LABEL = 'Edge Storage Card' + + EBOOK_DIR_MAIN = 'download' + SUPPORTS_SUB_DIRS = True + + def windows_sort_drives(self, drives): + main = drives.get('main', None) + card = drives.get('carda', None) + if card and main and card < main: + drives['main'] = card + drives['carda'] = main + + return drives + + def sanitize_path_components(self, components): + return [x.replace('#', '_') for x in components]