Skip to content

Commit

Permalink
Change the website
Browse files Browse the repository at this point in the history
  • Loading branch information
forFudan committed Jun 9, 2024
1 parent 5520921 commit adda7d5
Show file tree
Hide file tree
Showing 30 changed files with 39,234 additions and 40,476 deletions.
4 changes: 4 additions & 0 deletions beta/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ patch:

重新部署后即可使用。

## custom

/custom 中的文件爲 Rime 輸入法各平臺(小狼毫、鼠鬚管)方案的自定義設定。

## hotfix

/hotfix 中的文件,用於 Android 平臺的「中文輸入法」,以及一些 Rime 内核較老的程序。使用時,直接將文件覆蓋 /schema 下的原文件即可。
Expand Down
33 changes: 33 additions & 0 deletions beta/schema/lua/yuhao/yuhao_autocompletion_filter_conditional.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
--[[ Name: yuhao_autocompletion_filter_conditional.lua
名稱: 輸入預測條件開啓
Version: 20240527
Author: forFudan 朱宇浩 <[email protected]>
Github: https://github.com/forFudan/
Purpose: 當編碼長度小於等於四時,關閉輸入預測.
版權聲明:
專爲宇浩輸入法製作 <https://yuhao.forfudan.com>
轉載請保留作者名和出處
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International
---------------------------------------
]]

local core = require("yuhao.yuhao_core")

local function filter(input, env)
local length_of_input = string.len(env.engine.context.input)
if length_of_input <= 4 then
for cand in input:iter() do
if (cand.type == "completion") then
return
else
yield(cand)
end
end
else
for cand in input:iter() do
yield(cand)
end
end
end

return { func = filter }
4 changes: 2 additions & 2 deletions beta/schema/lua/yuhao/yuhao_char_filter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8913,7 +8913,6 @@ local str = [[
Expand Down Expand Up @@ -9110,7 +9109,6 @@ local str = [[
Expand Down Expand Up @@ -10981,6 +10979,7 @@ local str = [[
Expand Down Expand Up @@ -11083,6 +11082,7 @@ local str = [[
Expand Down
8 changes: 4 additions & 4 deletions beta/schema/lua/yuhao/yuhao_charsets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8884,7 +8884,6 @@ this.common = [[
Expand Down Expand Up @@ -9081,7 +9080,6 @@ this.common = [[
Expand Down Expand Up @@ -10952,6 +10950,7 @@ this.common = [[
Expand Down Expand Up @@ -11054,6 +11053,7 @@ this.common = [[
Expand Down Expand Up @@ -21204,7 +21204,7 @@ this.harmonic = [[
穿
Expand Down Expand Up @@ -21731,7 +21731,7 @@ this.harmonic = [[
Expand Down
9 changes: 9 additions & 0 deletions beta/schema/lua/yuhao/yuhao_core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,13 @@ function core.string_starts_with(text, start)
return text:sub(1, #start) == start
end

---通過 unicode 編碼輸入字符 @lost-melody
function core.unicode()
local space = utf8.codepoint(" ")
return function(args)
local code = tonumber(string.format("0x%s", args[1] or ""))
return utf8.char(code or space)
end
end

return core
18 changes: 0 additions & 18 deletions beta/schema/rime.lua

This file was deleted.

318 changes: 0 additions & 318 deletions beta/schema/symbols.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions beta/schema/yuhao_pinyin.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,8 @@ speller:
alphabet: zyxwvutsrqponmlkjihgfedcba
delimiter: " '"
algebra:
- erase/^hm$/
- erase/^m$/
- erase/^n$/
- erase/^ng$/
# - abbrev/^([a-z]).+$/$1/
- abbrev/^([zcs]h).+$/$1/
- derive/^([nl])ue$/$1ve/
- derive/^([jqxy])u/$1v/
- derive/un$/uen/
- derive/ui$/uei/
- derive/iu$/iou/
- derive/([aeiou])ng$/$1gn/
- derive/([dtngkhrzcs])o(u|ng)$/$1o/
- derive/ong$/on/
- derive/ao$/oa/
- derive/([iu])a(o|ng?)$/a$1$2/

translator:
dictionary: yuhao_pinyin
Expand Down
Loading

0 comments on commit adda7d5

Please sign in to comment.