"docs/vscode:/vscode.git/clone" did not exist on "03fe36f183ccefdcaddba7e7c2d4c93764326696"
Commit 2e897e02 authored by zhougaofeng's avatar zhougaofeng
Browse files

Update AbsPipe.py

parent 69edbd64
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment