Skip to content

Commit

Permalink
Merge pull request #50 from myhloli/master
Browse files Browse the repository at this point in the history
统一使用ocr组装markdown
  • Loading branch information
myhloli authored Apr 22, 2024
2 parents f6d8f6c + 1340a97 commit d95f545
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions magic_pdf/pipe/AbsPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ def mk_markdown(compressed_pdf_mid_data: str, img_buket_path: str) -> list:
parse_type = pdf_mid_data["_parse_type"]
pdf_info_list = pdf_mid_data["pdf_info"]
if parse_type == AbsPipe.PIP_TXT:
content_list = mk_universal_format(pdf_info_list, img_buket_path)
md_content = mk_mm_markdown(content_list)
# content_list = mk_universal_format(pdf_info_list, img_buket_path)
# md_content = mk_mm_markdown(content_list)
md_content = ocr_mk_mm_markdown_with_para(pdf_info_list, img_buket_path)
elif parse_type == AbsPipe.PIP_OCR:
md_content = ocr_mk_mm_markdown_with_para(pdf_info_list, img_buket_path)
return md_content
Expand Down

0 comments on commit d95f545

Please sign in to comment.