Skip to content

Commit

Permalink
1.8 版
Browse files Browse the repository at this point in the history
支援RIME afrink 分享的 liur_trad.dict.yaml 字根表
  • Loading branch information
shadowjohn committed Jun 25, 2018
1 parent a95e8dc commit 587a940
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -10,6 +10,7 @@ dist/old
dist/old/*
dist/*.zip
dist/*.rar
dist/liur_trad.dict.yaml
linux/liu-uni.tab
linux/liu.cin
linux/liu.json
Expand All @@ -22,3 +23,4 @@ terry_boshiamy.txt
linux/boshiamy.txt
linux/old/*
linux/fcitx_boshiamy.txt
字根檔/*
12 changes: 8 additions & 4 deletions README.md
Expand Up @@ -9,9 +9,9 @@
作者:羽山秋人 (<a target="_blank" href="http://3wa.tw">http://3wa.tw</a>)<br>
<br>
最初開發日期:2017-06-16 11:24<br>
最後更新日期:2018-05-08 23:15
最後更新日期:2018-06-25 10:08
<br>
版本:V 1.7<br>
版本:V 1.8<br>
<br>
下載位置:<br>
  1.主程式:<a download="uclliu.exe" target="_blank" href="https://raw.githubusercontent.com/shadowjohn/UCL_LIU/master/dist/uclliu.exe">https://raw.githubusercontent.com/shadowjohn/UCL_LIU/master/dist/uclliu.exe</a><br>
Expand Down Expand Up @@ -67,7 +67,10 @@

(2018-05-08) V1.7 版:
(修正)正常模式的字體初始時大小錯誤


(2018-06-25) V1.8 版:
支援RIME afrink 分享的 liur_trad.dict.yaml 字根表
<br>
開發工具:<br>
<ul>
Expand Down Expand Up @@ -193,7 +196,8 @@ ToDo:<br>
<li>(Done 2018-05-05)56、右邊數字鍵的 . 直接輸出即可</li>
<li>(Done 2018-05-05)57、移除uclliu_debug,改用 -d 即可進入 debug 模式</li>
<li>(Done 2018-05-05)58、調整顯示字型大小</li>
<li>(Done 2018-05-08)59、正常模式的字體初始時大小錯誤</li>
<li>(Done 2018-05-08)59、正常模式的字體初始時大小錯誤</li>
<li>(Done 2018-06-25)60、支援RIME afrink 整理的 liur_trad.dict.yaml</li>
</ul>
<br>
版權:<br>
Expand Down
Binary file added RELEASE/1.8/uclliu.exe
Binary file not shown.
Binary file modified dist/uclliu.exe
Binary file not shown.
65 changes: 63 additions & 2 deletions uclliu.pyw
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
VERSION=1.7
VERSION=1.8
import portalocker
import os
import sys
Expand Down Expand Up @@ -119,7 +119,68 @@ if is_all_fault==True and my.is_file("C:\\Program Files\\BoshiamyTIP\\liu-uni.ta
is_all_fault=False
is_need_trans_tab=True
is_need_trans_cin=True
# 2018-04-08 加入 terry 輸入法支援

# 2018-06-25 加入 RIME liur_trad.dict.yaml 表格支援
if is_all_fault==True and my.is_file(PWD + "\\liur_trad.dict.yaml")==True:
debug_print("Run Rime liur_trad.dict.yaml ...");
my.copy(PWD+"\\liur_trad.dict.yaml",PWD+"\\liu.cin");
data = my.file_get_contents(PWD+"\\liu.cin");
m = my.explode("...",data);
data = my.trim(m[1])
data = my.str_replace("\t"," ",data);
# swap field
m = my.explode("\n",data);
for i in range(0,len(m)):
d = my.explode(" ",m[i]);
m[i] = "%s %s" % (d[1],d[0]);
data = my.implode("\n",m);
# 修正 cin 用的表頭
data = '''%gen_inp
%ename liu
%cname 肥米
%encoding UTF-8
%selkey 0123456789
%keyname begin
a A
b B
c C
d D
e E
f F
g G
h H
i I
j J
k K
l L
m M
n N
o O
p P
q Q
r R
s S
t T
u U
v V
w W
x X
y Y
z Z
, ,
. .
' ’
[ 〔
] 〔
%keyname end
%chardef begin
''' + data +"\n%chardef end\n";
my.file_put_contents(PWD+"\\liu.cin",data);
is_need_trans_tab = False;
is_need_trans_cin = True;
is_all_fault = False;

# 2018-04-08 加入 terry 表格支援
if is_all_fault==True and my.is_file(PWD + "\\terry_boshiamy.txt")==True:
#將 terry_boshiamy.txt 轉成 正常的 liu.cin、然後轉成 liu.json
debug_print("Run terry ...")
Expand Down

0 comments on commit 587a940

Please sign in to comment.