[Checkins] SVN: zopyx.convert2/trunk/s fixes
Andreas Jung
andreas at andreas-jung.com
Tue Aug 23 07:46:19 EDT 2011
Log message for revision 122685:
fixes
Changed:
U zopyx.convert2/trunk/setup.py
U zopyx.convert2/trunk/src/zopyx/convert2/calibre.py
-=-
Modified: zopyx.convert2/trunk/setup.py
===================================================================
--- zopyx.convert2/trunk/setup.py 2011-08-23 11:26:49 UTC (rev 122684)
+++ zopyx.convert2/trunk/setup.py 2011-08-23 11:46:18 UTC (rev 122685)
@@ -12,7 +12,7 @@
'Programming Language :: Python',
]
-version = '2.3.2'
+version = '2.3.2.1'
desc = unicode(file('README.txt').read().strip(), 'utf-8')
changes = file('CHANGES.txt').read().strip()
Modified: zopyx.convert2/trunk/src/zopyx/convert2/calibre.py
===================================================================
--- zopyx.convert2/trunk/src/zopyx/convert2/calibre.py 2011-08-23 11:26:49 UTC (rev 122684)
+++ zopyx.convert2/trunk/src/zopyx/convert2/calibre.py 2011-08-23 11:46:18 UTC (rev 122685)
@@ -24,7 +24,7 @@
def html2calibre(html_filename, output_filename=None, cmdopts='', **calibre_options):
""" Convert a HTML file using calibre """
-
+
if not html_filename.endswith('.html'):
shutil.copy(html_filename, html_filename + '.html')
html_filename += '.html'
@@ -47,7 +47,6 @@
else:
options = ' '.join(options)
options = options + ' ' + cmdopts
- options = options % dict(WORKDIR=os.path.dirname(html_filename))
cmd = '"ebook-convert" "%s" "%s" %s' % (html_filename, output_filename, options)
status, output = runcmd(cmd)
@@ -71,12 +70,13 @@
return calibre_available
def convert(self, output_filename=None, **calibre_options):
-
+
# check for commandlineoptions.txt file
cmdopts = ''
cmdopts_filename = os.path.join(os.path.dirname(self.filename), 'commandlineoptions.txt')
if os.path.exists(cmdopts_filename):
cmdopts = file(cmdopts_filename).read()
+ cmdopts = cmdopts % dict(WORKDIR=os.path.dirname(self.filename))
tidy_filename = tidyhtml(self.filename, self.encoding)
result = html2calibre(tidy_filename, output_filename, cmdopts=cmdopts, **calibre_options)
More information about the checkins
mailing list