diff --git a/resources/images/news/american_thinker.png b/resources/images/news/american_thinker.png new file mode 100644 index 0000000000..bbfdf08152 Binary files /dev/null and b/resources/images/news/american_thinker.png differ diff --git a/resources/recipes/american_thinker.recipe b/resources/recipes/american_thinker.recipe new file mode 100644 index 0000000000..b54e930774 --- /dev/null +++ b/resources/recipes/american_thinker.recipe @@ -0,0 +1,43 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Walt Anthony ' +''' +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 diff --git a/resources/recipes/newsweek.recipe b/resources/recipes/newsweek.recipe index f6da941361..7a53c23e45 100644 --- a/resources/recipes/newsweek.recipe +++ b/resources/recipes/newsweek.recipe @@ -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', diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index d1f5ea050c..6c5bc9e070 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -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, diff --git a/src/calibre/devices/hanvon/driver.py b/src/calibre/devices/hanvon/driver.py index aa384910cd..7a0de3064e 100644 --- a/src/calibre/devices/hanvon/driver.py +++ b/src/calibre/devices/hanvon/driver.py @@ -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' diff --git a/src/calibre/devices/misc.py b/src/calibre/devices/misc.py index b0d5718d7f..9d58bbcae6 100644 --- a/src/calibre/devices/misc.py +++ b/src/calibre/devices/misc.py @@ -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] diff --git a/src/calibre/gui2/main.ui b/src/calibre/gui2/main.ui index b7f797f1e0..8c1d1bf787 100644 --- a/src/calibre/gui2/main.ui +++ b/src/calibre/gui2/main.ui @@ -650,7 +650,7 @@ :/images/merge_books.svg:/images/merge_books.svg - Merge books + Merge book records M diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index d7bcc268f5..449d917ea1 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -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'