mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e177f043c0
commit
2dd9b3f128
@ -77,10 +77,14 @@ class TXTInput(InputFormatPlugin):
|
|||||||
base = os.getcwdu()
|
base = os.getcwdu()
|
||||||
if hasattr(stream, 'name'):
|
if hasattr(stream, 'name'):
|
||||||
base = os.path.dirname(stream.name)
|
base = os.path.dirname(stream.name)
|
||||||
htmlfile = open(os.path.join(base, 'index.html'),
|
fname = os.path.join(base, 'index.html')
|
||||||
'wb')
|
c = 0
|
||||||
|
while os.path.exists(fname):
|
||||||
|
c += 1
|
||||||
|
fname = 'index%d.html'%c
|
||||||
|
htmlfile = open(fname, 'wb')
|
||||||
|
with htmlfile:
|
||||||
htmlfile.write(html.encode('utf-8'))
|
htmlfile.write(html.encode('utf-8'))
|
||||||
htmlfile.close()
|
|
||||||
cwd = os.getcwdu()
|
cwd = os.getcwdu()
|
||||||
odi = options.debug_pipeline
|
odi = options.debug_pipeline
|
||||||
options.debug_pipeline = None
|
options.debug_pipeline = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user