changed some case sensitive filenames

This commit is contained in:
wwyavatar 2024-03-03 07:29:31 -08:00
parent 51d4ac5cc0
commit b81e7a390e
32 changed files with 56 additions and 42 deletions

View File

@ -47,7 +47,7 @@
" return numbers_list\n",
"\n",
"problem_list = generate_number_set(problems)\n",
"with open(r\"d:/mathdeptv2/题库0.3/problems.json\",\"r\",encoding = \"utf8\") as f:\n",
"with open(r\"d:/mathdeptv2/题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
" jsondata = f.read()\n",
"pro_dict = json.loads(jsondata)\n",
"class_list = []\n",

View File

@ -1,7 +1,7 @@
import json
filename = r"文本文件/题号筛选.txt"
with open(r"..\题库0.3\problems.json","r",encoding = "u8") as f:
with open(r"..\题库0.3\Problems.json","r",encoding = "u8") as f:
database = f.read()
pro_dict = json.loads(database)
units = ["第一单元","第二单元","第三单元","第四单元","第五单元","第六单元","第七单元","第八单元","第九单元","暂无对应"]

View File

@ -28,7 +28,7 @@
"import json,os\n",
"\n",
"filename = r\"文本文件/题号筛选.txt\"\n",
"with open(r\"..\\题库0.3\\problems.json\",\"r\",encoding = \"u8\") as f:\n",
"with open(r\"..\\题库0.3\\Problems.json\",\"r\",encoding = \"u8\") as f:\n",
" database = f.read()\n",
"pro_dict = json.loads(database)\n",
"units = [\"第一单元\",\"第二单元\",\"第三单元\",\"第四单元\",\"第五单元\",\"第六单元\",\"第七单元\",\"第八单元\",\"第九单元\",\"暂无对应\"]\n",

View File

@ -762,7 +762,7 @@ def ModifyProblembyTeX(id_string,prodict,toeditfilepath,editor): # vscode打开.
prodict[id]["edit"] = prodict[id]["edit"] + [editor]
editedIDList.append(id)
save_dict(prodict,"../题库0.3/problems.json")
save_dict(prodict,"../题库0.3/Problems.json")
return generate_exp(editedIDList) # 返回编辑过的字典

View File

@ -4,7 +4,7 @@ editor = "王伟叶"
from database_tools import *
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
tempfilepath = "临时文件/problem_edit.tex"

14
工具v2/missfont.log Normal file
View File

@ -0,0 +1,14 @@
mktextfm SimSun/OT
mktextfm SimSun/OT
mktextfm KaiTi/OT
mktextfm KaiTi/B/OT
mktextfm SimHei/OT
mktextfm SimHei/I/OT
mktextfm SimSun/OT
mktextfm SimSun/BI/OT
mktextfm SimSun/OT
mktextfm SimSun/OT
mktextfm SimHei/OT
mktextfm SimHei/OT
mktextfm KaiTi/OT
mktextfm KaiTi/OT

View File

@ -61,8 +61,8 @@ class MyWindow(QWidget,Ui_Form):
AppendTextFile(f"\n{time.ctime()}\n{exp}\n","临时文件/题号筛选.txt")
except:
SaveTextFile(f"{time.ctime()}\n{exp}\n","临时文件/题号筛选.txt")
prodictpath = "../题库0.3/problems.json"
objdictpath = "../题库0.3/lessonobj.json"
prodictpath = "../题库0.3/Problems.json"
objdictpath = "../题库0.3/LessonObj.json"
raw_pro_dict = load_dict(prodictpath)
configjson_detailed = {
"pdf标题": "筛选题目编译",

View File

@ -22,7 +22,7 @@ outputfilepath = "临时文件/题号筛选.txt"
from database_tools import *
prodictpath = "../题库0.3/problems.json"
prodictpath = "../题库0.3/Problems.json"
pro_dict = load_dict(prodictpath)

View File

@ -4,7 +4,7 @@ outputfilepath = "临时文件/分类题号列表.json"
from database_tools import *
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
idlist = generate_number_set(original_id_list,pro_dict)
#记录每一个出处对应的题号列表

View File

@ -12,7 +12,7 @@ class MyWindow(QWidget,Ui_Form):
self.pushButton_exec.clicked.connect(self.exec)
def exec(self):
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
if self.radioButton_phase1.isChecked():
idexp = self.lineEdit_ids.text()

View File

@ -1,6 +1,6 @@
from database_tools import *
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
configjson = load_dict("文本文件/config.json")["单元挂钩.py"]
if str(configjson["阶段"]).strip() == "1":

View File

@ -4,7 +4,7 @@ outputdir = "临时文件" # 输出文件夹, 不建议修改
from database_tools import *
preparationdict = load_dict("../备课组/26届/lessons.json")
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
lessons_dict = load_dict("../题库0.3/LessonsCut.json")
basicknowledge_dict = load_dict("../题库0.3/BasicKnowledge.json")

View File

@ -6,7 +6,7 @@ from database_tools import *
texfiles, texpaths = GetValidTexFiles(answeringfilepath)
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
for path in texpaths:
pathname = os.path.split(path)[1]

View File

@ -5,8 +5,8 @@ import time
configjson = load_dict("文本文件/config.json")["多种题目生成.py"]
prodictpath = "../题库0.3/problems.json"
objdictpath = "../题库0.3/lessonobj.json"
prodictpath = "../题库0.3/Problems.json"
objdictpath = "../题库0.3/LessonObj.json"
raw_pro_dict = load_dict(prodictpath)
grades = configjson["字段显示设置"]["届别"]

View File

@ -9,7 +9,7 @@ spaceflag = True #是否留空格, True表示留空格, False表示不留空格
from database_tools import *
prodictpath = "../题库0.3/problems.json"
prodictpath = "../题库0.3/Problems.json"
pro_dict = load_dict(prodictpath)
outputdir = "临时文件" #输出文件的目录

View File

@ -15,7 +15,7 @@ notetitle = configjson["pdf标题"]
answered = configjson["提供答案"]
prodictpath = "../题库0.3/problems.json"
prodictpath = "../题库0.3/Problems.json"
pro_dict = load_dict(prodictpath)
outputdir = "临时文件" #输出文件的目录

View File

@ -90,8 +90,8 @@ class MyWindow(QWidget,Ui_Form):
grades = self.lineEdit_grades.text().strip().split(",")
else:
grades = []
prodictpath = "../题库0.3/problems.json"
objdictpath = "../题库0.3/lessonobj.json"
prodictpath = "../题库0.3/Problems.json"
objdictpath = "../题库0.3/LessonObj.json"
raw_pro_dict = load_dict(prodictpath)
pro_dict = select_grade_from_pro_dict(raw_pro_dict,grades)
obj_dict = load_dict(objdictpath)

View File

@ -21,8 +21,8 @@ sectionname = "section" #按何种名称分组, 可选section, subsection, chapt
from database_tools import *
import time
prodictpath = "../题库0.3/problems.json"
objdictpath = "../题库0.3/lessonobj.json"
prodictpath = "../题库0.3/Problems.json"
objdictpath = "../题库0.3/LessonObj.json"
raw_pro_dict = load_dict(prodictpath)
pro_dict = select_grade_from_pro_dict(raw_pro_dict,grades)
obj_dict = load_dict(objdictpath)

View File

@ -5,7 +5,7 @@ topandbottomusagestuple=(2,2) # 显示靠前的几个使用记录和靠后的几
from database_tools import *
lessonproblemsdict = load_dict("文本文件/课时题目.json") # 需要有一个数据库json文件, key是课时号如"K0101"(见lessonscut.json), 内容是该课时对应的题号字符串
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
lessons_dict = load_dict("../题库0.3/LessonsCut.json")

View File

@ -4,7 +4,7 @@ outputdir = "临时文件" # 输出文件夹, 不建议修改
from database_tools import *
preparationdict = load_dict("../备课组/26届/lessons.json")
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
lessons_dict = load_dict("../题库0.3/LessonsCut.json")
basicknowledge_dict = load_dict("../题库0.3/BasicKnowledge.json")

View File

@ -6,7 +6,7 @@ from database_tools import *
colors = ["green","orange","blue"]
templatepath = ".\模板文件\讲义模板.txt"
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
treated_dict = treat_dict(pro_dict)
data_raw = getCopy()
if data_raw.strip().startswith("\\item"):

View File

@ -20,9 +20,9 @@ class MyWindow(QWidget,Ui_Form):
tempfilepath = "临时文件/problem_edit.json"
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
pro_dict_raw_string = ReadTextFile("../题库0.3/problems.json")
pro_dict_raw_string = ReadTextFile("../题库0.3/Problems.json")
configjson = BuildFullScheme
@ -32,9 +32,9 @@ class MyWindow(QWidget,Ui_Form):
print("编辑完毕后, 保存关闭文件继续.")
os.system("code -w -g "+tempfilepath) #-w表示关闭窗口后继续下一步
editedid_list = ImportRelatedProblems(tempfilepath,"../题库0.3/problems.json")
editedid_list = ImportRelatedProblems(tempfilepath,"../题库0.3/Problems.json")
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
if not XeLaTeXTest(editedid_list,pro_dict,obj_dict,configjson,templatepath="模板文件/讲义模板.txt",outdir = "临时文件",outfile = "problems_test.tex"):
SaveTextFile(pro_dict_raw_string,"../题库0.3/Problems.json")

View File

@ -6,9 +6,9 @@ from database_tools import *
tempfilepath = "临时文件/problem_edit.json"
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
pro_dict_raw_string = ReadTextFile("../题库0.3/problems.json")
pro_dict_raw_string = ReadTextFile("../题库0.3/Problems.json")
configjson = load_dict("文本文件/config.json")["默认完整编译题目模式"]
@ -18,9 +18,9 @@ CreateRelatedProblems(links,pro_dict,tempfilepath,editor)
print("编辑完毕后, 保存关闭文件继续.")
os.system("code -w -g "+tempfilepath) #-w表示关闭窗口后继续下一步
editedid_list = ImportRelatedProblems(tempfilepath,"../题库0.3/problems.json")
editedid_list = ImportRelatedProblems(tempfilepath,"../题库0.3/Problems.json")
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
if not XeLaTeXTest(editedid_list,pro_dict,obj_dict,configjson,templatepath="模板文件/讲义模板.txt",outdir = "临时文件",outfile = "problems_test.tex"):
SaveTextFile(pro_dict_raw_string,"../题库0.3/Problems.json")

View File

@ -12,7 +12,7 @@ if not outputfilename.endswith(".tex"):
outputfilename += ".tex"
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
id_string = generate_sim_group(starting_id,pro_dict,maxlength,threshold)

View File

@ -10,7 +10,7 @@ if not outputfilename.endswith(".tex"):
outputfilename += ".tex"
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
id_string = generate_problem_series(starting_id,length,pro_dict)

View File

@ -2,9 +2,9 @@ metadatafilepath = "文本文件/metadata.txt" #输入为一个字符串, 每行
from database_tools import *
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
metadata = ReadTextFile(metadatafilepath).strip()
RemoveMutualLink(metadata,pro_dict)
save_dict(pro_dict,"../题库0.3/problems.json")
save_dict(pro_dict,"../题库0.3/Problems.json")

View File

@ -81,7 +81,7 @@ class MyWindow(QWidget,Ui_Form):
jsondicts.append(load_dict(os.path.join(loc,"校本材料.json")))
raw_pro_dict = load_dict("../题库0.3/problems.json")
raw_pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
basicknowledge_dict = load_dict("../题库0.3/BasicKnowledge.json")
if self.radioButton_teacher.isChecked() and self.checkBox_usages.isChecked() and not self.lineEdit_grades.text().strip() == "":

View File

@ -18,7 +18,7 @@ for loc,dirs,files in os.walk(jsonpath):
jsondicts.append(load_dict(os.path.join(loc,"校本材料.json")))
raw_pro_dict = load_dict("../题库0.3/problems.json")
raw_pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
basicknowledge_dict = load_dict("../题库0.3/BasicKnowledge.json")
grades = configjson["字段显示设置"]["届别"]

View File

@ -18,7 +18,7 @@ for loc,dirs,files in os.walk(jsonpath):
jsondicts.append(load_dict(os.path.join(loc,"校本材料.json")))
pro_dict = load_dict("../题库0.3/problems.json")
pro_dict = load_dict("../题库0.3/Problems.json")
obj_dict = load_dict("../题库0.3/LessonObj.json")
basicknowledge_dict = load_dict("../题库0.3/BasicKnowledge.json")

View File

@ -6,7 +6,7 @@ from database_tools import *
outputfilepath = os.path.join(outputdir,notetitle+".tex")
lessonsdictpath = "../题库0.3/LessonsCut.json" #课时分割字典所在路径
objdictpath = "../题库0.3/lessonobj.json" #课时目标字典所在路径
objdictpath = "../题库0.3/LessonObj.json" #课时目标字典所在路径

View File

@ -216,7 +216,7 @@ mathpix是一个非常好用的数学文字和公式转换工具, 唯一的缺
2. 新题目的起始题号(``int``类型), 如果起始题号被占用, 则会自动寻找之后的第一个空闲题号作为起始
3. 编辑者姓名
4. 保存后关闭``添加关联题目.py``, 在面板上点击``运行``
5. 在``vscode``中会打开一个``problems.json``的文件, 目前它将旧题目的信息复制了过来, 在``related``字段(黄色框)中自动建立了关联.
5. 在``vscode``中会打开一个``Problems.json``的文件, 目前它将旧题目的信息复制了过来, 在``related``字段(黄色框)中自动建立了关联.
![编辑problems_edit.json](http://wwylss.synology.me:48089/i/2024/02/09/65c58fca9233f.png)

View File

@ -16,6 +16,6 @@ remark
5. 保存(可能会自动保存)后进行第一次git提交工作, 提交的消息设为`metadata录入测试1`
6. 开启环境, 开启gui面板, 选择`维护-批量添加字段数据`
7. 打开的两个编辑窗口`metadata.txt`和`批量添加字段数据.py`中的文件都不作编辑, 在gui面板上点击按钮
8. 在vscode左侧状态栏中点击`git`图标, 点开`problems.json`观察前后的文件内容变化
8. 在vscode左侧状态栏中点击`git`图标, 点开`Problems.json`观察前后的文件内容变化
9. 进行第二次git提交工作, 提交的消息设为`metadata录入测试2`
10. 按同步按钮进行同步.