From b161102897371a445f53fe32c39a796989452de7 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 18 Sep 2011 18:52:47 -0400 Subject: [PATCH 1/2] TXT Markdown Input: Change handling of _ to work mid word. _ will need to be escaped as \_ to not be changed to a style. --- src/calibre/ebooks/markdown/markdown.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/markdown/markdown.py b/src/calibre/ebooks/markdown/markdown.py index caadce2924..46ac21983c 100644 --- a/src/calibre/ebooks/markdown/markdown.py +++ b/src/calibre/ebooks/markdown/markdown.py @@ -65,7 +65,8 @@ Constants you might want to modify COMMAND_LINE_LOGGING_LEVEL = CRITICAL TAB_LENGTH = 4 # expand tabs to this many spaces ENABLE_ATTRIBUTES = True # @id = xyz -> <... id="xyz"> -SMART_EMPHASIS = True # this_or_that does not become thisorthat +#SMART_EMPHASIS = True # this_or_that does not become thisorthat +SMART_EMPHASIS = False # this_or_that needs to have _ escaped as \_. DEFAULT_OUTPUT_FORMAT = 'xhtml1' # xhtml or html4 output 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" From cb94627b3a86666fa63076bd073b0212b6afa428 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 18 Sep 2011 19:05:14 -0400 Subject: [PATCH 2/2] Store: Search, advanced search: DRM-free books. --- .../gui2/store/search/adv_search_builder.py | 4 ++ .../gui2/store/search/adv_search_builder.ui | 48 ++++++++++++++----- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/src/calibre/gui2/store/search/adv_search_builder.py b/src/calibre/gui2/store/search/adv_search_builder.py index 127ac27acb..703ab780b4 100644 --- a/src/calibre/gui2/store/search/adv_search_builder.py +++ b/src/calibre/gui2/store/search/adv_search_builder.py @@ -45,6 +45,7 @@ class AdvSearchBuilderDialog(QDialog, Ui_Dialog): self.author_box.setText('') self.price_box.setText('') self.format_box.setText('') + self.drm_combo.setCurrentIndex(0) self.download_combo.setCurrentIndex(0) self.affiliate_combo.setCurrentIndex(0) @@ -120,6 +121,9 @@ class AdvSearchBuilderDialog(QDialog, Ui_Dialog): format = unicode(self.format_box.text()).strip() if 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() if download: ans.append('download:' + download) diff --git a/src/calibre/gui2/store/search/adv_search_builder.ui b/src/calibre/gui2/store/search/adv_search_builder.ui index 02eb8f6aa1..b5836807f6 100644 --- a/src/calibre/gui2/store/search/adv_search_builder.ui +++ b/src/calibre/gui2/store/search/adv_search_builder.ui @@ -199,7 +199,7 @@ - + Enter the title. @@ -226,7 +226,7 @@ - + @@ -244,7 +244,7 @@ - + Qt::Vertical @@ -257,17 +257,17 @@ - + Search only in specific fields: - + - + @@ -280,17 +280,17 @@ - + - + Affiliate: - + @@ -309,14 +309,14 @@ - + Download: - + @@ -335,6 +335,32 @@ + + + + DRM: + + + + + + + + + + + + + true + + + + + false + + + +