You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
360 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import subprocess
docx_file='./Docx/《动能定理》巩固练习.docx'
temp_markdown='./Res/《动能定理》巩固练习.md'
# 1、先用Pandoc转换得到图片
subprocess.run(['pandoc', docx_file, '-f', 'docx', '-t', 'markdown', '-o', temp_markdown,
'--extract-media=./Res/Images/'])
# 2、把docx转为图片然后OCR