From 534ba212196b5141b8d6ecad49f6b22995522dc2 Mon Sep 17 00:00:00 2001 From: GRiker Date: Sun, 8 May 2011 03:33:31 -0600 Subject: [PATCH 1/6] Added genesis() to GenerateCatalogAction, enabling catalog builder to be launched from toolbar --- src/calibre/gui2/actions/catalog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/actions/catalog.py b/src/calibre/gui2/actions/catalog.py index 093985d041..45544d8246 100644 --- a/src/calibre/gui2/actions/catalog.py +++ b/src/calibre/gui2/actions/catalog.py @@ -20,6 +20,9 @@ class GenerateCatalogAction(InterfaceAction): action_spec = (_('Create a catalog of the books in your calibre library'), 'catalog.png', 'Catalog builder', None) dont_add_to = frozenset(['menubar-device', 'toolbar-device', 'context-menu-device']) + def genesis(self): + self.qaction.triggered.connect(self.generate_catalog) + def generate_catalog(self): rows = self.gui.library_view.selectionModel().selectedRows() if not rows or len(rows) < 2: From f219f0144dc58a8b45fd9b194284119df62cba08 Mon Sep 17 00:00:00 2001 From: GRiker Date: Sun, 8 May 2011 04:58:04 -0600 Subject: [PATCH 2/6] Added customization_help() to Source, as calibre-customize was failing on builtin Metadata source plugins. --- src/calibre/ebooks/metadata/sources/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/metadata/sources/base.py b/src/calibre/ebooks/metadata/sources/base.py index 3eff9b11b3..e74e4f5042 100644 --- a/src/calibre/ebooks/metadata/sources/base.py +++ b/src/calibre/ebooks/metadata/sources/base.py @@ -212,6 +212,9 @@ class Source(Plugin): def is_customizable(self): return True + def customization_help(self): + return 'This plugin can only be customized using the GUI' + def config_widget(self): from calibre.gui2.metadata.config import ConfigWidget return ConfigWidget(self) From c49c187cb6341ac62d2fa0cad28b48c0b4a69bc7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 8 May 2011 09:12:55 -0600 Subject: [PATCH 3/6] Fix #779322 (ebook-convert can't output to "../filename.epub") --- src/calibre/ebooks/conversion/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/conversion/cli.py b/src/calibre/ebooks/conversion/cli.py index f1d5d5fe1b..b03887469d 100644 --- a/src/calibre/ebooks/conversion/cli.py +++ b/src/calibre/ebooks/conversion/cli.py @@ -68,7 +68,8 @@ def check_command_line_options(parser, args, log): raise SystemExit(1) output = args[2] - if output.startswith('.') and output != '.': + if output.startswith('.') and (output != '.' and not + output.startswith('..')): output = os.path.splitext(os.path.basename(input))[0]+output output = os.path.abspath(output) From 81a501604128274d364c651ec7b37c3499fbd2d2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 8 May 2011 09:36:46 -0600 Subject: [PATCH 4/6] Updated recipes for Fronda and Rzeczpospolita --- recipes/fronda.recipe | 17 +++++++++++------ recipes/icons/rzeczpospolita.png | Bin 0 -> 1195 bytes recipes/rzeczpospolita.recipe | 11 ++++++++++- 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 recipes/icons/rzeczpospolita.png diff --git a/recipes/fronda.recipe b/recipes/fronda.recipe index f57c7ecccb..452dca9068 100644 --- a/recipes/fronda.recipe +++ b/recipes/fronda.recipe @@ -21,14 +21,19 @@ class Fronda(BasicNewsRecipe): feeds = [(u'Infformacje', u'http://fronda.pl/news/feed')] - keep_only_tags = [dict(name='h1', attrs={'class':'big'}), - dict(name='ul', attrs={'class':'about clear'}), - dict(name='div', attrs={'class':'content'})] + keep_only_tags = [dict(name='h2', attrs={'class':'news_title'}), + dict(name='div', attrs={'class':'naglowek_tresc'}), + dict(name='div', attrs={'id':'czytaj'}) ] + + remove_tags = [dict(name='a', attrs={'class':'print'})] + preprocess_regexps = [ (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in - [ (r'Drukuj', lambda match: ''), - (r'

.*

', lambda match: ''), + [ (r'

.*

', lambda match: ''), (r'

.*

', lambda match: ''), (r'

W.* lektury.*

', lambda match: ''), - (r'

Zobacz t.*?', lambda match: '') ] + (r'

Zobacz t.*?', lambda match: ''), + (r']*> 

', lambda match: ''), + (r'


', lambda match: ''), + (r'