diff --git a/工具/修改题目数据库.ipynb b/工具/修改题目数据库.ipynb index e14fc9f2..c1561426 100644 --- a/工具/修改题目数据库.ipynb +++ b/工具/修改题目数据库.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -11,7 +11,7 @@ "0" ] }, - "execution_count": 4, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } @@ -19,7 +19,7 @@ "source": [ "import os,re,json\n", "# 这里修改题目id, 可以不满6位\n", - "index = \"10942\".zfill(6)\n", + "index = \"10233\".zfill(6)\n", "with open(r\"../题库0.3/Problems.json\",\"r\",encoding = \"utf8\") as f:\n", " database = f.read()\n", "line = '\"id\": \"'+index+'\",'\n", @@ -27,6 +27,13 @@ "position = len(re.findall(r\"\\n\",before))\n", "os.system(r\"code -g ../题库0.3/Problems.json:\" +str(position))" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/工具/手动统计结果转换.ipynb b/工具/手动统计结果转换.ipynb index 51dda8d3..d861f775 100644 --- a/工具/手动统计结果转换.ipynb +++ b/工具/手动统计结果转换.ipynb @@ -43,7 +43,7 @@ " output_data += \"\\n\".join(results_dict[id])\n", " output_data += \"\\n\\n\"\n", "\n", - "with open(\"临时文件/统计测试.txt\",\"w\",encoding = \"utf8\") as f:\n", + "with open(\"临时文件/字段数据.txt\",\"w\",encoding = \"utf8\") as f:\n", " f.write(output_data)\n" ] } diff --git a/工具/批量添加题库字段数据.ipynb b/工具/批量添加题库字段数据.ipynb index 46b79f12..3e32a83b 100644 --- a/工具/批量添加题库字段数据.ipynb +++ b/工具/批量添加题库字段数据.ipynb @@ -9,7 +9,7 @@ "import os,re,json\n", "\n", "\"\"\"---明确数据文件位置---\"\"\"\n", - "datafile = \"临时文件/统计测试.txt\"\n", + "datafile = \"临时文件/字段数据.txt\"\n", "# 双回车分隔,记录内单回车分隔列表,首行为字段名\n", "\"\"\"---文件位置结束---\"\"\"\n", "\n", diff --git a/工具/根据范围提取课时目标.ipynb b/工具/根据范围提取课时目标.ipynb index c92960d8..44b258dd 100644 --- a/工具/根据范围提取课时目标.ipynb +++ b/工具/根据范围提取课时目标.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -46,6 +46,13 @@ "with open(r\"临时文件/课时目标提取结果.tex\",\"w\",encoding = \"utf8\") as f:\n", " f.write(output_string)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/工具/测验周末卷模板.tex b/工具/模板文件/测验周末卷模板.tex similarity index 100% rename from 工具/测验周末卷模板.tex rename to 工具/模板文件/测验周末卷模板.tex diff --git a/工具/第一轮复习讲义模板.tex b/工具/模板文件/第一轮复习讲义模板.tex similarity index 95% rename from 工具/第一轮复习讲义模板.tex rename to 工具/模板文件/第一轮复习讲义模板.tex index 10a9871b..da8883e7 100644 --- a/工具/第一轮复习讲义模板.tex +++ b/工具/模板文件/第一轮复习讲义模板.tex @@ -56,8 +56,8 @@ A.~#1 &B.~#2& C.~#3& D.~#4 % 修改标题处 -\newcommand{\notesindex}{1} -\newcommand{\notestitle}{集合} +\newcommand{\notesindex}{标题数字待处理} +\newcommand{\notestitle}{标题文字待处理} \begin{document} \begin{center} diff --git a/工具/课时划分.tex b/工具/模板文件/课时划分.tex similarity index 100% rename from 工具/课时划分.tex rename to 工具/模板文件/课时划分.tex diff --git a/工具/课时目标及单元目标.tex b/工具/模板文件/课时目标及单元目标.tex similarity index 100% rename from 工具/课时目标及单元目标.tex rename to 工具/模板文件/课时目标及单元目标.tex diff --git a/工具/题目清单.tex b/工具/模板文件/题目清单.tex similarity index 100% rename from 工具/题目清单.tex rename to 工具/模板文件/题目清单.tex diff --git a/工具/讲义生成.ipynb b/工具/讲义生成.ipynb index eb84ad3e..bf81991b 100644 --- a/工具/讲义生成.ipynb +++ b/工具/讲义生成.ipynb @@ -2,9 +2,24 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "正在处理题块 1 .\n", + "题块 1 处理完毕.\n", + "正在处理题块 2 .\n", + "题块 2 处理完毕.\n", + "开始编译教师版本pdf文件: 临时文件/复习讲义测试_教师_20220911.tex\n", + "0\n", + "开始编译学生版本pdf文件: 临时文件/复习讲义测试_学生_20220911.tex\n", + "0\n" + ] + } + ], "source": [ "import os,re,json,time\n", "\n", @@ -13,14 +28,14 @@ "\"\"\"---设置模式结束---\"\"\"\n", "\n", "\"\"\"---设置模板文件名---\"\"\"\n", - "# template_file = \"第一轮复习讲义模板.tex\"\n", - "template_file = \"测验周末卷模板.tex\"\n", + "template_file = \"模板文件/第一轮复习讲义模板.tex\"\n", + "# template_file = \"模板文件/测验周末卷模板.tex\"\n", "\"\"\"---设置模板文件名结束---\"\"\"\n", "\n", "\"\"\"---设置其他预处理替换命令---\"\"\"\n", "#2023届第一轮讲义更换标题\n", - "#exec_list = [(r\"\\\\newcommand{\\\\notesindex}\\{1\\}\",r\"\\\\newcommand{\\\\notesindex}{10}\"),(r\"\\\\newcommand{\\\\notestitle}{集合}\",r\"\\\\newcommand{\\\\notestitle}{测试}\")] \n", - "#enumi_mode = 0\n", + "exec_list = [(\"标题数字待处理\",\"10\"),(\"标题文字待处理\",\"测试\")] \n", + "enumi_mode = 0\n", "\n", "#2023届测验卷与周末卷\n", "# exec_list = [(\"标题替换\",\"周末卷02\")]\n", @@ -33,7 +48,7 @@ "\n", "\n", "\"\"\"---设置题号数据---\"\"\"\n", - "problems = [\"1,3,5:7\",\"30000:40000\",\"10000:10010\"]\n", + "problems = [\"1,3,5:7\",\"30000:40000\"]\n", "\"\"\"---设置题号数据结束---\"\"\"\n", "\n", "\n", @@ -165,6 +180,13 @@ " os.system(\"xelatex -interaction=batchmode -output-directory=\" + destination_dir + \" \"+ students_latex_file)\n", " print(os.system(\"xelatex -interaction=batchmode -output-directory=\" + destination_dir + \" \"+ students_latex_file))" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/工具/识别题库中尚未标注的题目类型.ipynb b/工具/识别题库中尚未标注的题目类型.ipynb index c923351f..2a054eec 100644 --- a/工具/识别题库中尚未标注的题目类型.ipynb +++ b/工具/识别题库中尚未标注的题目类型.ipynb @@ -29,38 +29,6 @@ " f.write(database)" ] }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "count = 0\n", - "for id in pro_dict:\n", - " if pro_dict[id][\"genre\"] == \"\":\n", - " count += 1" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "count" - ] - }, { "cell_type": "code", "execution_count": null, diff --git a/工具/课时目标及课时划分信息汇总.ipynb b/工具/课时目标及课时划分信息汇总.ipynb index d08e9a94..2df83a03 100644 --- a/工具/课时目标及课时划分信息汇总.ipynb +++ b/工具/课时目标及课时划分信息汇总.ipynb @@ -2,9 +2,28 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "开始编译单元与课时目标信息pdf文件: 临时文件/课时目标及单元目标_20220911.tex\n", + "开始编译课时划分信息pdf文件: 临时文件/课时划分_20220911.tex\n" + ] + }, + { + "data": { + "text/plain": [ + "0" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "import os,re,time,json\n", "\n", @@ -111,7 +130,7 @@ "\n", "\n", "#替换单元课时目标的latex文件的内容并编译\n", - "with open(\"课时目标及单元目标.tex\",\"r\",encoding = \"utf8\") as f:\n", + "with open(\"模板文件/课时目标及单元目标.tex\",\"r\",encoding = \"utf8\") as f:\n", " obj_latex_file_raw = f.read()\n", "obj_latex_file_new = obj_latex_file_raw.replace(\"课时目标待替换\",lessons_obj_string).replace(\"单元目标待替换\",units_obj_string)\n", "with open(lessonobj_file,\"w\",encoding = \"utf8\") as f:\n", @@ -123,7 +142,7 @@ "os.system(\"xelatex -interaction=batchmode -output-directory=\" + lessonobj_dir + \" \"+ lessonobj_file)\n", "\n", "#替换课时划分的latex文件的内容并编译\n", - "with open(\"课时划分.tex\",\"r\",encoding = \"utf8\") as f:\n", + "with open(\"模板文件/课时划分.tex\",\"r\",encoding = \"utf8\") as f:\n", " lessons_cut_latex_file_raw = f.read()\n", "lessons_cut_latex_file_new = lessons_cut_latex_file_raw.replace(\"待替换\",lessons_cut_string)\n", "with open(lessoncut_file,\"w\",encoding = \"utf8\") as f:\n", @@ -134,6 +153,13 @@ "os.system(\"xelatex -interaction=batchmode -output-directory=\" + lessoncut_dir + \" \"+ lessoncut_file)\n", "os.system(\"xelatex -interaction=batchmode -output-directory=\" + lessoncut_dir + \" \"+ lessoncut_file)\n" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/工具/题号选题pdf生成.ipynb b/工具/题号选题pdf生成.ipynb index 05d5361f..a82f91ae 100644 --- a/工具/题号选题pdf生成.ipynb +++ b/工具/题号选题pdf生成.ipynb @@ -20,7 +20,7 @@ "import os,re,time,json\n", "\n", "\"\"\"\n", - "同目录下 题目清单.tex 文件不能缺失\n", + "模板文件目录下 题目清单.tex 文件不能缺失\n", "\"\"\"\n", "\n", "\"\"\"---设置题目列表---\"\"\"\n", @@ -132,7 +132,7 @@ "\n", "\n", "#替换latex文件的内容并编译\n", - "with open(\"题目清单.tex\",\"r\",encoding = \"utf8\") as f:\n", + "with open(\"模板文件/题目清单.tex\",\"r\",encoding = \"utf8\") as f:\n", " latex_raw = f.read()\n", "latex_teachers = latex_raw.replace(\"编译模板\",data_teachers)\n", "with open(teachers_latex_file,\"w\",encoding = \"utf8\") as f:\n",