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
2e897e02
"docs/vscode:/vscode.git/clone" did not exist on "03fe36f183ccefdcaddba7e7c2d4c93764326696"
Commit
2e897e02
authored
Oct 25, 2024
by
zhougaofeng
Browse files
Update AbsPipe.py
parent
69edbd64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
magic_pdf/pipe/AbsPipe.py
magic_pdf/pipe/AbsPipe.py
+4
-4
No files found.
magic_pdf/pipe/AbsPipe.py
View file @
2e897e02
...
@@ -56,9 +56,9 @@ class AbsPipe(ABC):
...
@@ -56,9 +56,9 @@ class AbsPipe(ABC):
content_list
=
AbsPipe
.
mk_uni_format
(
self
.
get_compress_pdf_mid_data
(),
img_parent_path
,
drop_mode
)
content_list
=
AbsPipe
.
mk_uni_format
(
self
.
get_compress_pdf_mid_data
(),
img_parent_path
,
drop_mode
)
return
content_list
return
content_list
def
pipe_mk_markdown
(
self
,
config_path
,
img_parent_path
:
str
,
drop_mode
=
DropMode
.
WHOLE_PDF
,
md_make_mode
=
MakeMode
.
MM_MD
):
def
pipe_mk_markdown
(
self
,
ocr_status
,
config_path
,
img_parent_path
:
str
,
drop_mode
=
DropMode
.
WHOLE_PDF
,
md_make_mode
=
MakeMode
.
MM_MD
):
# logger.info(f'self.get_compress_pdf_mid_data():\n{self.get_compress_pdf_mid_data()}')
# logger.info(f'self.get_compress_pdf_mid_data():\n{self.get_compress_pdf_mid_data()}')
md_content
=
AbsPipe
.
mk_markdown
(
config_path
,
self
.
get_compress_pdf_mid_data
(),
img_parent_path
,
drop_mode
,
md_make_mode
)
md_content
=
AbsPipe
.
mk_markdown
(
ocr_status
,
config_path
,
self
.
get_compress_pdf_mid_data
(),
img_parent_path
,
drop_mode
,
md_make_mode
)
return
md_content
return
md_content
@
staticmethod
@
staticmethod
...
@@ -101,13 +101,13 @@ class AbsPipe(ABC):
...
@@ -101,13 +101,13 @@ class AbsPipe(ABC):
return
content_list
return
content_list
@
staticmethod
@
staticmethod
def
mk_markdown
(
config_path
:
str
,
compressed_pdf_mid_data
:
str
,
img_buket_path
:
str
,
drop_mode
=
DropMode
.
WHOLE_PDF
,
md_make_mode
=
MakeMode
.
MM_MD
)
->
list
:
def
mk_markdown
(
ocr_status
:
str
,
config_path
:
str
,
compressed_pdf_mid_data
:
str
,
img_buket_path
:
str
,
drop_mode
=
DropMode
.
WHOLE_PDF
,
md_make_mode
=
MakeMode
.
MM_MD
)
->
list
:
"""
"""
根据pdf类型,markdown
根据pdf类型,markdown
"""
"""
pdf_mid_data
=
JsonCompressor
.
decompress_json
(
compressed_pdf_mid_data
)
pdf_mid_data
=
JsonCompressor
.
decompress_json
(
compressed_pdf_mid_data
)
pdf_info_list
=
pdf_mid_data
[
"pdf_info"
]
pdf_info_list
=
pdf_mid_data
[
"pdf_info"
]
md_content
=
union_make
(
config_path
,
pdf_info_list
,
md_make_mode
,
drop_mode
,
img_buket_path
)
md_content
=
union_make
(
ocr_status
,
config_path
,
pdf_info_list
,
md_make_mode
,
drop_mode
,
img_buket_path
)
return
md_content
return
md_content
...
...
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