Improve blank space removal after romaji conversion
@@ -3352,6 +3352,8 @@ if __name__ == '__main__':
try:
endname = endname.replace("( ", "(");endname = endname.replace(" )", ")")
endname = endname.replace("[ ", "[");endname = endname.replace(" ]", "]")
+ endname = endname.replace(" !", "!");endname = endname.replace(" ?", "?")
+ endname = endname.replace(" ", " ");endname = endname.replace(" ", " ")
except:pass
if endname[-1]==' ':
endname=endname[:-1]
@@ -5576,6 +5578,8 @@ if __name__ == '__main__':
try:
endname = endname.replace("( ", "(");endname = endname.replace(" )", ")")
endname = endname.replace("[ ", "[");endname = endname.replace(" ]", "]")
+ endname = endname.replace(" !", "!");endname = endname.replace(" ?", "?")
+ endname = endname.replace(" ", " ");endname = endname.replace(" ", " ")
except:pass
if filepath.endswith('.xci'):
endname=endname+'.xci'
@@ -5818,6 +5822,8 @@ if __name__ == '__main__':
try:
endname = endname.replace("( ", "(");endname = endname.replace(" )", ")")
endname = endname.replace("[ ", "[");endname = endname.replace(" ]", "]")
+ endname = endname.replace(" !", "!");endname = endname.replace(" ?", "?")
+ endname = endname.replace(" ", " ");endname = endname.replace(" ", " ")
except:pass
if endname[-1]==' ':
endname=endname[:-1]
@@ -5933,6 +5939,8 @@ if __name__ == '__main__':
try:
endname = endname.replace("( ", "(");endname = endname.replace(" )", ")")
endname = endname.replace("[ ", "[");endname = endname.replace(" ]", "]")
+ endname = endname.replace(" !", "!");endname = endname.replace(" ?", "?")
+ endname = endname.replace(" ", " ");endname = endname.replace(" ", " ")
except:pass
newpath=os.path.join(dir,endname)
print('Old Filename: '+basename)
