This repository has been archived on 2024-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
mathdeptv2/工具v2/批量收录题目.py

17 lines
781 B
Python

#修改起始id,出处,文件名
starting_id = 18237 #起始id设置, 来自"寻找空闲题号"功能
raworigin = "测试一下" #题目来源的前缀(中缀在.tex文件中)
filename = r"C:\Users\weiye\Documents\wwy sync\临时工作区\自拟题目16.tex" #题目的来源.tex文件
editor = "王伟叶" #编辑者姓名
IndexDescription = " " #设置是否使用后缀, 留空("")则不用后缀, 不留空则以所设字符串作为后缀起始词, 按.tex文件中的顺序编号
from database_tools import *
problems = GenerateProblemListFromString(ReadTextFile(filename))
pro_dict = load_dict(r"../题库0.3/Problems.json")
AddProblemstoDict(starting_id,raworigin,problems,editor,IndexDescription,pro_dict)
save_dict(SortDict(pro_dict),r"../题库0.3/Problems.json")