Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
df9d43b8
Commit
df9d43b8
authored
Mar 27, 2024
by
kernel.h@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete 无用字段
parent
5db91026
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
pipeline_txt.py
magic_pdf/pipeline_txt.py
+5
-4
No files found.
magic_pdf/pipeline_txt.py
View file @
df9d43b8
...
@@ -57,12 +57,13 @@ def txt_pdf_to_mm_markdown_format(jso: dict, debug_mode=False) -> dict:
...
@@ -57,12 +57,13 @@ def txt_pdf_to_mm_markdown_format(jso: dict, debug_mode=False) -> dict:
pdf_intermediate_dict
=
JsonCompressor
.
decompress_json
(
pdf_intermediate_dict
)
pdf_intermediate_dict
=
JsonCompressor
.
decompress_json
(
pdf_intermediate_dict
)
standard_format
=
mk_universal_format
(
pdf_intermediate_dict
)
standard_format
=
mk_universal_format
(
pdf_intermediate_dict
)
mm_content
=
mk_mm_markdown
(
standard_format
)
mm_content
=
mk_mm_markdown
(
standard_format
)
jso
[
"content
_list
"
]
=
mm_content
jso
[
"content"
]
=
mm_content
logger
.
info
(
f
"book_name is:{get_data_source(jso)}/{jso['file_id']},content_list length is {len(standard_format)}"
,)
logger
.
info
(
f
"book_name is:{get_data_source(jso)}/{jso['file_id']},content_list length is {len(standard_format)}"
,)
# 把无用的信息清空
# 把无用的信息清空
jso
[
"doc_layout_result"
]
=
""
to_del_keys
=
[
"doc_layout_result"
,
"pdf_intermediate_dict"
,
"pdf_meta"
,
"parsed_result"
]
jso
[
"pdf_intermediate_dict"
]
=
""
for
key
in
to_del_keys
:
jso
[
"pdf_meta"
]
=
""
if
jso
.
get
(
key
):
del
jso
[
key
]
except
Exception
as
e
:
except
Exception
as
e
:
jso
=
exception_handler
(
jso
,
e
)
jso
=
exception_handler
(
jso
,
e
)
return
jso
return
jso
\ No newline at end of file
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