0.8.1 release

This commit is contained in:
GRiker 2011-05-13 13:24:35 -06:00
commit 02968b5487
71 changed files with 85026 additions and 87539 deletions

View File

@ -19,6 +19,83 @@
# new recipes:
# - title:
- version: 0.8.1
date: 2011-05-13
new features:
- title: "Add Amazon DE, Beam EBooks, Beam DE, Weightless Books, Wizards Tower Books to the list of ebook stores searched by Get Books"
- title: "TXT output: All new Textile output with much greater preservation of formatting from the input document"
- title: "Migrate metadata plugin for Douban Books to the 0.8 API"
- title: "Driver for Dell Streak on windows"
- title: "Add menu items to Get Books action to search by title and author of current book"
- title: "Add title_sort as available field to CSV/XML catalogs"
- title: "Add a context menu to the manage authors dialog"
- title: "Add a button to paste isbn into the identifiers field in the edit metadata dialog automatically"
bug fixes:
- title: "Amazon metadata download plugin: Fix links being stripped from comments. Also fix ratings/isbn not being parsed from kindle edition pages."
tickets: [782012]
- title: "Fix one source of segfaults on shutdown in the linux binary builds."
- title: "Allow the use of condensed/expanded fonts as interface fonts"
- title: "EPUB Input: Ignore missing cover file when converting, instead of erroring out."
tickets: [781848]
- title: "Fix custom identifier being erased by metadata download"
tickets: [781759]
- title: "Fix regression that broke various things when using Japanese language calibre on windows"
tickets: [780804]
- title: "RTF Input: Handle null color codes correctly"
tickets: [780728]
- title: "ODT Input: Handle inline special styles defined on <text:span> tags."
tickets: [780250]
- title: "Fix error when pressing next previous button with an empty search in the Plugins preferences"
tickets: [781135]
- title: "Ignore 'Unknown' author when downloading metadata."
tickets: [779348]
- title: "Fix timezone bug when setting dates in the edit metadata dialog"
tickets: [779497]
- title: "Fix ebook-convert not recognizing output paths starting with .."
tickets: [779322]
improved recipes:
- "Strategy+Business"
- Readers Digest
- Ming Pao
- Telepolis
- Fronda
- Rzeczpospolita
new recipes:
- title: "Various Taiwanese news sources"
author: Eddie Lau
- title: Replica Vedetelor, Ziua Veche
author: Silviu Cotoara
- title: Welt der Physik
author: schuster
- title: Korea Herald
author: Seongkyoun Yoo
- version: 0.8.0
date: 2010-05-06

View File

@ -30,11 +30,12 @@ int report_libc_error(const char *msg) {
}
int pyobject_to_int(PyObject *res) {
int ret; PyObject *tmp;
tmp = PyNumber_Int(res);
if (tmp == NULL) ret = (PyObject_IsTrue(res)) ? 1 : 0;
else ret = (int)PyInt_AS_LONG(tmp);
int ret = 0; PyObject *tmp;
if (res != NULL) {
tmp = PyNumber_Int(res);
if (tmp == NULL) ret = (PyObject_IsTrue(res)) ? 1 : 0;
else ret = (int)PyInt_AS_LONG(tmp);
}
return ret;
}

View File

@ -4,7 +4,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
__appname__ = u'calibre'
numeric_version = (0, 8, 0)
numeric_version = (0, 8, 1)
__version__ = u'.'.join(map(unicode, numeric_version))
__author__ = u"Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -83,6 +83,7 @@ class ArchiveExtract(FileTypePlugin):
return of.name
def get_comic_book_info(d, mi):
# See http://code.google.com/p/comicbookinfo/wiki/Example
series = d.get('series', '')
if series.strip():
mi.series = series
@ -111,6 +112,7 @@ def get_comic_book_info(d, mi):
def get_cbz_metadata(stream):
# See http://code.google.com/p/comicbookinfo/wiki/Example
from calibre.utils.zipfile import ZipFile
from calibre.ebooks.metadata import MetaInformation
import json

View File

@ -202,6 +202,8 @@ class Worker(Thread): # Get details {{{
def parse_rating(self, root):
ratings = root.xpath('//div[@class="jumpBar"]/descendant::span[@class="asinReviewsSummary"]')
if not ratings:
ratings = root.xpath('//div[@class="buying"]/descendant::span[@class="asinReviewsSummary"]')
pat = re.compile(r'([0-9.]+) out of (\d+) stars')
if ratings:
for elem in ratings[0].xpath('descendant::*[@title]'):
@ -215,9 +217,13 @@ class Worker(Thread): # Get details {{{
if desc:
desc = desc[0]
for c in desc.xpath('descendant::*[@class="seeAll" or'
' @class="emptyClear" or @href]'):
' @class="emptyClear"]'):
c.getparent().remove(c)
for a in desc.xpath('descendant::a[@href]'):
del a.attrib['href']
a.tag = 'span'
desc = tostring(desc, method='html', encoding=unicode).strip()
# Encoding bug in Amazon data U+fffd (replacement char)
# in some examples it is present in place of '
desc = desc.replace('\ufffd', "'")
@ -246,8 +252,12 @@ class Worker(Thread): # Get details {{{
return ('/'.join(parts[:-1]))+'/'+bn
def parse_isbn(self, pd):
for x in reversed(pd.xpath(
'descendant::*[starts-with(text(), "ISBN")]')):
items = pd.xpath(
'descendant::*[starts-with(text(), "ISBN")]')
if not items:
items = pd.xpath(
'descendant::b[contains(text(), "ISBN:")]')
for x in reversed(items):
if x.tail:
ans = check_isbn(x.tail.strip())
if ans:
@ -519,8 +529,17 @@ if __name__ == '__main__': # tests {{{
test_identify_plugin(Amazon.name,
[
( # An e-book ISBN not on Amazon, one of the authors is
# unknown to Amazon, so no popup wrapper
( # Description has links
{'identifiers':{'isbn': '9780671578275'}},
[title_test('A Civil Campaign: A Comedy of Biology and Manners',
exact=True), authors_test(['Lois McMaster Bujold'])
]
),
( # An e-book ISBN not on Amazon, the title/author search matches
# the Kindle edition, which has different markup for ratings and
# isbn
{'identifiers':{'isbn': '9780307459671'},
'title':'Invisible Gorilla', 'authors':['Christopher Chabris']},
[title_test('The Invisible Gorilla: And Other Ways Our Intuitions Deceive Us',
@ -556,6 +575,6 @@ if __name__ == '__main__': # tests {{{
),
])
])
# }}}

View File

@ -191,7 +191,11 @@ class OEBReader(object):
if not scheme and href not in known:
new.add(href)
elif item.media_type in OEB_STYLES:
for url in cssutils.getUrls(item.data):
try:
urls = list(cssutils.getUrls(item.data))
except:
urls = []
for url in urls:
href, _ = urldefrag(url)
href = item.abshref(urlnormalize(href))
scheme = urlparse(href).scheme

View File

@ -20,7 +20,7 @@ class StoreAction(InterfaceAction):
action_spec = (_('Get books'), 'store.png', None, None)
def genesis(self):
self.qaction.triggered.connect(self.search)
self.qaction.triggered.connect(self.do_search)
self.store_menu = QMenu()
self.load_menu()
@ -36,6 +36,9 @@ class StoreAction(InterfaceAction):
self.store_list_menu.addAction(n, partial(self.open_store, p))
self.qaction.setMenu(self.store_menu)
def do_search(self):
return self.search()
def search(self, query=''):
self.show_disclaimer()
from calibre.gui2.store.search.search import SearchDialog
@ -52,6 +55,8 @@ class StoreAction(InterfaceAction):
author = ''
if self.gui.current_view() is self.gui.library_view:
author = self.gui.library_view.model().authors(row)
if author:
author = author.replace('|', ' ')
else:
mi = self.gui.current_view().model().get_book_display_info(row)
author = ' & '.join(mi.authors)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff