[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse-packaging
Subject: [opensuse-packaging] python 2.7.1 and calibre
From: Filipe Pires Alvarenga Fernandes <ocefpaf () gmail ! com>
Date: 2011-07-31 14:31:51
Message-ID: CAH2VmmCwWfx8iKh3ftFSk=aydsq6JgMZRXypCfE7nanwf1Q2DQ () mail ! gmail ! com
[Download RAW message or body]
Hi,
I read some time ago a thread about calibre and python 2.7.1 on
opensuse 11.4, unfortunately I deleted that e-mail and missed the
thread.
So, calibre only need python 2.7.1 for
"calibre/src/calibre/ebooks/metadata/sources/cli.py", more
specifically a "option parser" problem reported here:
http://susepaste.org/31237540
I made a crazy modification here (not a patch, actually a broken
program) that consists of eliminating this parser.
Since most users do not use the calibre's CLI interface, that should
be OK as (ugly) a work around until python 2.7.1 is on opensuse
11.4...
... or some more skilled than I could made a real patch :-)
Anyways, I'm running it here and so far I could use all of calibre's
GUI features.
-Filipe
["patch.diff" (text/x-patch)]
--- calibre.orig/src/calibre/ebooks/metadata/sources/cli.py 2011-07-30 09:43:33.972119020 -0400
+++ calibre/src/calibre/ebooks/metadata/sources/cli.py 2011-07-30 09:56:05.592722470 -0400
@@ -20,30 +20,10 @@
from calibre.ebooks.metadata.sources.identify import identify
from calibre.ebooks.metadata.sources.covers import download_cover
-def option_parser():
- parser = OptionParser(textwrap.dedent(
- '''\
- %prog [options]
-
- Fetch book metadata from online sources. You must specify at least one
- of title, authors or ISBN.
- '''
- ))
- parser.add_option('-t', '--title', help='Book title')
- parser.add_option('-a', '--authors', help='Book author(s)')
- parser.add_option('-i', '--isbn', help='Book ISBN')
- parser.add_option('-v', '--verbose', default=False, action='store_true',
- help='Print the log to the console (stderr)')
- parser.add_option('-o', '--opf', help='Output the metadata in OPF format')
- parser.add_option('-c', '--cover',
- help='Specify a filename. The cover, if available, will be saved to it')
- parser.add_option('-d', '--timeout', default='30',
- help='Timeout in seconds. Default is 30')
-
- return parser
def main(args=sys.argv):
- parser = option_parser()
+ #parser = option_parser()
+ parser = None
opts, args = parser.parse_args(args)
buf = BytesIO()
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-packaging+help@opensuse.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic