Pull from trunk

This commit is contained in:
Kovid Goyal 2010-05-24 12:16:20 -06:00
commit 3fc37a0b64
8 changed files with 66 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

View File

@ -0,0 +1,43 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Walt Anthony <workshop.northpole at gmail.com>'
'''
www.americanthinker.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
class AmericanThinker(BasicNewsRecipe):
title = u'American Thinker'
description = "American Thinker is a daily internet publication devoted to the thoughtful exploration of issues of importance to Americans."
__author__ = 'Walt Anthony'
publisher = 'Thomas Lifson'
category = 'news, politics, USA'
oldest_article = 7 #days
max_articles_per_feed = 50
summary_length = 150
language = 'en'
remove_javascript = True
no_stylesheets = True
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher' : publisher
, 'language' : language
, 'linearize_tables' : True
}
remove_tags = [
dict(name=['table', 'iframe', 'embed', 'object'])
]
remove_tags_after = dict(name='div', attrs={'class':'article_body'})
feeds = [(u'http://feeds.feedburner.com/americanthinker'),
(u'http://feeds.feedburner.com/AmericanThinkerBlog')
]
def print_version(self, url):
return 'http://www.americanthinker.com/printpage/?url=' + url

View File

@ -50,6 +50,7 @@ class Newsweek(BasicNewsRecipe):
'articlecontent','photoBox', 'article columnist first']}, ]
recursions = 1
match_regexps = [r'http://www.newsweek.com/id/\S+/page/\d+']
preprocess_regexps = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')]
def find_title(self, section):
d = {'scope':'Scope', 'thetake':'The Take', 'features':'Features',

View File

@ -449,7 +449,7 @@ from calibre.devices.eslick.driver import ESLICK
from calibre.devices.nuut2.driver import NUUT2
from calibre.devices.iriver.driver import IRIVER_STORY
from calibre.devices.binatone.driver import README
from calibre.devices.hanvon.driver import N516, EB511, ALEX, AZBOOKA
from calibre.devices.hanvon.driver import N516, EB511, ALEX, AZBOOKA, THEBOOK
from calibre.devices.edge.driver import EDGE
from calibre.devices.teclast.driver import TECLAST_K3, NEWSMY, IPAPYRUS
from calibre.devices.sne.driver import SNE
@ -528,6 +528,7 @@ plugins += [
EB600,
README,
N516,
THEBOOK,
EB511,
ELONEX,
TECLAST_K3,

View File

@ -24,7 +24,7 @@ class N516(USBMS):
VENDOR_ID = [0x0525]
PRODUCT_ID = [0xa4a5]
BCD = [0x323, 0x326, 0x399]
BCD = [0x323, 0x326]
VENDOR_NAME = 'INGENIC'
WINDOWS_MAIN_MEM = '_FILE-STOR_GADGE'
@ -34,6 +34,16 @@ class N516(USBMS):
EBOOK_DIR_MAIN = 'e_book'
SUPPORTS_SUB_DIRS = True
class THEBOOK(N516):
name = 'The Book driver'
gui_name = 'The Book'
description = _('Communicate with The Book reader.')
author = 'Kovid Goyal'
BCD = [0x399]
MAIN_MEMORY_VOLUME_LABEL = 'The Book Main Memory'
EBOOK_DIR_MAIN = 'My books'
class ALEX(N516):
name = 'Alex driver'

View File

@ -17,7 +17,7 @@ class PALMPRE(USBMS):
supported_platforms = ['windows', 'osx', 'linux']
# Ordered list of supported formats
FORMATS = ['mobi', 'prc', 'pdb', 'txt']
FORMATS = ['epub', 'mobi', 'prc', 'pdb', 'txt']
VENDOR_ID = [0x0830]
PRODUCT_ID = [0x8004, 0x8002, 0x0101]

View File

@ -650,7 +650,7 @@
<normaloff>:/images/merge_books.svg</normaloff>:/images/merge_books.svg</iconset>
</property>
<property name="text">
<string>Merge books</string>
<string>Merge book records</string>
</property>
<property name="shortcut">
<string>M</string>

View File

@ -100,6 +100,13 @@ class Booq(Device):
output_format = 'EPUB'
id = 'booq'
class TheBook(Device):
name = 'The Book'
manufacturer = 'Augen'
output_profile = 'prs505'
output_format = 'EPUB'
id = 'thebook'
class Avant(Booq):
name = 'Booq Avant'