Commit 3e8419b6 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update common_parse.py

parent 1c17f2f8
......@@ -67,10 +67,11 @@ def determine_output_dir(output_dir):
def process_input(input_path, pdf_ocr, excel_ocr, output_dir):
"""Process the input path, which can be a directory or a single file."""
if os.path.isdir(input_path):
logger.info(f'开始处理{input_path}目录下的文件')
for root, _, files in os.walk(input_path):
for file in files:
file_path = os.path.join(root, file)
logger.info(f'正在处理文件: {file_path}')
logger.info(f'正在解析文件: {file_path}')
process_file(file_path, pdf_ocr, excel_ocr, output_dir)
else:
logger.info(f'正在解析单个文件: {input_path}')
......
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