Skip to content

Commit

Permalink
feat: support xiaoxiao (yong) IME
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Aug 28, 2024
1 parent de0795a commit 486afce
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,19 @@ jobs:
sed -i 's/*jiandao\///g' jiandao.schema.yaml
zip -r -q ../jiandao-legacy.zip *
- name: Make Xiaoxiao Zip
run: |
cd xiaoxiao
zip -r -q ../jiandao-xiaoxiao.zip *
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: zips
path: |
jiandao.zip
jiandao-legacy.zip
jiandao-xiaoxiao.zip
create-release:
name: Create Release
Expand All @@ -99,13 +105,15 @@ jobs:
mv schema/recipe.yaml release/
mv jiandao.zip jiandao-${{ github.ref_name }}.zip
mv jiandao-legacy.zip jiandao-legacy-${{ github.ref_name }}.zip
mv jiandao-xiaoxiao.zip jiandao-xiaoxiao-${{ github.ref_name }}.zip
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
files: |
jiandao-${{ github.ref_name }}.zip
jiandao-legacy-${{ github.ref_name }}.zip
jiandao-xiaoxiao-${{ github.ref_name }}.zip
scripts/installer.bat
- name: Push to Release
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ clean:
ifneq ("$(wildcard dicts/cizu_raw.txt.bak)", "")
mv dicts/cizu_raw.txt.bak dicts/cizu_raw.txt
endif
rm -rf dicts/02.cizu.txt schema/*.dict.yaml temp.txt
rm -rf dicts/02.cizu.txt schema/*.dict.yaml temp.txt xiaoxiao/mb/jiandao.txt

.PHONY: all dicts deweight check clean
13 changes: 13 additions & 0 deletions scripts/make_dicts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ usage() {

RAWDICT="${BASEDIR}/../dicts/cizu_raw.txt"
OUTPUT="${BASEDIR}/../schema/jiandao.base.dict.yaml"
XIAOXIAO="${BASEDIR}/../xiaoxiao/mb/jiandao.txt"
VERSION="master"
DEWEIGHT=0

Expand Down Expand Up @@ -163,3 +164,15 @@ import_tables:
- jiandao.user
...
EOF

cat << EOF > ${XIAOXIAO}
encode=UTF-8
name=🌟️星空键道
key=zyxwvutsrqponmlkjihgfedcba
len=6
wildcard=]
assist=` mb/pinyin.txt
[data]
EOF
awk -v FS='\t' -v OFS=' ' '{print $2,$1}' ${BASEDIR}/../dicts/0*.txt >> ${XIAOXIAO}
2 changes: 2 additions & 0 deletions xiaoxiao/mb/jiandao.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[IM]
overlay=libmb.so mb/jiandao.txt
127 changes: 127 additions & 0 deletions xiaoxiao/yong.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#!/usr/bin/yong-config
#Yong输入法配置文件 edit for jiandao

[DESC]
#配置文件版本
version=2

[IM]
default=0
0=jiandao
1=pinyin

#候选字个数
cand=5
#简繁转换
s2t=0
#简繁一对多转换
s2t_m=0
#汉字过滤 0:不过滤 1:常用汉字
filter=0
#默认启动
enable=0
#皮肤
skin=skin
#回车键行为 clear:清编码 commit:上屏首选
#enter=clear
#数字键行为
#num=push
#半角出全角空格
#space=full
#预编辑模式 0:禁用 1:启用
onspot=0
#预编辑类型 0:候选 1:编码
preedit=0
#自动调频
auto_move=0
#历史记录
#history=history.txt
#小键盘 0:默认 1:不作为编码键 2:出数字
keypad=0

[main]
#用户的配置文件编辑器
edit=
#显示托盘图标
tray=1
#不显示主窗口
noshow=0
#状态栏半透明
tran=0
#主窗口位置 0:右下 1:顶部居中 2:左下
pos=0

[input]
#编码提示
hint=1
#不使用光标跟随
root=0
#不显示输入窗口
noshow=0
#候选显示长度
strip=9
#新光标跟随方式
a_caret=0

[key]
#打开输入法
trigger=CTRL_SPACE
#二三重码选择
select=; '
#中英文切换
CNen=LSHIFT
#临时英语模式
tEN=NONE
#切换输入法
switch=CTRL_LSHIFT
#翻页
page=- =
#以词定字
w2c=[ ]
#汉字过滤
filter=\\
#调词频
move=CTRL_UP CTRL_DOWN
#显示输入条
ishow=`
#一键切换到输入法
switch_default=CTRL_`
#笔画引导
bihua=CTRL_RSHIFT

[yong]
name=永码
engine=libmb.so
arg=mb/yong.txt

[wubi]
name=五笔
engine=libmb.so
arg=mb/wbx.txt
overlay=mb/wbx.ini

[zhengma]
name=郑码
engine=libmb.so
arg=mb/zhengma.txt

[erbi]
name=二笔
engine=libmb.so
arg=mb/erbi.txt

[gbk]
name=内码
engine=libgbk.so

[pinyin]
name=拼音
engine=libmb.so
arg=mb/pinyin.txt
overlay=mb/pinyin.ini

[jiandao]
name=🌟️星空键道
engine=libmb.so
arg=mb/jiandao.txt
overlay=mb/jiandao.ini

0 comments on commit 486afce

Please sign in to comment.