Improve DNA India

This commit is contained in:
Kovid Goyal 2010-04-02 17:01:23 +05:30
parent 294556038b
commit 374569abb0
3 changed files with 55 additions and 1 deletions

View File

@ -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)

View File

View File

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = '2009, John Schember <john at nachtimwald.com>'
__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]