Commit 70112319 authored by Recolic Keghart's avatar Recolic Keghart 🎱

working dir

parent 84b28e53
......@@ -9,6 +9,8 @@ def get_flist(rootdir):
def fileEq(fileL, fileR):
return filecmp.cmp(fileL, fileR)
def fuck(fl):
return os.path.basename(os.path.splitext(fl)[0])
def main(argv):
if len(argv) != 2:
......@@ -22,14 +24,14 @@ def main(argv):
libFile = list(filter(lambda f: os.path.basename(f) == os.path.basename(fl), libFlist))
if len(libFile) == 0:
print('NOT_FOUND: {}'.format(fl))
out_csv.append('未找到,{}'.format(os.path.basename(fl)))
out_csv.append('未找到,{}'.format(fuck(fl)))
elif len(libFile) > 1:
print('DUPLICATE: Input `{}` has multiple candidate `{}` in library.'.format(fl, libFile))
out_csv.append('库文件重复,{},重名库文件,{}'.format(os.path.basename(fl), libFile))
out_csv.append('库文件重复,{},重名库文件,{}'.format(fuck(fl), libFile))
else:
if not fileEq(libFile[0], fl):
print('NOT_MATCH: {} != {}'.format(fl, libFile[0]))
out_csv.append('与库文件不匹配,{}'.format(os.path.basename(fl)))
out_csv.append('与库文件不匹配,{}'.format(fuck(fl)))
fname = config.working_dir + os.path.sep + os.path.basename(inputPath) + '.csv'
with open(fname, 'w+') as f:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment