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
ee1cf18342
@ -597,7 +597,7 @@ class DeviceMenu(QMenu): # {{{
|
||||
|
||||
# }}}
|
||||
|
||||
class DeviceSignals(QObject):
|
||||
class DeviceSignals(QObject): # {{{
|
||||
#: This signal is emitted once, after metadata is downloaded from the
|
||||
#: connected device.
|
||||
#: The sequence: gui.device_manager.is_device_connected will become True,
|
||||
@ -614,6 +614,7 @@ class DeviceSignals(QObject):
|
||||
device_connection_changed = pyqtSignal(object)
|
||||
|
||||
device_signals = DeviceSignals()
|
||||
# }}}
|
||||
|
||||
class DeviceMixin(object): # {{{
|
||||
|
||||
|
@ -139,14 +139,26 @@ class AmazonKindleStore(StorePlugin):
|
||||
cover_xpath = './/div[@class="productTitle"]//img/@src'
|
||||
title_xpath = './/div[@class="productTitle"]/a//text()'
|
||||
price_xpath = './/div[@class="newPrice"]/span/text()'
|
||||
# Vertical list of books. Search "martin"
|
||||
# Vertical list of books.
|
||||
else:
|
||||
data_xpath = '//div[contains(@class, "results")]//div[contains(@class, "result")]'
|
||||
format_xpath = './/span[@class="binding"]//text()'
|
||||
asin_xpath = './/div[@class="image"]/a[1]'
|
||||
cover_xpath = './/img[@class="productImage"]/@src'
|
||||
title_xpath = './/a[@class="title"]/text()'
|
||||
price_xpath = './/span[@class="price"]/text()'
|
||||
# New style list. Search "Paolo Bacigalupi"
|
||||
if doc.xpath('boolean(//div[@class="image"])'):
|
||||
data_xpath = '//div[contains(@class, "results")]//div[contains(@class, "result")]'
|
||||
format_xpath = './/span[@class="binding"]//text()'
|
||||
asin_xpath = './/div[@class="image"]/a[1]'
|
||||
cover_xpath = './/img[@class="productImage"]/@src'
|
||||
title_xpath = './/a[@class="title"]/text()'
|
||||
price_xpath = './/span[@class="price"]/text()'
|
||||
# Old style list. Search "martin"
|
||||
else:
|
||||
data_xpath = '//div[contains(@class, "result")]'
|
||||
format_xpath = './/span[@class="format"]//text()'
|
||||
asin_xpath = './/div[@class="productImage"]/a[1]'
|
||||
cover_xpath = './/div[@class="productImage"]//img/@src'
|
||||
title_xpath = './/div[@class="productTitle"]/a/text()'
|
||||
price_xpath = './/div[@class="newPrice"]//span//text()'
|
||||
|
||||
|
||||
|
||||
for data in doc.xpath(data_xpath):
|
||||
if counter <= 0:
|
||||
|
@ -26,7 +26,7 @@ from calibre.library.custom_columns import CustomColumns
|
||||
from calibre.library.sqlite import connect, IntegrityError
|
||||
from calibre.library.prefs import DBPrefs
|
||||
from calibre.ebooks.metadata.book.base import Metadata
|
||||
from calibre.constants import preferred_encoding, iswindows, isosx, filesystem_encoding
|
||||
from calibre.constants import preferred_encoding, iswindows, filesystem_encoding
|
||||
from calibre.ptempfile import PersistentTemporaryFile
|
||||
from calibre.customize.ui import run_plugins_on_import
|
||||
from calibre import isbytestring
|
||||
@ -188,8 +188,9 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
||||
apply_default_prefs = not os.path.exists(self.dbpath)
|
||||
self.connect()
|
||||
|
||||
self.is_case_sensitive = not iswindows and not isosx and \
|
||||
not os.path.exists(self.dbpath.replace('metadata.db', 'MeTAdAtA.dB'))
|
||||
self.is_case_sensitive = (not iswindows and
|
||||
not os.path.exists(self.dbpath.replace('metadata.db',
|
||||
'MeTAdAtA.dB')))
|
||||
SchemaUpgrade.__init__(self)
|
||||
# Guarantee that the library_id is set
|
||||
self.library_id
|
||||
|
@ -189,7 +189,7 @@ Extra CSS
|
||||
|
||||
This option allows you to specify arbitrary CSS that will be applied to all HTML files in the
|
||||
input. This CSS is applied with very high priority and so should override most CSS present in
|
||||
the input document itself. You can use this setting to fine tune the presentation/layout of your
|
||||
the **input document** itself. You can use this setting to fine tune the presentation/layout of your
|
||||
document. For example, if you want all paragraphs of class `endnote` to be right aligned, just
|
||||
add::
|
||||
|
||||
@ -200,7 +200,8 @@ or if you want to change the indentation of all paragraphs::
|
||||
p { text-indent: 5mm; }
|
||||
|
||||
:guilabel:`Extra CSS` is a very powerful option, but you do need an understanding of how CSS works
|
||||
to use it to its full potential.
|
||||
to use it to its full potential. You can use the debug pipeline option described above to see what
|
||||
CSS is present in your input document.
|
||||
|
||||
Miscellaneous
|
||||
~~~~~~~~~~~~~~
|
||||
|
Loading…
x
Reference in New Issue
Block a user