1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

Replace '+' in filenames (kindlegen does not like it!)

This commit is contained in:
Ciro Mattia Gonano
2013-01-25 15:01:32 +01:00
parent eb7fe97e3b
commit f40a95765b
2 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@@ -193,9 +193,13 @@ def genEpubStruct(path):
for file in filenames:
if getImageFileName(file) is not None:
# put credits at the end
if "credits" in file.lower():
if "credit" in file.lower():
os.rename(os.path.join(dirpath,file), os.path.join(dirpath,'ZZZ999_'+file))
file = 'ZZZ999_'+file
if "+" in file.lower():
newfilename = file.replace('+','_')
os.rename(os.path.join(dirpath,file), os.path.join(dirpath,newfilename))
file = newfilename
filelist.append(buildHTML(dirpath,file))
if not chapter:
chapterlist.append((dirpath,filelist[-1][1]))