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.
12 lines
354 B
12 lines
354 B
4 weeks ago
|
import os
|
||
|
|
||
4 weeks ago
|
from Util.WordImageUtil import extract_images_from_docx
|
||
4 weeks ago
|
|
||
|
|
||
|
# 使用示例
|
||
4 weeks ago
|
if __name__ == "__main__":
|
||
4 weeks ago
|
word_path = "d:\\dsWork\\dsProject\\dsRag\\Test\\带图的WORD文档.docx"
|
||
|
output_dir = "../static/Images" # 图片输出目录
|
||
4 weeks ago
|
os.makedirs(output_dir, exist_ok=True)
|
||
4 weeks ago
|
extract_images_from_docx(word_path, output_dir)
|