diff --git a/app/templates/日报模板.docx b/app/templates/日报模板.docx index 8b57274..8450fa0 100644 Binary files a/app/templates/日报模板.docx and b/app/templates/日报模板.docx differ diff --git a/app/tools/replace_text.py b/app/tools/replace_text.py index 6e558b1..7b397af 100644 --- a/app/tools/replace_text.py +++ b/app/tools/replace_text.py @@ -6,7 +6,7 @@ from docx.shared import Pt # 获取日志记录器 logger = logging.getLogger(__name__) -excluded_list = ['{{year}}','{{month}}', '{{day}}'] +#excluded_list = ['{{year}}','{{month}}', '{{day}}'] # 将文档中的字符串变量替换成提取内容 def replace_text_in_paragraph(paragraph, old_text, new_text): try: @@ -15,7 +15,7 @@ def replace_text_in_paragraph(paragraph, old_text, new_text): for run in paragraph.runs: if old_text in run.text: run.text = run.text.replace(old_text, new_text) - if old_text.startswith('{{') and old_text not in excluded_list : + if old_text.startswith('{{') : run.font.name = "Times New Roman" #run.font.name = "仿宋" run._element.rPr.rFonts.set(qn('w:eastAsia'), '仿宋')