This commit is contained in:
Kovid Goyal 2010-01-22 14:54:06 -07:00
commit 88c540b328
4 changed files with 6 additions and 11 deletions

View File

@ -44,7 +44,8 @@ class PluginWidget(QWidget,Ui_Form):
for opt in self.OPTION_FIELDS:
opt_value = unicode(getattr(self, opt[0]).text())
gprefs.set(self.name + '_' + opt[0], opt_value)
opt_value = opt_value.split(',')
if opt[0] != 'exclude_genre':
opt_value = opt_value.split(',')
opts_dict[opt[0]] = opt_value
opts_dict['output_profile'] = [load_defaults('page_setup')['output_profile']]

View File

@ -49,7 +49,10 @@ def gui_catalog(fmt, title, dbspec, ids, out_file_name, fmt_options,
# Extract the option dictionary to comma-separated lists
for option in fmt_options:
setattr(opts,option, ','.join(fmt_options[option]))
if isinstance(fmt_options[option],list):
setattr(opts,option, ','.join(fmt_options[option]))
else:
setattr(opts,option, fmt_options[option])
# Fetch and run the plugin for fmt
plugin = plugin_for_catalog_format(fmt)

View File

@ -36,9 +36,6 @@ class Catalog(QDialog, Ui_Dialog):
self.title.setText(dynamic.get('catalog_last_used_title',
_('My Books')))
# GwR *** Add option tabs for built-in formats
# This code models #69 in calibre/gui2/dialogs/config/__init__.py
self.fmts, self.widgets = [], []
from calibre.customize.builtins import plugins as builtin_plugins

View File

@ -2484,16 +2484,10 @@ class EPUB_MOBI(CatalogPlugin):
for tag in tags:
tag = self.convertHTMLEntities(tag)
if tag.startswith(opts.note_tag):
# if opts.verbose:
# print "%s has a note: %s" % (this_title['title'], tag[1:])
this_title['notes'] = tag[1:]
elif tag == opts.read_tag:
# if opts.verbose:
# print "%s marked as read" % this_title['title']
this_title['read'] = True
elif re.search(opts.exclude_genre, tag):
# if opts.verbose:
# print "'%s' matches exclude_genre regex, skipping" % tag
continue
else:
tag_list.append(tag)