Skip to content

Commit

Permalink
Update ToJyutping to CanCLID/ToJyutping@54945d4
Browse files Browse the repository at this point in the history
  • Loading branch information
ayaka14732 committed Sep 27, 2020
1 parent d10abb3 commit 638b80a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
os.system('wget -nc -O lib/browser-polyfill.js https://unpkg.com/webextension-polyfill@0.6.0/dist/browser-polyfill.js')

# Preprocess
os.system('wget -nc https://github.com/CanCLID/ToJyutping/raw/f607036f6cce114fced2502aa0d2d0d8169b67f6/preprocess.py')
os.system('wget -nc https://github.com/CanCLID/ToJyutping/raw/54945d4cf1fc86858acff7b1dd6f3f13dc838bf0/preprocess.py')
os.system("sed -i 's/src\/ToJyutping\/jyut6ping3.simple.dict.yaml/jyut6ping3.simple.dict.yaml/' preprocess.py")
os.system('python preprocess.py')

l = []

with open('jyut6ping3.simple.dict.yaml') as f:
for line in f:
k, v = line.rstrip('\n').split('\t')
l.append((k, v))
for line in f:
k, v = line.rstrip('\n').split('\t')
l.append((k, v))

with open('background_scripts/dictionary.json.txt', 'w') as f:
f.write(json.dumps(l, ensure_ascii=False).replace('], [', '],\n['))
f.write('\n') # Add line break at the end of file
with open('background_scripts/dictionary.json.txt', 'w') as f: # *.json.txt: See mozilla/addons-linter#1700
f.write(json.dumps(l, ensure_ascii=False).replace('], [', '],\n['))
f.write('\n') # Add line break at the end of file
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "__MSG_extensionName__",
"version": "0.2.2",
"version": "0.2.3",
"description": "__MSG_extensionDescription__",
"icons": {
"48": "icons/48.png",
Expand Down

0 comments on commit 638b80a

Please sign in to comment.