解析脚本
This commit is contained in:
parent
7e83b531d2
commit
77a09ff15c
@ -3,6 +3,7 @@ import json
|
||||
import openpyxl
|
||||
|
||||
current_dir = os.getcwd()
|
||||
print(current_dir)
|
||||
# 读取配置文件
|
||||
with open(os.path.join(current_dir, 'tool/cfg/cfg_txt.json'), 'r', encoding='utf-8-sig') as f:
|
||||
cfg = json.load(f)
|
||||
@ -41,4 +42,6 @@ for file_cfg in file_list:
|
||||
txt_file.write('\t'.join(file_cfg["coloum_type"]) + '\n')
|
||||
continue
|
||||
row_data = [str(cell) for cell in row if cell not in fields_to_remove]
|
||||
txt_file.write('\t'.join(row_data) + '\n')
|
||||
txt_file.write('\t'.join(row_data) + '\n')
|
||||
|
||||
print(f"Converted: {source_file_path} to {target_file_path}")
|
||||
Loading…
Reference in New Issue
Block a user