shanhai
This commit is contained in:
parent
820b148dd3
commit
17e347e38a
File diff suppressed because it is too large
Load Diff
18
role/mori/files/pay.py
Normal file
18
role/mori/files/pay.py
Normal file
@ -0,0 +1,18 @@
|
||||
import json
|
||||
|
||||
res = {}
|
||||
with open('pay.json', 'r', encoding='utf8') as f:
|
||||
j = json.load(f)
|
||||
data = j['data']
|
||||
keys = [j['keys']] * len(data)
|
||||
for k_array, v_array in zip(keys, data):
|
||||
tmp = {}
|
||||
for k, v in zip(k_array, v_array):
|
||||
tmp[k] = v
|
||||
tmp['name'] = tmp['beizhu']
|
||||
tmp['unitPrice'] = tmp['unitprice']
|
||||
res[tmp['proid']] = tmp
|
||||
|
||||
with open('pay.json', 'w', encoding='utf8') as f:
|
||||
res = {'paycon': {'default': res}}
|
||||
json.dump(res, f)
|
@ -9,6 +9,12 @@
|
||||
export: yes
|
||||
force: yes
|
||||
|
||||
- name: 适配结构
|
||||
local_action: shell
|
||||
args:
|
||||
chdir: "{{ansible_role_name}}/files/"
|
||||
cmd: "python3 pay.py"
|
||||
|
||||
- name: 拷贝到gm
|
||||
copy:
|
||||
src: pay.json
|
||||
|
15
role/shanhai/files/equip.py
Normal file
15
role/shanhai/files/equip.py
Normal file
@ -0,0 +1,15 @@
|
||||
import json
|
||||
|
||||
res = {}
|
||||
with open('equip.json', 'r', encoding='utf8') as f:
|
||||
j = json.load(f)
|
||||
data = j['data']
|
||||
keys = [j['keys']] * len(data)
|
||||
for k_array, v_array in zip(keys, data):
|
||||
tmp = {}
|
||||
for k, v in zip(k_array, v_array):
|
||||
tmp[k] = v
|
||||
res[tmp['id']] = tmp
|
||||
|
||||
with open('equip.json', 'w', encoding='utf8') as f:
|
||||
json.dump(res, f)
|
File diff suppressed because one or more lines are too long
15
role/shanhai/files/item.py
Normal file
15
role/shanhai/files/item.py
Normal file
@ -0,0 +1,15 @@
|
||||
import json
|
||||
|
||||
res = {}
|
||||
with open('item.json', 'r', encoding='utf8') as f:
|
||||
j = json.load(f)
|
||||
data = j['data']
|
||||
keys = [j['keys']] * len(data)
|
||||
for k_array, v_array in zip(keys, data):
|
||||
tmp = {}
|
||||
for k, v in zip(k_array, v_array):
|
||||
tmp[k] = v
|
||||
res[tmp['itemid']] = tmp
|
||||
|
||||
with open('item.json', 'w', encoding='utf8') as f:
|
||||
json.dump(res, f)
|
@ -9,6 +9,12 @@
|
||||
export: yes
|
||||
force: yes
|
||||
|
||||
- name: 适配结构
|
||||
local_action: shell
|
||||
args:
|
||||
chdir: "{{ansible_role_name}}/files/"
|
||||
cmd: "python3 equip.py"
|
||||
|
||||
- name: 拷贝到gm
|
||||
copy:
|
||||
src: equip.json
|
||||
|
@ -9,6 +9,12 @@
|
||||
export: yes
|
||||
force: yes
|
||||
|
||||
- name: 适配结构
|
||||
local_action: shell
|
||||
args:
|
||||
chdir: "{{ansible_role_name}}/files/"
|
||||
cmd: "python3 item.py"
|
||||
|
||||
- name: 拷贝到gm
|
||||
copy:
|
||||
src: item.json
|
||||
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
|
||||
- include: equip.yml
|
||||
- include: glyph.yml
|
||||
#- include: glyph.yml
|
||||
- include: hero.yml
|
||||
- include: item.yml
|
||||
- include: pay.yml
|
||||
- include: pet.yml
|
||||
#- include: pet.yml
|
||||
- include: shipin.yml
|
||||
- include: wuhun.yml
|
||||
#- include: wuhun.yml
|
||||
|
Loading…
Reference in New Issue
Block a user