diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index fae138ca..7e0fb25f 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -543,8 +543,8 @@ def ModifyProblembyTeX(id_string,prodict,toeditfilepath,editor): # vscode打开. SaveTextFile(texdata,toeditfilepath) # 打开待编辑的.tex文件 - os.system("code "+toeditfilepath) - a = input("编辑完成后保存文件, 按回车继续...") + print("编辑完成后保存文件, 关闭文件继续...") + os.system("code -w -g "+toeditfilepath) # 生成修改后的题号与内容, 答案, 解答与提示的对应 editor = GetDate() + "\t" + editor diff --git a/工具v2/vscode编辑题目及答案.py b/工具v2/vscode编辑题目及答案.py index 2f61ce80..399eb1b5 100644 --- a/工具v2/vscode编辑题目及答案.py +++ b/工具v2/vscode编辑题目及答案.py @@ -1,4 +1,4 @@ -id_string = "000049,000169,001287,001743,021732" +id_string = "000049,000065" editor = "王伟叶" diff --git a/工具v2/添加关联题目.py b/工具v2/添加关联题目.py index 41f4dd27..359cff51 100644 --- a/工具v2/添加关联题目.py +++ b/工具v2/添加关联题目.py @@ -10,7 +10,7 @@ pro_dict = load_dict("../题库0.3/problems.json") links = CreateIDLinks(generate_number_set(old_ids),generate_number_set(new_ids),pro_dict) CreateRelatedProblems(links,pro_dict,tempfilepath,editor) -os.system("code "+tempfilepath) +print("编辑完毕后, 保存关闭文件继续.") +os.system("code -w -g "+tempfilepath) #-w表示关闭窗口后继续下一步 -input("编辑完毕后, 回车继续.") ImportRelatedProblems(tempfilepath,"../题库0.3/problems.json") \ No newline at end of file