Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zhougaofeng
magic_pdf
Commits
3e8419b6
"vscode:/vscode.git/clone" did not exist on "b10f527577c10dd9de78876c01c6c9fc0af91fc1"
Commit
3e8419b6
authored
Oct 25, 2024
by
zhougaofeng
Browse files
Update common_parse.py
parent
1c17f2f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
magic_pdf/parse/common_parse.py
magic_pdf/parse/common_parse.py
+2
-1
No files found.
magic_pdf/parse/common_parse.py
View file @
3e8419b6
...
...
@@ -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
}
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment