浅浅更新一下

This commit is contained in:
EillesWan
2022-06-11 13:53:59 +08:00
parent 1fde8ca253
commit 1980aeb8de
12 changed files with 63 additions and 24 deletions

View File

@ -1,6 +1,37 @@
# -*- coding: UTF-8 -*-
"""音·创的核心内置组件功能集合"""
def author_reader(path:str = './resources/msctDevAuthors.txt'):
'''读入作者数据,格式需要按照署名文件中的指定格式,详见/resources/msctDevAuthors.txt
:param path: 作者署名文件所在路径
:return 指定的作者格式
{
'作者常用名':{
'语言码' : '对应语言的名字',
},
}'''
allAuthors = open(path,'r',encoding='utf-8').readlines()
result = {}
indexName = ''
for line in allAuthors:
line = line.replace('\n', '')
if (not line.startswith('#')) and line:
if line.startswith(''):
if indexName:
result[indexName] = authorList
indexName = line[line.index('')+1:]
authorList = {}
continue
line_c = ''
for char in line:
if not char == '#':
line_c += char
else:
break
authorList[line_c.split(' ', 1)[0]] = line_c.split(' ', 1)[1]
result[indexName] = authorList
return result
class version:
@ -10,7 +41,7 @@ class version:
)
"""当前所需库"""
version = ('0.3.0', 'Delta',)
version = ('0.3.0', '',)
"""当前版本"""
def __init__(self) -> None: