From 440d111eef93689bfa74c3459eb22f57f1161ddd Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Tue, 23 Jan 2024 13:55:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=94=B6=E5=BD=95=E6=96=B0?= =?UTF-8?q?=E9=A2=98.py=E4=B8=AD=E6=89=80=E7=94=A8=E7=9A=84=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E6=9B=B4=E6=96=B0=E4=B8=BA2024=E7=89=88,=20=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E6=9C=80=E5=90=8E=E4=BC=9A=E6=98=BE=E7=A4=BA=E6=94=B6?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E9=A2=98=E5=8F=B7=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/批量收录题目.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/工具v2/批量收录题目.py b/工具v2/批量收录题目.py index eb49a5b6..b261b0e5 100644 --- a/工具v2/批量收录题目.py +++ b/工具v2/批量收录题目.py @@ -1,16 +1,20 @@ #修改起始id,出处,文件名 -starting_id = 19940 #起始id设置, 来自"寻找空闲题号"功能 -raworigin = "自拟题目" #题目来源的前缀(中缀在.tex文件中) -filename = r"C:\Users\wangweiye\Documents\wwy sync\临时工作区\test5.tex" #题目的来源.tex文件 -editor = "毛培菁" #编辑者姓名 +starting_id = 23638 #起始id设置, 来自"寻找空闲题号"功能 +raworigin = "测试题目" #题目来源的前缀(中缀在.tex文件中) +filename = r"临时文件\新题比对.tex" #题目的来源.tex文件 +editor = "王伟叶" #编辑者姓名 IndexDescription = "" #设置是否使用后缀, 留空("")则不用后缀, 不留空则以所设字符串作为后缀起始词, 按.tex文件中的顺序编号 - +idlistpath = r"文本文件\新题收录列表.txt" from database_tools import * -problems = GenerateProblemListFromString(ReadTextFile(filename)) +problems = GenerateProblemListFromString2024(ReadTextFile(filename)) pro_dict = load_dict(r"../题库0.3/Problems.json") -AddProblemstoDict(starting_id,raworigin,problems,editor,IndexDescription,pro_dict) +idlist = AddProblemstoDict2024(starting_id,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}") + +