Skip to content

Commit

Permalink
修复数据格式化错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
soonio committed Feb 23, 2023
1 parent 1013ce2 commit 9246db2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@
if not os.path.isfile(filename) or not x.endswith('.json'):
continue
one = {}
np = "未知"
for e in envs:
if e in x:
one['env'] = envs.get(e)
np = envs.get(e)
break
with open(filename, 'r') as f:
data = json.load(f)
one['title'] = data.get('info').get('title')
one['version'] = data.get('info').get('version')
one['name'] = '[{env}]{title}-{version}'.format(env=np, title=data.get('info').get('version'), version=data.get('info').get('title'))
one['url'] = filename

# "name": fmt.Sprintf("[%s]%s-%s", np, sj.Info.Title, sj.Info.Version),
# "url": filename,

f.close()

config.append(one)
Expand Down

0 comments on commit 9246db2

Please sign in to comment.