From 022ef924d3b88f37e72a0d9b9dddb4585d7fd664 Mon Sep 17 00:00:00 2001 From: "weiye.wang" Date: Wed, 10 Jan 2024 20:32:47 +0800 Subject: [PATCH] =?UTF-8?q?database=5Ftools=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=8D=95=E5=85=83=E5=90=8D=E7=9A=84=E5=87=BD?= =?UTF-8?q?=E6=95=B0getUnit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 6dd24f5a..ab4ea995 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -1298,5 +1298,10 @@ def GenerateSingleLessonNote(id,notesdict,metadict,templatepath,outputfilepath,c return latex_data # 返回有错误的latex源代码 +def getUnit(n): # 返回0-9的数字对应的单元名 + unitlist = ["暂无对应","第一单元","第二单元","第三单元","第四单元","第五单元","第六单元","第七单元","第八单元","第九单元"] + if 0<=n<=9: + return unitlist[n] + if __name__ == "__main__": print("数据库工具, import用.") \ No newline at end of file