From b88cafe62771acda591de17f633ef5e3d3409b3e Mon Sep 17 00:00:00 2001 From: Bennett <2165217440@qq.com> Date: Fri, 9 May 2025 21:12:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BE=93=E5=87=BA=EF=BC=88?= =?UTF-8?q?=E6=9C=89=E7=94=A8=E5=90=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadOpt.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ReadOpt.py b/ReadOpt.py index 7d1cae4..ff8b395 100644 --- a/ReadOpt.py +++ b/ReadOpt.py @@ -2,7 +2,7 @@ import xml.etree.ElementTree as ET PLUS = "+" EMPTY = "" - +level_name = ["Basic","Advanced","Expert","Master","Re:Master"] def parse_music_xml(file_path): # 解析 XML 文件 tree = ET.parse(file_path) @@ -51,8 +51,10 @@ if __name__ == "__main__": print("音乐名称:", music_name) print("艺术家名称:", artist_name) print("启用谱面列表:") - for idx, info in enumerate(note_infos, 1): - print(f" 第{idx}个谱面:") - print(f" 定数: {info['level']}") - print(f" 难度: {info['levelshow']}") - print(f" 谱面设计者: {info['designer']}") + for i in range(len(note_infos)): + print(level_name[i]) + print(f"等级:{note_infos[i]['levelshow']}") + print(f"定数:{note_infos[i]['level']}") + print(f"铺师:{note_infos[i]['designer']}") + print() +