mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Pull from trunk
This commit is contained in:
commit
3fc37a0b64
BIN
resources/images/news/american_thinker.png
Normal file
BIN
resources/images/news/american_thinker.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 705 B |
43
resources/recipes/american_thinker.recipe
Normal file
43
resources/recipes/american_thinker.recipe
Normal 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
|
@ -50,6 +50,7 @@ class Newsweek(BasicNewsRecipe):
|
|||||||
'articlecontent','photoBox', 'article columnist first']}, ]
|
'articlecontent','photoBox', 'article columnist first']}, ]
|
||||||
recursions = 1
|
recursions = 1
|
||||||
match_regexps = [r'http://www.newsweek.com/id/\S+/page/\d+']
|
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):
|
def find_title(self, section):
|
||||||
d = {'scope':'Scope', 'thetake':'The Take', 'features':'Features',
|
d = {'scope':'Scope', 'thetake':'The Take', 'features':'Features',
|
||||||
|
@ -449,7 +449,7 @@ from calibre.devices.eslick.driver import ESLICK
|
|||||||
from calibre.devices.nuut2.driver import NUUT2
|
from calibre.devices.nuut2.driver import NUUT2
|
||||||
from calibre.devices.iriver.driver import IRIVER_STORY
|
from calibre.devices.iriver.driver import IRIVER_STORY
|
||||||
from calibre.devices.binatone.driver import README
|
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.edge.driver import EDGE
|
||||||
from calibre.devices.teclast.driver import TECLAST_K3, NEWSMY, IPAPYRUS
|
from calibre.devices.teclast.driver import TECLAST_K3, NEWSMY, IPAPYRUS
|
||||||
from calibre.devices.sne.driver import SNE
|
from calibre.devices.sne.driver import SNE
|
||||||
@ -528,6 +528,7 @@ plugins += [
|
|||||||
EB600,
|
EB600,
|
||||||
README,
|
README,
|
||||||
N516,
|
N516,
|
||||||
|
THEBOOK,
|
||||||
EB511,
|
EB511,
|
||||||
ELONEX,
|
ELONEX,
|
||||||
TECLAST_K3,
|
TECLAST_K3,
|
||||||
|
@ -24,7 +24,7 @@ class N516(USBMS):
|
|||||||
|
|
||||||
VENDOR_ID = [0x0525]
|
VENDOR_ID = [0x0525]
|
||||||
PRODUCT_ID = [0xa4a5]
|
PRODUCT_ID = [0xa4a5]
|
||||||
BCD = [0x323, 0x326, 0x399]
|
BCD = [0x323, 0x326]
|
||||||
|
|
||||||
VENDOR_NAME = 'INGENIC'
|
VENDOR_NAME = 'INGENIC'
|
||||||
WINDOWS_MAIN_MEM = '_FILE-STOR_GADGE'
|
WINDOWS_MAIN_MEM = '_FILE-STOR_GADGE'
|
||||||
@ -34,6 +34,16 @@ class N516(USBMS):
|
|||||||
EBOOK_DIR_MAIN = 'e_book'
|
EBOOK_DIR_MAIN = 'e_book'
|
||||||
SUPPORTS_SUB_DIRS = True
|
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):
|
class ALEX(N516):
|
||||||
|
|
||||||
name = 'Alex driver'
|
name = 'Alex driver'
|
||||||
|
@ -17,7 +17,7 @@ class PALMPRE(USBMS):
|
|||||||
supported_platforms = ['windows', 'osx', 'linux']
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
|
|
||||||
# Ordered list of supported formats
|
# Ordered list of supported formats
|
||||||
FORMATS = ['mobi', 'prc', 'pdb', 'txt']
|
FORMATS = ['epub', 'mobi', 'prc', 'pdb', 'txt']
|
||||||
|
|
||||||
VENDOR_ID = [0x0830]
|
VENDOR_ID = [0x0830]
|
||||||
PRODUCT_ID = [0x8004, 0x8002, 0x0101]
|
PRODUCT_ID = [0x8004, 0x8002, 0x0101]
|
||||||
|
@ -650,7 +650,7 @@
|
|||||||
<normaloff>:/images/merge_books.svg</normaloff>:/images/merge_books.svg</iconset>
|
<normaloff>:/images/merge_books.svg</normaloff>:/images/merge_books.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Merge books</string>
|
<string>Merge book records</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>M</string>
|
<string>M</string>
|
||||||
|
@ -100,6 +100,13 @@ class Booq(Device):
|
|||||||
output_format = 'EPUB'
|
output_format = 'EPUB'
|
||||||
id = 'booq'
|
id = 'booq'
|
||||||
|
|
||||||
|
class TheBook(Device):
|
||||||
|
name = 'The Book'
|
||||||
|
manufacturer = 'Augen'
|
||||||
|
output_profile = 'prs505'
|
||||||
|
output_format = 'EPUB'
|
||||||
|
id = 'thebook'
|
||||||
|
|
||||||
class Avant(Booq):
|
class Avant(Booq):
|
||||||
name = 'Booq Avant'
|
name = 'Booq Avant'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user