优化输出(有用吗

This commit is contained in:
2025-05-09 21:12:12 +08:00
parent 8f864c191e
commit b88cafe627

View File

@@ -2,7 +2,7 @@ import xml.etree.ElementTree as ET
PLUS = "+" PLUS = "+"
EMPTY = "" EMPTY = ""
level_name = ["Basic","Advanced","Expert","Master","Re:Master"]
def parse_music_xml(file_path): def parse_music_xml(file_path):
# 解析 XML 文件 # 解析 XML 文件
tree = ET.parse(file_path) tree = ET.parse(file_path)
@@ -51,8 +51,10 @@ if __name__ == "__main__":
print("音乐名称:", music_name) print("音乐名称:", music_name)
print("艺术家名称:", artist_name) print("艺术家名称:", artist_name)
print("启用谱面列表:") print("启用谱面列表:")
for idx, info in enumerate(note_infos, 1): for i in range(len(note_infos)):
print(f"{idx}个谱面:") print(level_name[i])
print(f" 定数: {info['level']}") print(f"等级:{note_infos[i]['levelshow']}")
print(f" 难度: {info['levelshow']}") print(f"定数:{note_infos[i]['level']}")
print(f" 谱面设计者: {info['designer']}") print(f"铺师:{note_infos[i]['designer']}")
print()