'commit'
This commit is contained in:
@@ -56,6 +56,9 @@ async def generate_dao_xue_an(request: Request):
|
||||
save_dir = os.path.join(project_root, "static", "teacherHelpergenerated_files")
|
||||
os.makedirs(save_dir, exist_ok=True)
|
||||
|
||||
# 获取难度参数(默认为"默认难度")
|
||||
difficulty = params.get("difficulty", "默认难度")
|
||||
|
||||
# 生成唯一文件名
|
||||
timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
|
||||
|
||||
@@ -65,7 +68,7 @@ async def generate_dao_xue_an(request: Request):
|
||||
temp_md_path = temp_md.name
|
||||
|
||||
# 使用Pandoc转换为Word
|
||||
docx_filename = f"导学案_{timestamp}.docx"
|
||||
docx_filename = f"导学案_{difficulty}_{timestamp}.docx"
|
||||
docx_path = os.path.join(save_dir, docx_filename)
|
||||
|
||||
try:
|
||||
|
Reference in New Issue
Block a user