Added update script

This commit is contained in:
tom5079
2020-10-05 19:06:41 +09:00
parent 97e060fa0c
commit 6296108000
5 changed files with 31 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
import json
import sys
tags = {tag: u'' for tag in json.loads(''.join(sys.stdin.readlines()))}
try:
with open(sys.argv[1], encoding='utf-8') as f:
lang = json.load(f)
except:
lang = dict()
for tag in tags:
if tag in lang and lang[tag]:
tags[tag] = lang[tag]
with open(sys.argv[1], 'w', encoding='utf-8') as f:
json.dump(tags, f, indent=4, ensure_ascii=False)