database_tools中添加返回单元名的函数getUnit
This commit is contained in:
parent
e47c4fce4e
commit
022ef924d3
|
|
@ -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用.")
|
||||
Reference in New Issue