|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
import subprocess
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
from typing import Optional
|
|
|
|
|
|
|
|
|
|
from D1_GenerateMarkdown import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def convert_md_to_docx(
|
|
|
|
|
input_md: str,
|
|
|
|
|
output_docx: str,
|
|
|
|
@ -65,10 +65,10 @@ def convert_md_to_docx(
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
try:
|
|
|
|
|
convert_md_to_docx(
|
|
|
|
|
input_md=mdWorkingPath+r"\5.md",
|
|
|
|
|
input_md=mdWorkingPath + r"\5.md",
|
|
|
|
|
output_docx=r"D:\dsWork\QingLong\AI\output.docx",
|
|
|
|
|
reference_template=r"D:\dsWork\QingLong\AI\left-aligned-template.docx"
|
|
|
|
|
)
|
|
|
|
|
print("转换成功!")
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(f"转换失败: {str(e)}")
|
|
|
|
|
print(f"转换失败: {str(e)}")
|
|
|
|
|