Skip to content

Commit

Permalink
fix: symbols.custom
Browse files Browse the repository at this point in the history
  • Loading branch information
boomker committed Oct 6, 2024
1 parent 0dcef8b commit 37b32e5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 29 deletions.
7 changes: 3 additions & 4 deletions flypy_chord_rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ patch:
- derive/^te/df/ # te --> df
- derive/^tw/dw/ # tw --> dw
- derive/^tg/db/ # tg --> db
- derive/^tv/tl/ # tv --> tl
- derive/^tv/dl/ # tv --> dl
- derive/^tr/rm/ # tr --> rm
- derive/^rf/rn/ # rf --> rn
- derive/^rg/rb/ # rg --> rb
Expand All @@ -41,11 +41,10 @@ patch:
- derive/^gr/gm/ # gr --> gm
- derive/^g([wyv])/gi/ # g[wyv] --> gi
- derive/^bp/bl/
- derive/^sv/sb/
- derive/^xp/sl/
- derive/^sv/sl/
- derive/^xp/xj/
- derive/^xt/xo/
- derive/^xs/xh/
- derive/^nj/xj/
- derive/^nu/nx/
- derive/^nh/nv/
- derive/^no/nr/
Expand Down
23 changes: 12 additions & 11 deletions flypy_xhfast.custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,20 @@ patch:

recognizer/+:
patterns/+:
timestamp: "^/uts$" # 时间戳
week: "^(/wk|week)$"
time: "^(/wt|time)$"
date: "^(/wd|date)$"
timestamp: "^/uts$" # 时间戳
chinese_lunar: "^/nl$" # 中国农历
chinese_number: "^/cn[0-9.]*$" # 中文数字
lunar: "^(/nl|lunar)$" # 中国农历
LaTeX: "^/(lt|LT)(.*)$" # LaTeX 公式
history: "^(/hs|hisz)$" # 上屏历史
shortcuts: "^/fj[a-z]*$" # 快捷指令
LaTeX: "^/lt(.*)$" # LaTeX 公式
calculator: "^/=(.*)$" # 简易计算器
radical_lookup: "~[a-z]+'?$" # ~ 部件拆字
easy_en: "/oe[a-zA-Z]*'?$" # 英文输入方案
flypy_help: "^/(oh|help)$" # 本方案帮助菜单
flypy_key_help: "^/ok[a-z]*$" # 小鹤双拼键位帮助
easy_en: "/oe[a-zA-Z]+'?$" # 英文输入
shortcuts: "^/fj[a-z]*$" # 快捷指令
flypy_help: "^/(oh|help)$" # 方案帮助菜单
calculator: "^(/=|/vs)(.*)$" # 简易计算器
radical_lookup: "~[a-z]+'?$" # 部件拆字组字
flypy_key_help: "^/ok[a-z]*$" # 双拼键位帮助
chinese_number: "^/cn[0-9.]*$" # 中文大写数字
switch_options: "^(/so|sopt)$" # 快速切换配置选项

punctuator/+:
Expand Down Expand Up @@ -161,7 +161,7 @@ patch:

radical_lookup/+: # 部件组字
prefix: "~"
tips: 部件组字
tips: 部件组字

radical_reverse_lookup/+: # 部件组字反查
overwrite_comment: false
Expand All @@ -174,6 +174,7 @@ patch:

calculator: # 计算器
tag: calculator
# prefix: "/vs"
prefix: "/="
tips: "计算器"

Expand Down
17 changes: 9 additions & 8 deletions lua/chinese_lunar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ local function diffDate(date1, date2)
+ leaveDate(tonumber(string.sub(date2, 1, 8)))
else
total = leaveDate(tonumber(string.sub(date2, 1, 8))) - leaveDate(tonumber(string.sub(date1, 1, 8)))
-- print(date1 .. "-" .. date2)
end
elseif tonumber(date2) == tonumber(date1) then
return 0
Expand Down Expand Up @@ -549,14 +548,16 @@ function T.func(input, seg, env)
local segment = composition:back()

local date1, date2 = Date2LunarDate(os.date("%Y%m%d"))
if (seg.tag == "chinese_lunar") or (input == "/nl") or (input == "lunar") then
if seg:has_tag("lunar") or (input == "/nl") or (input == "lunar") then
segment.prompt = "" .. "农历" .. ""
local lunar_date = Candidate("lunar", seg.start, seg._end, date1, "")
lunar_date.quality = 999
yield(lunar_date)
local lunar_ymd = (Candidate("lunar", seg.start, seg._end, date2, ""))
lunar_ymd.quality = 999
yield(lunar_ymd)
local lunar_date = date1 and Candidate("lunar", seg.start, seg._end, date1, "") or nil
local lunar_ymd = date2 and Candidate("lunar", seg.start, seg._end, date2, "") or nil
if lunar_date and lunar_ymd then
lunar_date.quality = 999
lunar_ymd.quality = 999
yield(lunar_date)
yield(lunar_ymd)
end
end
end

Expand Down
12 changes: 6 additions & 6 deletions symbols.custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ symbols:
'/9': [九, 玖, ⁹, ₉, Ⅸ, ⅸ, ⑨, ➈, ❾, ➒, ⓽, ⑼, ⒐, 9, ㊈, ㈨]
'/10': [十, 拾, ¹⁰, ₁₀, Ⅹ, ⅹ, ⑩, ➉, ❿, ➓, ⓾, ⑽, ⒑, 10, ㊉, ㈩, 什]
'/lk': [零, 〇, ⁰, ₀, ⓪, ⓿ , 0]
'/wi': [一, 壹, ¹, ₁, Ⅰ, ⅰ, ①, ➀, ❶, ➊, ⓵, ⑴, ⒈, 1, ㊀, ㈠, 弌, 壱, 幺, ㆒]
'/yi': [一, 壹, ¹, ₁, Ⅰ, ⅰ, ①, ➀, ❶, ➊, ⓵, ⑴, ⒈, 1, ㊀, ㈠, 弌, 壱, 幺, ㆒]
"/er": [二, 貳, ₂, ², Ⅱ, ⅱ, ②, ➁, ❷, ➋, ⓶, ⑵, ⒉, 2, ㊁, ㈡, 弍, 弐, 貮, 㒃, 㒳, 兩, 倆, ㆓]
"/sj": [三, 叄, ₃, ³, Ⅲ, ⅲ, ③, ➂, ❸, ➌, ⓷, ⑶, ⒊, 3, ㊂, ㈢, 參, 参, 叁, 弎, 仨, ㆔]
"/si": [四, 肆, ₄, ⁴, Ⅳ, ⅳ, ④, ➃, ❹, ➍, ⓸, ⑷, ⒋, 4, ㊃, ㈣, 亖]
'/wu': [五, 伍, ⁵, ₅, Ⅴ, ⅴ, ⑤, ➄, ❺, ➎, ⓹, ⑸, ⒌, 5, ㊄, ㈤, 㐅, 㠪, 𠄡]
'/lf': [六, 陆, ⁶, ₆, Ⅵ, ⅵ, ⑥, ➅, ❻, ➏, ⓺, ⑹, ⒍, 6, ㊅, ㈥, ↅ]
'/fi': [七, 柒, ⁷, ₇, Ⅶ, ⅶ, ⑦, ➆, ❼, ➐, ⓻, ⑺, ⒎, 7, ㊆, ㈦, 漆]
'/lq': [六, 陆, ⁶, ₆, Ⅵ, ⅵ, ⑥, ➅, ❻, ➏, ⓺, ⑹, ⒍, 6, ㊅, ㈥, ↅ]
'/qi': [七, 柒, ⁷, ₇, Ⅶ, ⅶ, ⑦, ➆, ❼, ➐, ⓻, ⑺, ⒎, 7, ㊆, ㈦, 漆]
'/ba': [八, 捌, ⁸, ₈, Ⅷ, ⅷ, ⑧, ➇, ❽, ➑, ⓼, ⑻, ⒏, 8, ㊇, ㈧]
'/jf': [九, 玖, ⁹, ₉, Ⅸ, ⅸ, ⑨, ➈, ❾, ➒, ⓽, ⑼, ⒐, 9, ㊈, ㈨]
'/jq': [九, 玖, ⁹, ₉, Ⅸ, ⅸ, ⑨, ➈, ❾, ➒, ⓽, ⑼, ⒐, 9, ㊈, ㈨]
'/ui': [十, 拾, ¹⁰, ₁₀, Ⅹ, ⅹ, ⑩, ➉, ❿, ➓, ⓾, ⑽, ⒑, 10, ㊉, ㈩, 什]
# '/fs': [⅟, ½, ↉, ⅓, ⅔, ¼, ⅕, ⅖, ⅗, ⅘, ⅙, ⅚, ⅐, ⅛, ⅜, ⅝, ⅞, ⅑, ⅒]
#苏州码
Expand Down Expand Up @@ -205,7 +205,7 @@ symbols:
'/dz': [子, 丑, 寅, 卯, 辰, 巳, 午, 未, 申, 酉, 戌, 亥]
'/gz': [甲子, 乙丑, 丙寅, 丁卯, 戊辰, 己巳, 庚午, 辛未, 壬申, 癸酉, 甲戌, 乙亥, 丙子, 丁丑, 戊寅, 己卯, 庚辰, 辛巳, 壬午, 癸未, 甲申, 乙酉, 丙戌, 丁亥, 戊子, 己丑, 庚寅, 辛卯, 壬辰, 癸巳, 甲午, 乙未, 丙申, 丁酉, 戊戌, 己亥, 庚子, 辛丑, 壬寅, 癸卯, 甲辰, 乙巳, 丙午, 丁未, 戊申, 己酉, 庚戌, 辛亥, 壬子, 癸丑, 甲寅, 乙卯, 丙辰, 丁巳, 戊午, 己未, 庚申, 辛酉, 壬戌, 癸亥]
#节气
'/jq': [立春, 雨水, 惊蛰, 春分, 清明, 谷雨, 立夏, 小满, 芒种, 夏至, 小暑, 大暑, 立秋, 处暑, 白露, 秋分, 寒露, 霜降, 立冬, 小雪, 大雪, 冬至, 小寒, 大寒]
'/jl': [立春, 雨水, 惊蛰, 春分, 清明, 谷雨, 立夏, 小满, 芒种, 夏至, 小暑, 大暑, 立秋, 处暑, 白露, 秋分, 寒露, 霜降, 立冬, 小雪, 大雪, 冬至, 小寒, 大寒]
#单位
'/dw': [Å, ℃, %, ‰, ‱, °, ℉, ㏃, ㏆, ㎈, ㏄, ㏅, ㎝, ㎠, ㎤, ㏈, ㎗, ㎙, ㎓, ㎬, ㏉, ㏊, ㏋, ㎐, ㏌, ㎄, ㎅, ㎉, ㎏, ㎑, ㏍, ㎘, ㎞, ㏎, ㎢, ㎦, ㎪, ㏏, ㎸, ㎾, ㏀, ㏐, ㏓, ㎧, ㎨, ㎡, ㎥, ㎃, ㏔, ㎆, ㎎, ㎒, ㏕, ㎖, ㎜, ㎟, ㎣, ㏖, ㎫, ㎳, ㎷, ㎹, ㎽, ㎿, ㏁, ㎁, ㎋, ㎚, ㎱, ㎵, ㎻, ㏘, ㎩, ㎀, ㎊, ㏗, ㏙, ㏚, ㎰, ㎴, ㎺, ㎭, ㎮, ㎯, ㏛, ㏜, ㎔, ㏝, ㎂, ㎌, ㎍, ㎕, ㎛, ㎲, ㎶, ㎼]
#货币
Expand Down Expand Up @@ -330,7 +330,7 @@ symbols:
'/msl': [👳🏽]
'/jr': [🎊, 🎉, 🪅, 🎏, 🎎, 🏮, 🎐, 🧧, 🎁, 🧨, 🎇, 🎆, 🎑, 🎄, 🧑🏻‍🎄]
'/cl': [🌽, 🥔, 🍠, 🥜, 🌰]
'/jl': [🧙🏻, 🧝🏻, 🧛🏻, 🧟, 🧞, 🧜🏻, 🧚🏻, 🦹🏻]
# '/jl': [🧙🏻, 🧝🏻, 🧛🏻, 🧟, 🧞, 🧜🏻, 🧚🏻, 🦹🏻]
'/rz': [🥩, 🥓, 🍗, 🍖, 🍤]
'/fse': [🏻, 🏼, 🏽, 🏾, 🏿]
'/ir': [🚢, ⛴️, 🛳️, 🛥️, 🚤, ⛵️, 🛶, ⚓️]
Expand Down

0 comments on commit 37b32e5

Please sign in to comment.