Merge branch 'develop-12.24' into develop
# Conflicts: # flask_app/general/file2markdown.py
This commit is contained in:
commit
9bee168b68
@ -40,8 +40,6 @@ class TextinOcr(object):
|
|||||||
}
|
}
|
||||||
|
|
||||||
return requests.post(url, data=image, headers=headers, params=options)
|
return requests.post(url, data=image, headers=headers, params=options)
|
||||||
|
|
||||||
|
|
||||||
def convert_file_to_markdown(file_path, file_name="extract1.txt"):
|
def convert_file_to_markdown(file_path, file_name="extract1.txt"):
|
||||||
# 获取文件的绝对路径所在的文件夹
|
# 获取文件的绝对路径所在的文件夹
|
||||||
output_folder = os.path.dirname(os.path.abspath(file_path))
|
output_folder = os.path.dirname(os.path.abspath(file_path))
|
||||||
@ -103,6 +101,6 @@ def convert_file_to_markdown(file_path, file_name="extract1.txt"):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# file_path=r"C:\Users\Administrator\Desktop\fsdownload\e702f1e6-095d-443d-bb7d-ef2e42037cb1\ztbfile_procurement.pdf"
|
# file_path=r"C:\Users\Administrator\Desktop\fsdownload\e702f1e6-095d-443d-bb7d-ef2e42037cb1\ztbfile_procurement.pdf"
|
||||||
file_path=r'C:\Users\Administrator\Desktop\货物标\output1\6.2定版视频会议磋商文件_procurement.pdf'
|
file_path=r"C:\Users\Administrator\Desktop\new招标文件\output5\HBDL-2024-0514-001-招标文件_procurement\HBDL-2024-0514-001-招标文件_procurement_1.pdf"
|
||||||
res=convert_file_to_markdown(file_path)
|
res=convert_file_to_markdown(file_path)
|
||||||
print(res)
|
print(res)
|
Loading…
x
Reference in New Issue
Block a user