From b1c53689175b27580f6802431b81ae379477af16 Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Wed, 28 Jun 2023 15:58:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=B7=A5=E5=85=B7v2=E7=9A=84=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E4=B8=AD=E6=89=80=E6=9C=89=E6=89=93=E5=BC=80vscode?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E5=9C=B0=E6=96=B9=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=BA=86"-w"=E6=8C=87=E4=BB=A4,=20=E5=85=B3=E9=97=AD=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=89=A7=E8=A1=8C=E4=B8=8B=E4=B8=80=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 4 ++-- 工具v2/vscode编辑题目及答案.py | 2 +- 工具v2/添加关联题目.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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