mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-09-06 20:36:23 +00:00
浅浅更新一下
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user