帮金羿提交,顺便改点小语法

This commit is contained in:
bgArray
2022-09-09 14:14:51 +08:00
parent 2e11a9949b
commit 5dde31d081
5 changed files with 38 additions and 31 deletions

View File

@@ -20,9 +20,19 @@ if not os.path.exists(outpath):
while True:
try:
authorname = input('请输入作者:')
isProgress = input('是否开启进度条(1|0)')
if isProgress != '':
isProgress = bool(int(isProgress))
while True:
isProgress = input('*进度条[注]')
if isProgress != '':
if isProgress in ('1', 'True'):
isProgress = True
elif isProgress in ('0', 'False'):
isProgress = False
else:
isProgress = isProgress
else:
continue
break
volume = input('请输入音量0-1')
if volume != '':
volume = float(volume)
@@ -35,10 +45,9 @@ while True:
heightmax = int(heightmax)
break
except:
except BaseException:
print('输入错误,请重新输入')
if os.path.isdir(midipath):
for i in os.listdir(midipath):
if i.endswith('.mid'):