mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
TXT Markdown Input: Change handling of _ to work mid word. Get Books: Allow searching on the DRM column in the results. Fixes #852514 ([request] advanced search: DRM-free books)
This commit is contained in:
commit
cf1632637e
@ -65,7 +65,8 @@ Constants you might want to modify
|
|||||||
COMMAND_LINE_LOGGING_LEVEL = CRITICAL
|
COMMAND_LINE_LOGGING_LEVEL = CRITICAL
|
||||||
TAB_LENGTH = 4 # expand tabs to this many spaces
|
TAB_LENGTH = 4 # expand tabs to this many spaces
|
||||||
ENABLE_ATTRIBUTES = True # @id = xyz -> <... id="xyz">
|
ENABLE_ATTRIBUTES = True # @id = xyz -> <... id="xyz">
|
||||||
SMART_EMPHASIS = True # this_or_that does not become this<i>or</i>that
|
#SMART_EMPHASIS = True # this_or_that does not become this<i>or</i>that
|
||||||
|
SMART_EMPHASIS = False # this_or_that needs to have _ escaped as \_.
|
||||||
DEFAULT_OUTPUT_FORMAT = 'xhtml1' # xhtml or html4 output
|
DEFAULT_OUTPUT_FORMAT = 'xhtml1' # xhtml or html4 output
|
||||||
HTML_REMOVED_TEXT = "[HTML_REMOVED]" # text used instead of HTML in safe mode
|
HTML_REMOVED_TEXT = "[HTML_REMOVED]" # text used instead of HTML in safe mode
|
||||||
BLOCK_LEVEL_ELEMENTS = re.compile("p|div|h[1-6]|blockquote|pre|table|dl|ol|ul"
|
BLOCK_LEVEL_ELEMENTS = re.compile("p|div|h[1-6]|blockquote|pre|table|dl|ol|ul"
|
||||||
|
@ -45,6 +45,7 @@ class AdvSearchBuilderDialog(QDialog, Ui_Dialog):
|
|||||||
self.author_box.setText('')
|
self.author_box.setText('')
|
||||||
self.price_box.setText('')
|
self.price_box.setText('')
|
||||||
self.format_box.setText('')
|
self.format_box.setText('')
|
||||||
|
self.drm_combo.setCurrentIndex(0)
|
||||||
self.download_combo.setCurrentIndex(0)
|
self.download_combo.setCurrentIndex(0)
|
||||||
self.affiliate_combo.setCurrentIndex(0)
|
self.affiliate_combo.setCurrentIndex(0)
|
||||||
|
|
||||||
@ -120,6 +121,9 @@ class AdvSearchBuilderDialog(QDialog, Ui_Dialog):
|
|||||||
format = unicode(self.format_box.text()).strip()
|
format = unicode(self.format_box.text()).strip()
|
||||||
if format:
|
if format:
|
||||||
ans.append('format:"' + self.mc + format + '"')
|
ans.append('format:"' + self.mc + format + '"')
|
||||||
|
drm = unicode(self.drm_combo.currentText()).strip()
|
||||||
|
if drm:
|
||||||
|
ans.append('drm:' + drm)
|
||||||
download = unicode(self.download_combo.currentText()).strip()
|
download = unicode(self.download_combo.currentText()).strip()
|
||||||
if download:
|
if download:
|
||||||
ans.append('download:' + download)
|
ans.append('download:' + download)
|
||||||
|
@ -199,7 +199,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="2">
|
||||||
<widget class="EnLineEdit" name="title_box">
|
<widget class="EnLineEdit" name="title_box">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Enter the title.</string>
|
<string>Enter the title.</string>
|
||||||
@ -226,7 +226,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0" colspan="2">
|
<item row="9" column="0" colspan="3">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="clear_button">
|
<widget class="QPushButton" name="clear_button">
|
||||||
@ -244,7 +244,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="8" column="2">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -257,17 +257,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="3">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Search only in specific fields:</string>
|
<string>Search only in specific fields:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="2">
|
||||||
<widget class="EnLineEdit" name="author_box"/>
|
<widget class="EnLineEdit" name="author_box"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="2">
|
||||||
<widget class="QLineEdit" name="format_box"/>
|
<widget class="QLineEdit" name="format_box"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
@ -280,17 +280,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="2">
|
||||||
<widget class="EnLineEdit" name="price_box"/>
|
<widget class="EnLineEdit" name="price_box"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Affiliate:</string>
|
<string>Affiliate:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="7" column="2">
|
||||||
<widget class="QComboBox" name="affiliate_combo">
|
<widget class="QComboBox" name="affiliate_combo">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -309,14 +309,14 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_12">
|
<widget class="QLabel" name="label_12">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Download:</string>
|
<string>Download:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="6" column="2">
|
||||||
<widget class="QComboBox" name="download_combo">
|
<widget class="QComboBox" name="download_combo">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -335,6 +335,32 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>DRM:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2">
|
||||||
|
<widget class="QComboBox" name="drm_combo">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>true</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>false</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user