mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
f62cb543a5
@ -35,7 +35,7 @@ class WallStreetJournal(BasicNewsRecipe):
|
|||||||
|
|
||||||
remove_tags_before = dict(name='h1')
|
remove_tags_before = dict(name='h1')
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(id=["articleTabs_tab_article", "articleTabs_tab_comments", "articleTabs_tab_interactive","articleTabs_tab_video","articleTabs_tab_map","articleTabs_tab_slideshow"]),
|
dict(id=["articleTabs_tab_article", "articleTabs_tab_comments", "articleTabs_tab_interactive","articleTabs_tab_video","articleTabs_tab_map","articleTabs_tab_slideshow","articleTabs_tab_quotes","articleTabs_tab_document"]),
|
||||||
{'class':['footer_columns','network','insetCol3wide','interactive','video','slideshow','map','insettip','insetClose','more_in', "insetContent", 'articleTools_bottom', 'aTools', "tooltip", "adSummary", "nav-inline"]},
|
{'class':['footer_columns','network','insetCol3wide','interactive','video','slideshow','map','insettip','insetClose','more_in', "insetContent", 'articleTools_bottom', 'aTools', "tooltip", "adSummary", "nav-inline"]},
|
||||||
dict(rel='shortcut icon'),
|
dict(rel='shortcut icon'),
|
||||||
]
|
]
|
||||||
@ -101,7 +101,7 @@ class WallStreetJournal(BasicNewsRecipe):
|
|||||||
title = 'Front Section'
|
title = 'Front Section'
|
||||||
url = 'http://online.wsj.com' + a['href']
|
url = 'http://online.wsj.com' + a['href']
|
||||||
feeds = self.wsj_add_feed(feeds,title,url)
|
feeds = self.wsj_add_feed(feeds,title,url)
|
||||||
title = 'What''s News'
|
title = "What's News"
|
||||||
url = url.replace('pageone','whatsnews')
|
url = url.replace('pageone','whatsnews')
|
||||||
feeds = self.wsj_add_feed(feeds,title,url)
|
feeds = self.wsj_add_feed(feeds,title,url)
|
||||||
else:
|
else:
|
||||||
|
@ -65,7 +65,7 @@ def to_metadata(browser, log, entry_):
|
|||||||
|
|
||||||
mi = Metadata(title_, authors)
|
mi = Metadata(title_, authors)
|
||||||
try:
|
try:
|
||||||
raw = browser.open(id_url).read()
|
raw = browser.open_novisit(id_url).read()
|
||||||
feed = etree.fromstring(raw)
|
feed = etree.fromstring(raw)
|
||||||
extra = entry(feed)[0]
|
extra = entry(feed)[0]
|
||||||
except:
|
except:
|
||||||
@ -129,7 +129,7 @@ class Worker(Thread):
|
|||||||
for i in self.entries:
|
for i in self.entries:
|
||||||
try:
|
try:
|
||||||
ans = to_metadata(self.browser, self.log, i)
|
ans = to_metadata(self.browser, self.log, i)
|
||||||
if ans is not None:
|
if isinstance(ans, Metadata):
|
||||||
self.result_queue.put(ans)
|
self.result_queue.put(ans)
|
||||||
except:
|
except:
|
||||||
self.log.exception(
|
self.log.exception(
|
||||||
|
@ -838,9 +838,10 @@ class DeviceMixin(object): # {{{
|
|||||||
format_count[f] = 1
|
format_count[f] = 1
|
||||||
for f in self.device_manager.device.settings().format_map:
|
for f in self.device_manager.device.settings().format_map:
|
||||||
if f in format_count.keys():
|
if f in format_count.keys():
|
||||||
formats.append((f, _('%i of %i Books') % (format_count[f], len(rows))), True if f in aval_out_formats else False)
|
formats.append((f, _('%i of %i Books') % (format_count[f],
|
||||||
|
len(rows)), True if f in aval_out_formats else False))
|
||||||
elif f in aval_out_formats:
|
elif f in aval_out_formats:
|
||||||
formats.append((f, _('0 of %i Books') % len(rows)), True)
|
formats.append((f, _('0 of %i Books') % len(rows), True))
|
||||||
d = ChooseFormatDeviceDialog(self, _('Choose format to send to device'), formats)
|
d = ChooseFormatDeviceDialog(self, _('Choose format to send to device'), formats)
|
||||||
if d.exec_() != QDialog.Accepted:
|
if d.exec_() != QDialog.Accepted:
|
||||||
return
|
return
|
||||||
|
@ -391,7 +391,7 @@ Take your pick:
|
|||||||
* A tribute to the SONY Librie which was the first e-ink based e-book reader
|
* A tribute to the SONY Librie which was the first e-ink based e-book reader
|
||||||
* My wife chose it ;-)
|
* My wife chose it ;-)
|
||||||
|
|
||||||
|app| is pronounced as cal-i-ber *not* ca-libre. If you're wondering, |app| is the British/commonwealth spelling for caliber. Being Indian, that's the natural spelling for me.
|
|app| is pronounced as cal-i-ber *not* ca-li-bre. If you're wondering, |app| is the British/commonwealth spelling for caliber. Being Indian, that's the natural spelling for me.
|
||||||
|
|
||||||
Why does |app| show only some of my fonts on OS X?
|
Why does |app| show only some of my fonts on OS X?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -83,7 +83,6 @@ def thumbnail(data, width=120, height=120, bgcolor='#ffffff', fmt='jpg',
|
|||||||
nheight = height
|
nheight = height
|
||||||
else:
|
else:
|
||||||
scaled, nwidth, nheight = fit_image(owidth, oheight, width, height)
|
scaled, nwidth, nheight = fit_image(owidth, oheight, width, height)
|
||||||
print 'in thumbnail', scaled, nwidth, nheight
|
|
||||||
if scaled:
|
if scaled:
|
||||||
img.size = (nwidth, nheight)
|
img.size = (nwidth, nheight)
|
||||||
canvas = create_canvas(img.size[0], img.size[1], bgcolor)
|
canvas = create_canvas(img.size[0], img.size[1], bgcolor)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user