diff --git a/config.toml b/config.toml index 245eda7..af5cf55 100644 --- a/config.toml +++ b/config.toml @@ -1,8 +1,12 @@ # [调试] 将更改保存到文件 save = 1 # [调试] 覆写时间 -time_override = 10 +time_override = 1 +# [调试] 一键通过 +quick_pass = 1 + # 对于每个项目的新记忆核子数量 tasked_number = 8 + # 竖屏适配 mobile_mode = 1 \ No newline at end of file diff --git a/electron/陈情表.toml b/electron/陈情表.toml new file mode 100644 index 0000000..9e89d29 --- /dev/null +++ b/electron/陈情表.toml @@ -0,0 +1,279 @@ +["臣/密/言: /臣/以/险衅/, 夙/遭/闵凶./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.3210478 + +["生孩/六月/, 慈父/见背/; /行年/四岁/, 舅/夺/母志./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.321053 + +["祖母/刘/愍/臣/孤弱/, 躬亲/抚养./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.3210552 + +["臣/少/多/疾病/, 九岁/不行/, 零丁/孤苦/, 至于/成立./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.3210573 + +["既/无/伯叔/, 终/鲜/兄弟/, 门/衰/祚/薄/, 晚/有/儿息./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.3210585 + +["外/无/期功/强近/之亲/, 内/无/应门/五尺/之僮/, 茕茕/孑立/, 形影/相吊./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.3210602 + +["而/刘/夙/婴/疾病/, 常/在/床蓐/, 臣/侍/汤药/, 未曾/废离./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.3210614 + +["逮/奉/圣朝/, 沐浴/清化./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 1 +last_modify = 1754432851.3210626 + +["前/太守/臣/逵/察/臣/孝廉/; /后/刺史/臣/荣/举/臣/秀才./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210633 + +["臣/以/供养/无主/, 辞/不赴命./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.321065 + +["诏书/特下/, 拜/臣/郎中/, 寻/蒙/国恩/, 除/臣/洗马./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210661 + +["猥/以/微贱/, 当/侍/东宫/, 非/臣/陨首/所能/上报./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210678 + +["臣/具/以表/闻/, 辞/不就职./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210688 + +["诏书/切峻/, 责/臣/逋慢/; /郡县/逼迫/, 催/臣/上道/; /州司/临门/, 急于/星火./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210697 + +["臣/欲/奉诏/奔驰/, 则/刘/病/日笃/, 欲/苟/顺/私情/, 则/告诉/不许./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210707 + +["臣/之/进退/, 实为/狼狈./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210716 + +["伏惟/圣朝/以/孝/治/天下/, 凡/在/故老/, 犹/蒙/矜育/, 况/臣/孤苦/, 特为/尤甚./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210728 + +["且/臣/少/仕/伪朝/, 历职/郎署/, 本图/宦达/, 不矜/名节./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.321074 + +["今/臣/亡国/贱俘/, 至微/至陋/, 过/蒙/拔擢/, 宠命/优渥/, 岂敢/盘桓/, 有所/希冀!/"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210752 + +["但/以/刘/日薄/西山/, 气息/奄奄/, 人命/危浅/, 朝不/虑夕./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.321079 + +["臣/无/祖母/, 无以/至今日/, 祖母/无/臣/, 无以/终余年./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.32108 + +["母孙/二人/, 更相/为命/, 是以/区区/不能/废远./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210814 + +["臣/密/今年/四十/有四/, 祖母/今年/九十/有六/, 是/臣/尽节/于/陛下/之日/长/, 报养/刘/之日/短./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210826 + +["乌鸟/私情/, 愿/乞/终养./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210835 + +["臣/之/辛苦/, 非独/蜀之/人士/及/二州/牧伯/所见/明知/, 皇天/后土/, 实所/共鉴./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.321085 + +["愿/陛下/矜悯/愚诚/, 听/臣/微志/, 庶/刘/侥幸/, 保/卒/余年./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.321086 + +["臣/生/当/陨首/, 死/当/结草./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.321087 + +["臣/不胜/犬马/怖惧/之情/, 谨/拜表/以闻./"] +efactor = 2.5 +real_rept = 0 +rept = 0 +interval = 0 +last_date = 0 +next_date = 0 +is_activated = 0 +last_modify = 1754432851.3210886 diff --git a/main.py b/main.py index c59be7e..5c4dfea 100644 --- a/main.py +++ b/main.py @@ -22,18 +22,18 @@ import auxiliary as aux import compositions as compo import builtins -_original_open = builtins.open +# Hook python 的 open() 函数, 使用 utf-8 (兼容 Windows 万年 GBK) +_original_open = builtins.open def _open(*args, **kwargs): if "encoding" not in kwargs: kwargs["encoding"] = "utf-8" return _original_open(*args, **kwargs) - builtins.open = _open -ver = "0.3.0b" +ver = "0.3.0" config = aux.ConfigFile("config.toml") @@ -43,19 +43,9 @@ class MemScreen(Screen): ("d", "toggle_dark", "改变色调"), ("q", "pop_screen", "返回主菜单"), ("v", "play_voice", "朗读"), - ("0", "press('q0')", None), - ("1", "press('q1')", None), - ("2", "press('q2')", None), - ("3", "press('q3')", None), - ("4", "press('q4')", None), - ("5", "press('q5')", None), - ("[", "press('q5')", None), - ("]", "press('q4')", None), - (";", "press('q3')", None), - ("'", "press('q2')", None), - (".", "press('q1')", None), - ("/", "press('q0')", None), ] + if config.get("quick_pass"): + BINDINGS.append(("k", "quick_pass", "快速通过[调试]")) btn = dict() def __init__( @@ -148,6 +138,8 @@ class MemScreen(Screen): threading.Thread(target=play).start() + def action_quick_pass(self): + self._forward_judge(0) def action_toggle_dark(self): self.app.action_toggle_dark() diff --git a/nucleon/陈情表.toml b/nucleon/陈情表.toml index 9a9b31d..06f2656 100644 --- a/nucleon/陈情表.toml +++ b/nucleon/陈情表.toml @@ -8,7 +8,7 @@ translation = "语句翻译" ["testdata"] # 记忆时显示的额外信息 additional_inf = ["translation","keyword_note", "note"] -# 填空测试, content指代键名 +# 填空测试, content 指代键名 fill_blank_test = {"from"=["content"], "hint"=["translation"]} # 选择题测试 draw_card_test = {"from"=["keyword_note"]}