Skip to content

Commit

Permalink
add build for rabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Aug 18, 2024
1 parent d26cdb4 commit 15fbd76
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ jobs:
build-package:
strategy:
matrix:
target: [ weasel, hamster, irime, squirrel ]
target: [ weasel, hamster, irime, squirrel, rabbit ]
include:
- { target: weasel, name: Weasel, emoji: 🦡 }
- { target: hamster, name: Hamster, emoji: 🐹 }
- { target: irime, name: iRime, emoji: ℹ️ }
- { target: squirrel, name: Squirrel, emoji: 🐿️ }
- { target: rabbit, name: Rabbit, emoji: 🐇️ }
name: Build Package for ${{ matrix.name }} ${{ matrix.emoji }}
runs-on: ubuntu-latest
needs: prepare-schemas
Expand Down Expand Up @@ -111,6 +112,15 @@ jobs:
cp lua/* ${{ matrix.target }}/lua/ && \
echo "prepare for ${{ matrix.target }} done."
- name: Prepare User Settings for Rabbit 🐇️
if: ${{ matrix.target == 'rabbit' }}
run: |
mkdir -p ${{ matrix.target }}/lua ${{ matrix.target }}/opencc && \
cp -r schemas/pinyin_simp.* schemas/jiandao.base.dict.yaml ${{ matrix.target }}/ && \
cp lua/* ${{ matrix.target }}/lua/ && \
cp schemas/opencc/emoji_plus.* schemas/opencc/s2m.json schemas/opencc/SM* ${{ matrix.target }}/opencc/ && \
echo "prepare for ${{ matrix.target }} done."
- name: Make Zip Archive 🗄️
run: |
cd ${{ matrix.target }}
Expand Down Expand Up @@ -143,6 +153,7 @@ jobs:
- { target: hamster, name: Hamster, emoji: 🐹 }
- { target: irime, name: iRime, emoji: ℹ️ }
- { target: squirrel, name: Squirrel, emoji: 🐿️ }
- { target: rabbit, name: Rabbit, emoji: 🐇️ }
name: Upload Assets of ${{ matrix.name }} ${{ matrix.emoji }}
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
Expand Down
20 changes: 20 additions & 0 deletions rabbit/default.custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
patch:
ascii_composer/switch_key:
Caps_Lock: noop
Control_L: noop
Control_R: noop
Shift_L: commit_code
Shift_R: noop
key_binder/bindings:
- { when: always, accept: Shift+space, select: .next }
- { when: always, accept: Control+Alt+comma, toggle: full_shape }
- { when: always, accept: Control+Alt+period, toggle: ascii_punct }
schema_list:
- { schema: jiandao }
- { schema: pinyin_simp }
switcher/hotkeys:
- Control+quoteright
- Control+Shift+space
switcher/save_options/+:
- traditionalization
- martianization
36 changes: 36 additions & 0 deletions rabbit/jiandao.custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
patch:
schema/dependencies:
- pinyin_simp
switches/@2: { options: [ simplification, traditionalization, martianization ], abbrev: [ 汉, 漢, 焱 ], states: [ 通用规范汉字, 繁體字, 焱暒妏 ] }
engine/filters/+:
- simplifier@martianization
- lua_filter@*comment_spliter
- simplifier@emoji_plus
engine/translators/+:
- reverse_lookup_translator
recognizer/patterns/+:
reverse_lookup: "^u[a-z]*'?$"
reverse_lookup:
dictionary: pinyin_simp
prefix: "u"
suffix: "'"
tips: "〔全拼〕"
preedit_format:
- xform/^u(.+)/$1/
- xform/([nl])v/$1ü/
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/
comment_format:
- xform/^/〔/
- xform/$/〕/
- xform/ /, /
martianization:
opencc_config: s2m.json
option_name: martianization
tips: all
random: true
emoji_plus:
opencc_config: emoji_plus.json
option_name: emoji_suggestion
tips: all
hint_text: '✖️'
5 changes: 5 additions & 0 deletions rabbit/pinyin_simp.custom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
patch:
schema/dependencies: null
engine/translators:
- punct_translator
- script_translator

0 comments on commit 15fbd76

Please sign in to comment.