fix: 增加测试数据

This commit is contained in:
2025-12-12 15:37:28 +08:00
parent 5889652c05
commit 7ab6881905
3 changed files with 417 additions and 3 deletions

View File

@@ -29,12 +29,13 @@ class NucleonCreatorScreen(Screen):
if i.name.endswith('.toml'):
try:
import toml
with open('r', i) as f:
with open(i, 'r') as f:
dic = toml.load(f)
desc = dic['__metadata__']['attribution']['desc']
desc = dic['__metadata__.attribution']['desc']
templates.append(desc + ' (' + i.name + ')')
except:
except Exception as e:
templates.append(f'无描述模板 ({i.name})')
print(e)
print(templates)
return templates