From d8834a2a396b0ca341ad3ef39616f3edec014b6b Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Wed, 24 Jan 2024 16:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=B9=E9=87=8F=E6=94=B6?= =?UTF-8?q?=E5=BD=95=E9=A2=98=E7=9B=AE.py=E4=B8=AD=E8=B5=B7=E5=A7=8B?= =?UTF-8?q?=E9=A2=98=E5=8F=B7=E7=9A=84=E8=AE=BE=E7=BD=AE=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/批量收录题目.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/工具v2/批量收录题目.py b/工具v2/批量收录题目.py index c3554755..d7dd9ba1 100644 --- a/工具v2/批量收录题目.py +++ b/工具v2/批量收录题目.py @@ -1,5 +1,5 @@ #修改起始id,出处,文件名 -starting_id = 23660 #起始id设置, 来自"寻找空闲题号"功能 +starting_id = 1 #起始id设置, 从这一个题号后的第一个空闲题号开始添加 20040124修改 raworigin = "自拟题目" #题目来源的前缀(中缀在.tex文件中) filename = r"临时文件\新题比对.tex" #题目的来源.tex文件 editor = "毛培菁" #编辑者姓名 @@ -10,7 +10,7 @@ from database_tools import * problems = GenerateProblemListFromString2024(ReadTextFile(filename)) pro_dict = load_dict(r"../题库0.3/Problems.json") -idlist = AddProblemstoDict2024(starting_id,raworigin,problems,editor,IndexDescription,pro_dict) +idlist = AddProblemstoDict2024(NextSpareID(starting_id,pro_dict),raworigin,problems,editor,IndexDescription,pro_dict) save_dict(SortDict(pro_dict),r"../题库0.3/Problems.json") AppendTextFile(f"{GetDate()}-{GetTime()}\n{generate_exp(idlist)}",idlistpath) os.system(f"code {idlistpath}")