mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge upstream changes
This commit is contained in:
commit
d98e1b4ef0
@ -2,7 +2,7 @@ __license__ = 'GPL v3'
|
|||||||
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
__appname__ = 'calibre'
|
__appname__ = 'calibre'
|
||||||
__version__ = '0.4.116'
|
__version__ = '0.4.117'
|
||||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||||
'''
|
'''
|
||||||
Various run time constants.
|
Various run time constants.
|
||||||
|
@ -108,7 +108,10 @@ class PRS505(Device):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def get_osx_mountpoints(cls, raw=None):
|
def get_osx_mountpoints(cls, raw=None):
|
||||||
if raw is None:
|
if raw is None:
|
||||||
raw = subprocess.Popen('ioreg -w 0 -S -c IOMedia'.split(),
|
ioreg = '/usr/sbin/ioreg'
|
||||||
|
if not os.access(ioreg, os.X_OK):
|
||||||
|
ioreg = 'ioreg'
|
||||||
|
raw = subprocess.Popen((ioreg+' -w 0 -S -c IOMedia').split(),
|
||||||
stdout=subprocess.PIPE).stdout.read()
|
stdout=subprocess.PIPE).stdout.read()
|
||||||
lines = raw.splitlines()
|
lines = raw.splitlines()
|
||||||
names = {}
|
names = {}
|
||||||
|
@ -677,7 +677,7 @@ class OEBBook(object):
|
|||||||
def _toc_from_ncx(self, opf):
|
def _toc_from_ncx(self, opf):
|
||||||
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
result = xpath(opf, '/o2:package/o2:spine/@toc')
|
||||||
if not result:
|
if not result:
|
||||||
expr = '/o2:package/o2:manifest[@media-type="%s"]/@id'
|
expr = '/o2:package/o2:manifest/o2:item[@media-type="%s"]/@id'
|
||||||
result = xpath(opf, expr % NCX_MIME)
|
result = xpath(opf, expr % NCX_MIME)
|
||||||
if len(result) != 1:
|
if len(result) != 1:
|
||||||
return False
|
return False
|
||||||
|
@ -813,7 +813,7 @@ class HTMLConverter(object, LoggingInterface):
|
|||||||
|
|
||||||
def append_text(src):
|
def append_text(src):
|
||||||
fp, key, variant = self.font_properties(css)
|
fp, key, variant = self.font_properties(css)
|
||||||
for x, y in [(u'\xa0', ' '), (u'\ufb00', 'ff'), (u'\ufb01', 'fi'), (u'\ufb02', 'fl'), (u'\ufb03', 'ffi'), (u'\ufb04', 'ffl')]:
|
for x, y in [(u'\xad', ''), (u'\xa0', ' '), (u'\ufb00', 'ff'), (u'\ufb01', 'fi'), (u'\ufb02', 'fl'), (u'\ufb03', 'ffi'), (u'\ufb04', 'ffl')]:
|
||||||
src = src.replace(x, y)
|
src = src.replace(x, y)
|
||||||
|
|
||||||
valigner = lambda x: x
|
valigner = lambda x: x
|
||||||
|
Loading…
x
Reference in New Issue
Block a user