|
|
@@ -97,7 +97,7 @@ def process_csv(
|
|
|
writer.writerow(header)
|
|
|
writer.writerows(data)
|
|
|
|
|
|
- logger.info(f"结果已保存到:{output_file}")
|
|
|
+ logger.info(f"结果已保存到: {output_file}")
|
|
|
|
|
|
except Exception as e:
|
|
|
logger.error(f"处理文件时出错:{e}")
|
|
|
@@ -105,9 +105,11 @@ def process_csv(
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
# 示例用法
|
|
|
+ file_path = "/home/mrh/code/excel_tool/temp/测试.csv"
|
|
|
+ output_path = "/home/mrh/code/excel_tool/temp/测试_processed.csv"
|
|
|
process_csv(
|
|
|
- input_file='input.csv',
|
|
|
- output_file='output.csv',
|
|
|
+ input_file=file_path,
|
|
|
+ output_file=output_path,
|
|
|
column='B',
|
|
|
start_row=1,
|
|
|
source_lang='auto',
|