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
wangsen
MinerU
Commits
875b5db1
Commit
875b5db1
authored
May 08, 2024
by
赵小蒙
Browse files
remove pipe_mk_uni_format try logic
parent
2932db30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
magic_pdf/cli/magicpdf.py
magic_pdf/cli/magicpdf.py
+3
-5
No files found.
magic_pdf/cli/magicpdf.py
View file @
875b5db1
...
...
@@ -79,8 +79,8 @@ def _do_parse(pdf_file_name, pdf_bytes, model_list, parse_method, image_writer,
pdf_info
=
pipe
.
pdf_mid_data
[
'pdf_info'
]
draw_layout_bbox
(
pdf_info
,
pdf_bytes
,
local_md_dir
)
draw_span_bbox
(
pdf_info
,
pdf_bytes
,
local_md_dir
)
md_content
=
pipe
.
pipe_mk_markdown
(
image_dir
,
drop_mode
=
DropMode
.
NONE
)
md_content
=
pipe
.
pipe_mk_markdown
(
image_dir
,
drop_mode
=
DropMode
.
NONE
)
md_writer
.
write
(
content
=
md_content
,
path
=
f
"
{
pdf_file_name
}
.md"
,
mode
=
AbsReaderWriter
.
MODE_TXT
)
...
...
@@ -89,10 +89,8 @@ def _do_parse(pdf_file_name, pdf_bytes, model_list, parse_method, image_writer,
path
=
f
"
{
pdf_file_name
}
.json"
,
mode
=
AbsReaderWriter
.
MODE_TXT
,
)
try
:
content_list
=
pipe
.
pipe_mk_uni_format
(
image_dir
,
drop_mode
=
DropMode
.
NONE
)
except
Exception
as
e
:
logger
.
exception
(
e
)
content_list
=
pipe
.
pipe_mk_uni_format
(
image_dir
,
drop_mode
=
DropMode
.
NONE
)
md_writer
.
write
(
str
(
content_list
),
f
"
{
pdf_file_name
}
.txt"
,
AbsReaderWriter
.
MODE_TXT
)
...
...
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