From 5c74017d57b9bd6a3baede628d2c9c4a65430ac0 Mon Sep 17 00:00:00 2001 From: Ayaka Mikazuki Date: Fri, 11 Sep 2020 12:35:04 +0800 Subject: [PATCH] Update build script and icons 1. Use build script from https://github.com/CanCLID/ToJyutping/commit/f607036f6cce114fced2502aa0d2d0d8169b67f6 2. Add icon of more sizes --- build.py | 18 ++++-------------- icons/128.png | Bin 0 -> 4100 bytes icons/48.png | Bin 0 -> 1692 bytes manifest.json | 6 ++++-- 4 files changed, 8 insertions(+), 16 deletions(-) create mode 100644 icons/128.png create mode 100644 icons/48.png diff --git a/build.py b/build.py index 7a08366..adc5f47 100644 --- a/build.py +++ b/build.py @@ -1,30 +1,20 @@ import json -from opencc import OpenCC import os # Library 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/master/preprocess.py') +os.system('wget -nc https://github.com/CanCLID/ToJyutping/raw/f607036f6cce114fced2502aa0d2d0d8169b67f6/preprocess.py') os.system("sed -i 's/src\/ToJyutping\/jyut6ping3.simple.dict.yaml/jyut6ping3.simple.dict.yaml/' preprocess.py") os.system('python preprocess.py') -# Build dictionary -converter = OpenCC('t2s') - -d_t = {} -d_cn = {} +l = [] with open('jyut6ping3.simple.dict.yaml') as f: for line in f: - k_t, v = line.rstrip('\n').split('\t') - k_cn = converter.convert(k_t) - d_t[k_t] = v - d_cn[k_cn] = v - -d = {**d_cn, **d_t} # prefer t over cn -l = list(d.items()) + 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[')) diff --git a/icons/128.png b/icons/128.png new file mode 100644 index 0000000000000000000000000000000000000000..64da42ccf873f7108fc5161ed3b6a47176ca29fa GIT binary patch literal 4100 zcmZWsX*ASr-2TtlW-QssR*WS=Ns1}VG{zPp8C%Ml7+JDpZ$^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QAtWtHcGaH1Inxo9pBlPhCCDDdP**RT zY9=LFW1p+0-J8wM5`iX3aLSc(nXLy0E!kBO1%z{LHyWp6c>3=_=e~VImo+@a$FKHs z$+&>v;(yuAsHHRT$pansD3lDc6Z%0`;Ycb2aX}lT7c#15bb!9?h6rPu?JS#nFUS_W0_A{b03?ath%(b8VkL_iU rM~;Qn0+wKEz3=+{|GP~+oWW^)$(m>fmZMLWLBLS=7P=he@a%s8n%tUi literal 0 HcmV?d00001 diff --git a/icons/48.png b/icons/48.png new file mode 100644 index 0000000000000000000000000000000000000000..ca08b784faf41d06fd0ddd5567cbe739e94789b3 GIT binary patch literal 1692 zcmV;N24ne&P)EX>4Tx04R}tkv&MmKpe$i(~4ge1v`icW~fdUL`5963Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#IXWr2NQwVz3N2zhIPS;0dyl(!fKV+m%?gYInr@qk zSX4}MbfOyp45LqGmN6$uad?ied-(Wz7vWjn=l&c$YQ|!KPb8jYhG`RT5KnK~ z2Iqa^5X;Ld@j3CBNf#u3?RNSu2)V+kRU=q83hz!BSNcAiiHI2M?L(5b-zR|g&*+=dK>sb!wdVHL*vIJukfg5SH^9Lm zFq)(6b&q#!ke00006VoOIv00000008+zyMF)x010qNS#tmY zE+YT{E+YYWr9XB6000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{00eYNL_t(&-tC!NY*b|s$A70SEiE>nAduxMRjBZw-2tnh z0TCON7^2ajc)x`jV@ za8Oc5w&P18u3H1ljUa5JnKgvI=L7qJhk=oCT40hd*a3``wBPwx0zUxLfdi5{%xoes z%7?D;_O(Deun$-usWqwvqgr4w@ECADur0)Y-{)KpTfQ^!x-TjukLObJDU<=R;3*ev`cDp_CDY~GaCim z3w-bVcA(D8#`}JG+RScu$ivw($? zPQ?{Qp8#qynara>5R3yp1Lj3ZM7dH)1mSN1mI9lDAeiC)|6C!2|6fq)U`%RemnRYl z(&_Z^qI01EQZtY?v!iB~EJ_8;?7VaEYk`TtQDBawmVV}$YGxB+h10%p8?X_0r%%&z zpb@wW_^F?1syq>v0e48+8K(jnfBhgwFIemfv;%e7BGY_i;+y`fJ(*0F20>8g39BBM z?0@@r{}G))br1yOQ>oNng#dFTlgYqy!f0To*8?>U4=xRL?E(%1+sy0+Nhf+6%FD}7 zM_D^B3IsuLC$P*5oZox{9|3L#4mnyq1l$UokhHz1!l{(#Gq+dc-YLoOha0PG-Se-8=O7bB5Y+x5q30x#;jigMU;=Naq6j0|SXkD>Hq5FNF z&a-rzJODtq1*j}!6uPRP_S%8UU}ja4PR6Ogc1bI8bipye=iS}imB0=&+Yto8s#GeK z$(swASsC!aAXkTr95dmk97_jcjR9FeQjec9pX=;$8889($TM#g`Wbk!7e8_4F!{79&*+{ zIpm>Tz#>WAu_+Mxi%md>r0267SHqdxnr>i5)LWW-fVn3l4qf8U-G#Vf%GGMaLJ0Q5 zg2L$m2)ltZmwcBvr0xP{d$HdIyjl<}6hV=Rz?&iHaT>Ts(i^$VTN;-F>2$g?kw_c? mdVsfqN1~j>4bc$gnf?V literal 0 HcmV?d00001 diff --git a/manifest.json b/manifest.json index 57d6361..21d088a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,12 @@ { "manifest_version": 2, "name": "__MSG_extensionName__", - "version": "0.2.0", + "version": "0.2.1", "description": "__MSG_extensionDescription__", "icons": { - "96": "icons/96.png" + "48": "icons/48.png", + "96": "icons/96.png", + "128": "icons/128.png" }, "content_scripts": [ {