20220918 evening
This commit is contained in:
parent
c11fb31fd9
commit
773b7c4163
|
|
@ -2,4 +2,5 @@
|
|||
**/*.pdf
|
||||
**/临时文件/
|
||||
**/*测试*
|
||||
**/*数据导入作业文件/
|
||||
**/*数据导入作业文件/
|
||||
**/*班级报表*/
|
||||
|
|
@ -2,15 +2,26 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os,re,json\n",
|
||||
"\n",
|
||||
"\"\"\"---设置关键字, 同一field下不同选项为or关系, 同一字典中不同字段间为and关系, 不同字典间为or关系, _not表示列表中的关键字都不含, 同一字典中的数字用来供应同一字段不同的条件之间的and---\"\"\"\n",
|
||||
"keywords_dict_table = [\n",
|
||||
" {\"tags\":[\"第三单元\"],\"content\":[r\"A[\\s\\S]*B\"],\"content2\":[r\"c\"],}\n",
|
||||
" {\"tags\":[\"第五单元\"],\"_notcontent\":[\"三角形式\"]}\n",
|
||||
"]\n",
|
||||
"\"\"\"---关键字设置完毕---\"\"\"\n",
|
||||
"# 示例: keywords_dict_table = [\n",
|
||||
|
|
@ -59,7 +70,9 @@
|
|||
" match_list.append(id)\n",
|
||||
"\n",
|
||||
"with open(filename,\"w\",encoding=\"utf8\") as f:\n",
|
||||
" f.write(\",\".join(match_list))"
|
||||
" f.write(\",\".join(match_list))\n",
|
||||
"\n",
|
||||
"os.system(\"code \"+filename)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -72,7 +85,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 ('base')",
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -86,12 +99,12 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
"\n",
|
||||
"for sf in statfiles:\n",
|
||||
" #读取文件生成区域列表与难度列表\n",
|
||||
" classname = \"2023届\"+re.findall(r\"高三[\\d]*?班\",sf)[0]\n",
|
||||
" classname = \"2023届高三\"+re.findall(r\"高三([\\d])*?班\",sf)[0].zfill(2)+\"班\"\n",
|
||||
" date = str(time.localtime().tm_year)+str(time.localtime().tm_mon).zfill(2)+str(time.localtime().tm_mday).zfill(2)\n",
|
||||
" if \"statsfile.xlsx\" in os.listdir(\"临时文件\"):\n",
|
||||
" os.remove(\"临时文件/statsfile.xlsx\")\n",
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 ('base')",
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -95,12 +95,12 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 ('base')",
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -98,12 +98,12 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,122 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"#在 临时文件/赋能答题纸 目录中保留一个pdf(赋能试卷的答题纸), 不留别的pdf文件. \n",
|
||||
"#在 临时文件/赋能答题纸 目录中保留 赋能template.tex.\n",
|
||||
"\"\"\"---设置文件名---\"\"\"\n",
|
||||
"filename = \"赋能02\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置题目列表---\"\"\"\n",
|
||||
"problems = r\"\"\"\n",
|
||||
"1750,337,2675,339:345\n",
|
||||
"\"\"\"\n",
|
||||
"#完成后将含有 filename 的文件移至其它目录\n",
|
||||
"\n",
|
||||
"import os,re,json,shutil\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def generate_number_set(string,dict):\n",
|
||||
" string = re.sub(r\"[\\n\\s]\",\"\",string)\n",
|
||||
" string_list = string.split(\",\")\n",
|
||||
" numbers_list = []\n",
|
||||
" for s in string_list:\n",
|
||||
" if not \":\" in s:\n",
|
||||
" numbers_list.append(s.zfill(6))\n",
|
||||
" else:\n",
|
||||
" start,end = s.split(\":\")\n",
|
||||
" for ind in range(int(start),int(end)+1):\n",
|
||||
" numbers_list.append(str(ind).zfill(6))\n",
|
||||
" return numbers_list\n",
|
||||
"\n",
|
||||
"#读取数据库\n",
|
||||
"with open(\"../../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" jsondata = f.read()\n",
|
||||
"pro_dict = json.loads(jsondata)\n",
|
||||
"\n",
|
||||
"#读取pdf文件并转化为png\n",
|
||||
"pdffile = \"临时文件/赋能答题纸/\"+[f for f in os.listdir(\"临时文件/赋能答题纸\") if \".pdf\" in f][0]\n",
|
||||
"try:\n",
|
||||
" shutil.copy(pdffile,\"tempanswersheet.pdf\")\n",
|
||||
"except:\n",
|
||||
" os.remove(\"tempanswersheet.pdf\")\n",
|
||||
" shutil.copy(pdffile,\"tempanswersheet.pdf\")\n",
|
||||
"os.system(\"pdftocairo -png tempanswersheet.pdf\")\n",
|
||||
"try:\n",
|
||||
" os.rename(\"tempanswersheet-1.png\",\"临时文件/赋能答题纸/output/\"+filename+\"答题纸.png\")\n",
|
||||
"except:\n",
|
||||
" os.remove(\"tempanswersheet-1.png\")\n",
|
||||
"os.rename(pdffile,\"临时文件/赋能答题纸/\"+filename+\"答题纸_raw.pdf\")\n",
|
||||
"os.remove(\"tempanswersheet.pdf\")\n",
|
||||
"\n",
|
||||
"#替换tex模板中的内容\n",
|
||||
"problem_list = [id for id in generate_number_set(problems.strip(),pro_dict) if id in pro_dict]\n",
|
||||
"\n",
|
||||
"with open(\"临时文件/赋能答题纸/赋能template.tex\",\"r\",encoding=\"utf8\") as f:\n",
|
||||
" texdata = f.read()\n",
|
||||
"texdata = texdata.replace(\"背景待替换\",filename+\"答题纸.png\")\n",
|
||||
"data_problems = \"\\n\\n\"\n",
|
||||
"for id in problem_list:\n",
|
||||
" problemset = pro_dict[id]\n",
|
||||
" problem = problemset[\"content\"]\n",
|
||||
" data_problems += \"\\\\item \" + \"{\\\\tiny (\"+id+\")}\"+problem + \"\\n\\n\"\n",
|
||||
"texdata = texdata.replace(\"题目待替换\",data_problems)\n",
|
||||
"\n",
|
||||
"with open(\"临时文件/赋能答题纸/output/\"+filename+\".tex\",\"w\",encoding=\"utf8\") as f:\n",
|
||||
" f.write(texdata)\n",
|
||||
"\n",
|
||||
"#编译文件\n",
|
||||
"os.chdir(\"临时文件/赋能答题纸/output\")\n",
|
||||
"os.system(\"xelatex -interaction=batchmode \" + filename +\".tex\")\n",
|
||||
"print(os.system(\"xelatex -interaction=batchmode \" + filename +\".tex\"))\n",
|
||||
"os.chdir(\"../../..\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"周末卷01.tex\n",
|
||||
"010923\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010924\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010925\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010926\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"030013\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010928\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010929\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010930\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"030014\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010932\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010933\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010934\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010935\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010936\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010937\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010938\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010939\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010940\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010941\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010942\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"010943\n",
|
||||
"\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os,json,re\n",
|
||||
"\n",
|
||||
"#这里需要修改, 设定路径与选择文件\n",
|
||||
"fileind = 0\n",
|
||||
"# path = r\"C:\\Users\\weiye\\Documents\\wwy sync\\23届\\第一轮复习讲义\"\n",
|
||||
"path = r\"C:\\Users\\weiye\\Documents\\wwy sync\\23届\\上学期周末卷\"\n",
|
||||
"\n",
|
||||
"with open(\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n",
|
||||
" jsondata = f.read()\n",
|
||||
"pro_dict = json.loads(jsondata)\n",
|
||||
"\n",
|
||||
"filelist = [f for f in os.listdir(path) if \".tex\" in f]\n",
|
||||
"file = filelist[fileind]\n",
|
||||
"print(file)\n",
|
||||
"with open(os.path.join(path,file),\"r\",encoding = \"utf8\") as f:\n",
|
||||
" data = f.read()\n",
|
||||
" idlist = re.findall(r\"\\(([\\d]{6})\\)\",data)\n",
|
||||
" for id in idlist:\n",
|
||||
" if pro_dict[id][\"ans\"].strip() == \"\":\n",
|
||||
" print(id+\"\\n\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
|
@ -2,44 +2,34 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"题号: 000136 , 字段: objs 中已有该数据: K0319002B\n",
|
||||
"题号: 001492 , 字段: objs 中已添加数据: K0319002B\n",
|
||||
"题号: 009597 , 字段: objs 中已添加数据: K0319002B\n",
|
||||
"题号: 000136 , 字段: objs 中已有该数据: K0319003B\n",
|
||||
"题号: 001492 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 001493 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 001495 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 001496 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 001497 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 001498 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 001513 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 003154 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 006096 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 006097 , 字段: objs 中已添加数据: K0319003B\n",
|
||||
"题号: 003179 , 字段: objs 中已添加数据: K0324003B\n",
|
||||
"题号: 001534 , 字段: objs 中已添加数据: K0324004B\n",
|
||||
"题号: 001535 , 字段: objs 中已添加数据: K0324004B\n",
|
||||
"题号: 001538 , 字段: objs 中已添加数据: K0324004B\n",
|
||||
"题号: 006058 , 字段: objs 中已添加数据: K0324004B\n",
|
||||
"题号: 010305 , 字段: objs 中已添加数据: K0324004B\n",
|
||||
"题号: 003152 , 字段: objs 中已添加数据: K0324005B\n",
|
||||
"题号: 003172 , 字段: objs 中已添加数据: K0324005B\n",
|
||||
"题号: 003177 , 字段: objs 中已添加数据: K0324005B\n",
|
||||
"题号: 001538 , 字段: objs 中已添加数据: K0324006B\n",
|
||||
"题号: 001537 , 字段: objs 中已添加数据: K0324006B\n",
|
||||
"题号: 001536 , 字段: objs 中已添加数据: K0324006B\n",
|
||||
"题号: 003172 , 字段: objs 中已添加数据: K0324006B\n",
|
||||
"题号: 006062 , 字段: objs 中已添加数据: K0324006B\n",
|
||||
"题号: 006225 , 字段: objs 中已添加数据: K0324006B\n",
|
||||
"题号: 009612 , 字段: objs 中已添加数据: K0324006B\n",
|
||||
"题号: 010109 , 字段: objs 中已添加数据: K0324006B\n"
|
||||
"题号: 010923 , 字段: ans 中已修改数据: $\\{1,2,3,4,6\\}$\n",
|
||||
"题号: 010924 , 字段: ans 中已修改数据: $(-1,2)$\n",
|
||||
"题号: 010925 , 字段: ans 中已修改数据: $(1,2)$\n",
|
||||
"题号: 010926 , 字段: ans 中已修改数据: $2$\n",
|
||||
"题号: 030013 , 字段: ans 中已修改数据: $3$\n",
|
||||
"题号: 010928 , 字段: ans 中已修改数据: $(0,+\\infty)$\n",
|
||||
"题号: 010929 , 字段: ans 中已修改数据: $60$\n",
|
||||
"题号: 010930 , 字段: ans 中已修改数据: $[-1,1]$\n",
|
||||
"题号: 030014 , 字段: ans 中已修改数据: $\\dfrac{\\pi}3$\n",
|
||||
"题号: 010932 , 字段: ans 中已修改数据: $\\dfrac{5\\sqrt{6}}2$\n",
|
||||
"题号: 010933 , 字段: ans 中已修改数据: $[1,\\dfrac 54)$\n",
|
||||
"题号: 010934 , 字段: ans 中已修改数据: $13$\n",
|
||||
"题号: 010935 , 字段: ans 中已修改数据: B\n",
|
||||
"题号: 010936 , 字段: ans 中已修改数据: D\n",
|
||||
"题号: 010937 , 字段: ans 中已修改数据: C\n",
|
||||
"题号: 010938 , 字段: ans 中已修改数据: C\n",
|
||||
"题号: 010939 , 字段: ans 中已修改数据: (1) $\\dfrac{4\\sqrt{2}}3$; (2) $\\arccos\\dfrac{\\sqrt{3}}6$.\n",
|
||||
"题号: 010940 , 字段: ans 中已修改数据: (1) $\\{x|x=k\\pi-\\dfrac\\pi 6, \\ k\\in \\mathbf{Z}\\}$; (2) $\\dfrac{3\\sqrt{3}}4$.\n",
|
||||
"题号: 010941 , 字段: ans 中已修改数据: (1) 不符合要求, 证明略; (2) $S=\\dfrac{12}{1+\\sin(2\\theta+\\dfrac \\pi 4)}, \\ \\theta\\in [0,\\arctan\\dfrac 34]$, $S$的最小值为$12\\sqrt{2}-12$.\n",
|
||||
"题号: 010942 , 字段: ans 中已修改数据: (1) $3$; (2) 证明略.\n",
|
||||
"题号: 010943 , 字段: ans 中已修改数据: (1) 当$k=1$时, $y=f(x)$是偶函数; 当$k=-1$时, $y=f(x)$是奇函数; 当$k\\ne 1$且$k \\ne -1$时, $y=f(x)$既不是奇函数, 又不是偶函数; (2) $m=\\log_4 k$; (3) $\\{-3\\}\\cup (1,+\\infty)$.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -47,7 +37,7 @@
|
|||
"import os,re,json\n",
|
||||
"\n",
|
||||
"\"\"\"---明确数据文件位置---\"\"\"\n",
|
||||
"datafile = \"临时文件/l15objs.txt\"\n",
|
||||
"datafile = \"临时文件/answers.txt\"\n",
|
||||
"# 双回车分隔,记录内单回车分隔列表,首行为字段名\n",
|
||||
"\"\"\"---文件位置结束---\"\"\"\n",
|
||||
"\n",
|
||||
|
|
@ -137,7 +127,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 ('base')",
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -151,12 +141,12 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2,15 +2,15 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,re,json,time\n",
|
||||
"\n",
|
||||
"\"\"\"---设置原题目id与新题目id---\"\"\"\n",
|
||||
"old_id = \"6033\"\n",
|
||||
"new_id = \"30020\"\n",
|
||||
"old_id = \"333\"\n",
|
||||
"new_id = \"30022\"\n",
|
||||
"\"\"\"---设置完毕---\"\"\"\n",
|
||||
"\n",
|
||||
"old_id = old_id.zfill(6)\n",
|
||||
|
|
@ -30,6 +30,10 @@
|
|||
" else:\n",
|
||||
" pro_dict[new_id][field] = new_id\n",
|
||||
" pro_dict[new_id][\"related\"].append(old_id)\n",
|
||||
" pro_dict[new_id][\"same\"] = []\n",
|
||||
" pro_dict[new_id][\"objs\"] = []\n",
|
||||
" pro_dict[new_id][\"usages\"] = []\n",
|
||||
" pro_dict[new_id][\"edit\"].append(str(time.localtime().tm_year)+str(time.localtime().tm_mon).zfill(2)+str(time.localtime().tm_mday) + \"\\t\")\n",
|
||||
" pro_dict[old_id][\"related\"].append(new_id)\n",
|
||||
" pro_dict[new_id][\"origin\"] += \"-\" + str(time.localtime().tm_year)+str(time.localtime().tm_mon).zfill(2)+str(time.localtime().tm_mday).zfill(2) + \"修改\"\n",
|
||||
" with open(r\"../题库0.3/Problems.json\",\"w\",encoding = \"utf8\") as f:\n",
|
||||
|
|
@ -46,7 +50,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 ('base')",
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -60,12 +64,12 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
"题块 2 处理完毕.\n",
|
||||
"正在处理题块 3 .\n",
|
||||
"题块 3 处理完毕.\n",
|
||||
"开始编译教师版本pdf文件: 临时文件/周末卷03初稿_教师_20220915.tex\n",
|
||||
"开始编译教师版本pdf文件: 临时文件/九月月考_教师_20220918.tex\n",
|
||||
"0\n",
|
||||
"开始编译学生版本pdf文件: 临时文件/周末卷03初稿_学生_20220915.tex\n",
|
||||
"开始编译学生版本pdf文件: 临时文件/九月月考_学生_20220918.tex\n",
|
||||
"0\n"
|
||||
]
|
||||
}
|
||||
|
|
@ -40,20 +40,20 @@
|
|||
"# enumi_mode = 0\n",
|
||||
"\n",
|
||||
"#2023届测验卷与周末卷\n",
|
||||
"exec_list = [(\"标题替换\",\"周末卷03\")]\n",
|
||||
"exec_list = [(\"标题替换\",\"九月月考\")]\n",
|
||||
"enumi_mode = 1\n",
|
||||
"\"\"\"---其他预处理替换命令结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置目标文件名---\"\"\"\n",
|
||||
"destination_file = \"临时文件/周末卷03初稿\"\n",
|
||||
"destination_file = \"临时文件/九月月考\"\n",
|
||||
"\"\"\"---设置目标文件名结束---\"\"\"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\"\"\"---设置题号数据---\"\"\"\n",
|
||||
"problems = [\n",
|
||||
"\"10965:10976\",\n",
|
||||
"\"10977:10980\",\n",
|
||||
"\"10981:10985\"\n",
|
||||
"\"4080,4122,4312,4451,4557,4276,30019,4356,4320,4359,30020,4091\",\n",
|
||||
"\"4400,8101,4157,4440\",\n",
|
||||
"\"4370,4224,4328,4444,4184\"\n",
|
||||
"]\n",
|
||||
"\"\"\"---设置题号数据结束---\"\"\"\n",
|
||||
"\n",
|
||||
|
|
@ -197,7 +197,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 ('base')",
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -211,12 +211,12 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"开始编译单元与课时目标信息pdf文件: 临时文件/课时目标及单元目标_20220914.tex\n",
|
||||
"开始编译课时划分信息pdf文件: 临时文件/课时划分_20220914.tex\n"
|
||||
"开始编译单元与课时目标信息pdf文件: 临时文件/课时目标及单元目标_20220918.tex\n",
|
||||
"开始编译课时划分信息pdf文件: 临时文件/课时划分_20220918.tex\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.7 ('base')",
|
||||
"display_name": "Python 3.8.8 ('base')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -178,12 +178,12 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
"version": "3.8.8"
|
||||
},
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "e4cce46d6be9934fbd27f9ca0432556941ea5bdf741d4f4d64c6cd7f8dfa8fba"
|
||||
"hash": "d311ffef239beb3b8f3764271728f3972d7b090c974f8e972fcdeedf230299ac"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
7881
题库0.3/Problems.json
7881
题库0.3/Problems.json
File diff suppressed because it is too large
Load Diff
Reference in New Issue