Skip to content

Commit

Permalink
增加配置文件可拓展性
Browse files Browse the repository at this point in the history
  • Loading branch information
Flash-Z authored Feb 3, 2023
1 parent 33c7553 commit 85e1960
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions ToDoList/todolist/operate_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def operate_list(server, info, args):
f'§r点击项目名称以修改信息\n'
f'§7最后修改者:§6 {fun.list_dic.get(name)["creator"]} §7时间:§6 {fun.list_dic.get(name)["time"]}\n',
# f'§7项目类别:§6 {fun.list_dic.get(name)["tags"]}\n',
f'§7项目描述:§6 {fun.list_dic.get(name)["detail"]}\n',
f'§7项目描述:§6 {fun.list_dic.get(name)["detail"][0]}\n',
f'§7进度描述:§6 {fun.list_dic.get(name)["progress"]}'
)
)
Expand Down Expand Up @@ -63,20 +63,20 @@ def operate_list(server, info, args):
'creator': info.player,
'time': time.strftime('%Y-%m-%d %H:%M'),
'tags':['defult'],
'detail': args[3],
'detail': [args[3],args[4]],
'progress': args[4]
}
fun.save()
server.reply(info, f'§b[ToDoList]§a已添加ToDo {args[2]}')

elif len(args) == 6:
if args[1] == "add" or args[1] == "a":
fun.list_dic[args[2]] = {
'creator': info.player,
'time': time.strftime('%Y-%m-%d %H:%M'),
'category':args[5],
'detail': args[3],
'progress': args[4]
}
fun.save()
server.reply(info, f'§b[ToDoList]§a已添加ToDo {args[2]}')
# elif len(args) == 6:
# if args[1] == "add" or args[1] == "a":
# fun.list_dic[args[2]] = {
# 'creator': info.player,
# 'time': time.strftime('%Y-%m-%d %H:%M'),
# 'category':args[5],
# 'detail': [args[3],args[4]],
# 'progress': args[4]
# }
# fun.save()
# server.reply(info, f'§b[ToDoList]§a已添加ToDo {args[2]}')

0 comments on commit 85e1960

Please sign in to comment.