From 99abeff636f782530689fff6527585d9e0de0912 Mon Sep 17 00:00:00 2001 From: GRiker Date: Sat, 23 Jan 2010 08:46:10 -0700 Subject: [PATCH 1/3] Fix CLI bug with opts.search_text = None --- src/calibre/library/catalog.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index 8a5072d622..a8755cf15b 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -758,7 +758,10 @@ class EPUB_MOBI(CatalogPlugin): if self.opts.ids: self.opts.search_text = search_phrase else: - self.opts.search_text = self.opts.search_text + " " + search_phrase + if self.opts.search_text: + self.opts.search_text += " " + search_phrase + else: + self.opts.search_text = search_phrase # Fetch the database as a dictionary data = self.plugin.search_sort_db(self.db, self.opts) From 57d3d606b10b764d209c056500e5c9eecab9e486 Mon Sep 17 00:00:00 2001 From: GRiker Date: Sat, 23 Jan 2010 09:03:29 -0700 Subject: [PATCH 2/3] Added 'Catalog' to default exclude_tags --- src/calibre/gui2/catalog/catalog_epub_mobi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/catalog/catalog_epub_mobi.py b/src/calibre/gui2/catalog/catalog_epub_mobi.py index 841ba5f6ad..50072451a0 100644 --- a/src/calibre/gui2/catalog/catalog_epub_mobi.py +++ b/src/calibre/gui2/catalog/catalog_epub_mobi.py @@ -17,7 +17,7 @@ class PluginWidget(QWidget,Ui_Form): TITLE = _('E-book Options') HELP = _('Options specific to')+' EPUB/MOBI '+_('output') OPTION_FIELDS = [('exclude_genre','\[[\w ]*\]'), - ('exclude_tags','~'), + ('exclude_tags','~,Catalog'), ('read_tag','+'), ('note_tag','*')] From b16465c62089d12c201a572b38be44fa0e64ef36 Mon Sep 17 00:00:00 2001 From: GRiker Date: Sat, 23 Jan 2010 09:20:29 -0700 Subject: [PATCH 3/3] Added 'Catalog' to default exclude_tags --- src/calibre/library/catalog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index a459653cea..d65c8cb5f9 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -247,7 +247,7 @@ class EPUB_MOBI(CatalogPlugin): help=_("Regex describing tags to exclude as genres.\n" "Default: '%default' excludes bracketed tags, e.g. '[]'\n" "Applies to: ePub, MOBI output formats")), Option('--exclude-tags', - default='~', + default='~,Catalog', dest='exclude_tags', help=_("Comma-separated list of tag words indicating book should be excluded from output. Case-insensitive.\n" "--exclude-tags=skip will match 'skip this book' and 'Skip will like this'.\n"