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