21 Commits

Author SHA1 Message Date
5e96fc8138 更新文件树 2025-08-30 22:03:34 +08:00
e64d1711d0 更新 README 2025-08-30 00:06:16 +08:00
beeb2fd318 改进 🍰 2025-08-28 13:08:37 +08:00
fc58f61dfe 新增源文件 2025-08-23 23:02:30 +08:00
e11e7e781b 添加更多源文件 2025-08-23 13:44:03 +08:00
39459a0f6e 更新版本号 2025-08-21 13:30:59 +08:00
cccf7189e3 自动播放机制 2025-08-21 13:30:30 +08:00
2c51f2cea3 改动 2025-08-21 06:28:22 +08:00
2ad014fcd8 更新文件树 2025-08-16 07:33:42 +08:00
4ad289d02d 改进部署组件 2025-08-14 11:16:43 +08:00
28ccfdd227 删除运行时文件 2025-08-14 11:13:11 +08:00
f83d5c934d 增加若干元数据 2025-08-14 11:12:33 +08:00
4f9eb3b7d1 重命名文件 2025-08-12 19:10:14 +08:00
c44a38f3c8 更新自述文件 2025-08-09 22:44:02 +08:00
f760e7f0fa 预缓存实用程序改动 2025-08-09 08:41:40 +08:00
30eb45e1cb 更新自述文件 2025-08-06 07:52:42 +08:00
2a30f136cb 更新自述文件 2025-08-06 07:52:15 +08:00
051c4847b2 更新自述文件 2025-08-06 07:43:36 +08:00
0873caa5fc 若干善后改进 2025-08-06 07:42:43 +08:00
6d3d2e665c 实装自动评分系统 2025-08-06 06:46:30 +08:00
edf2f0868a 改进 2025-08-06 06:30:41 +08:00
88 changed files with 1802 additions and 343 deletions

2
.playsound.py Normal file
View File

@@ -0,0 +1,2 @@
def playsound(p):
print(p)

View File

@@ -0,0 +1,7 @@
# 贡献指南
## 使用 Nuitka 静态编译
运行
```bash
nuitka --clang --jobs=6 --standalone --onefile main.py
```

61
NOTE.md Normal file
View File

@@ -0,0 +1,61 @@
# 实用技巧
## 用于数据组织的 prompt
```` markdown
1. 我先给你应该一个文件范例
```
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["臣/密/言: /臣/以/险衅/, 夙/遭/闵凶./"] # 键名应该使用"/"基于意思断句(填空生成需要, 避免分离单个标点), 句末应该有断句, 不要断得太碎
note = []
translation = "臣子李密陈言: 我因命运不好, 小时候遭遇到了不幸"
keyword_note = {"险衅"="凶险祸患(这里指命运不好)", "夙"="早时, 这里指年幼的时候", "闵"="通'悯', 指可忧患的事", "凶"="不幸, 指丧父"}
["生孩/六月/, 慈父/见背/; /行年/四岁/, 舅/夺/母志./"]
note = []
translation = "刚出生六个月, 我慈爱的父亲就不幸去世了。经过了四年, 舅父逼母亲改嫁"
keyword_note = {"见背"="死的委婉说法", "行年"="经历的年岁", "母志"="母亲守节之志(改嫁的委婉说法)"}
["祖母/刘/愍/臣/孤弱/, 躬亲/抚养./"]
note = []
translation = "我的祖母刘氏, 怜悯我从小丧父, 便亲自对我加以抚养"
keyword_note = {"愍"="怜悯", "躬亲"="亲身"}
["臣/少/多/疾病/, 九岁/不行/, 零丁/孤苦/, 至于/成立./"]
note = []
translation = "臣小的时候经常生病, 九岁时还不会行走。孤独无靠, 一直到成人自立"
keyword_note = {"成立"="成人自立"}
["既/无/伯叔/, 终/鲜/兄弟/, 门/衰/祚/薄/, 晚/有/儿息./"]
note = []
translation = "既没有叔叔伯伯, 又没什么兄弟, 门庭衰微而福分浅薄, 很晚才有儿子"
keyword_note = {"鲜"="少, 这里指'无'", "祚薄"="福分浅薄", "儿息"="亲生子女"}
["外/无/期功/强近/之亲/, 内/无/应门/五尺/之僮/, 茕茕/孑立/, 形影/相吊./"]
note = []
translation = "在外面没有比较亲近的亲戚, 在家里又没有照应门户的童仆。生活孤单没有依靠, 每天只有自己的身体和影子相互安慰"
keyword_note = {"期功"="指关系较近的亲属", "茕茕孑立"="孤单无依靠的样子", "吊"="安慰"}
...# 还有重复
```
2. 这是新的信息
```
{源数据}
```
生成新的"{文件名}.toml"
````

View File

@@ -1,10 +1,15 @@
# 潜进 (HeurAMS) - 实验型辅助记忆程序
# 潜进 (HeurAMS) - 启发式辅助记忆程序
> 形人而我无形,**则我专而敌分**
## 关于此仓库
"潜进" 项目包含多个组件:
- 此仓库包含了 "潜进" 项目的核心和基于 Textual 的基本用户界面 (T 界面) 的实现
- 关于基于 Flutter 的用户界面 (F 界面), 请参阅 "潜进-F" (HeurAMS-F) 仓库
- 关于数据同步实现, 请参阅 "潜进-S" (HeurSync) 仓库
- 关于云端文档源实现, 请参阅 "潜进-R" (HeurRepo) 仓库
## 概述
"潜进" (HeurAMS, 中文含义: 启发式辅助记忆软件) 是为习题册, 古诗词, 及其他问答/记忆/理解型题目设计的记忆辅助软件, 提供优化记忆方案
"潜进" (HeurAMS: Heuristic Auxiliary Memorizing Scheduler, 启发式记忆辅助调度器) 是为习题册, 古诗词, 及其他问答/记忆/理解型知识设计的辅助记忆软件, 提供动态规划的优化记忆方案
## 技术集成与特性
@@ -13,10 +18,10 @@
- 采用经实证的 SM-2 间隔迭代算法, 此算法亦用作 Anki 闪卡记忆软件的默认闪卡调度器
> 计划: 将添加 FSRS 算法 (Anki 的新可选闪卡调度器) 与一种 SM-15 变体算法作为后续替代
> 参考 https://github.com/slaypni/SM-15
> 为什么使用 SM-15 的变体?
> SM-2 后续算法仅有论文, 无具体方程, 故使用一种基于 SM-15 描述实现的变体算法
- 动态优化每首诗词的记忆间隔时间表
- 实时跟踪记忆曲线,优化长期记忆保留率与稳定性
> 使用 SM-15 的变体:
> SM-2 后续算法并非完全开放, 故使用一种基于 SM-15 描述实现的变体算法
- 动态规划每个记忆单元的记忆间隔时间表
- 动态跟踪记忆反馈数据,优化长期记忆保留率与稳定性
### 学习进程优化
- 逐字解析:支持逐字详细释义解析
@@ -29,13 +34,20 @@
- 支持触屏/鼠标/键盘多操作模式
- 简洁直观的复习流程设计
## 屏幕截图
![scrshot2](readme_src/image_2.png)
![scrshot1](readme_src/image_1.png)
## 屏幕截图 (基本用户界面)
> 单击图片以放大
<img src="./readme_src/img1.png" alt="img1" style="zoom: 33%;" />
<img src="./readme_src/img2.png" alt="img2" style="zoom:33%;" />
<img src="./readme_src/img3.png" alt="img3" style="zoom:33%;" />
<img src="./readme_src/img4.png" alt="img4" style="zoom:33%;" />
## 技术架构
> 有关技术与实现的细节, 请参阅 CONTRIBUTING.md
> 提交拉取请求以参与到此开放源代码项目
``` mermaid
graph TD
subgraph 后端
@@ -63,9 +75,3 @@ graph TD
- 平台支持Windows / macOS / Linux / Android (需要 Termux 或 Linux) (终端或浏览器)
- 网络连接:可预缓存语音文件, 需联网使用大模型服务功能
## 使用 Nuitka 静态编译
运行
```bash
nuitka --clang --jobs=6 --standalone --onefile main.py
```

42
assets/heurams.svg Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="554.4pt" height="554.4pt" viewBox="0 0 554.4 554.4" xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>
</defs>
<g id="figure_1">
<g id="patch_1">
<path d="M 0 554.4
L 554.4 554.4
L 554.4 0
L 0 0
L 0 554.4
z
" style="fill: none"/>
</g>
<g id="axes_1">
<g id="patch_2">
<path d="M 66.528 487.872
L 199.584 487.872
L 199.584 354.816
L 66.528 354.816
z
" clip-path="url(#p4da876c7a0)" style="fill: #1660a5; stroke: #1660a5; stroke-linejoin: miter"/>
</g>
<g id="patch_3">
<path d="M 199.584 354.816
L 487.872 354.816
L 487.872 66.528
L 199.584 66.528
z
" clip-path="url(#p4da876c7a0)" style="fill: #545f70; stroke: #545f70; stroke-linejoin: miter"/>
</g>
</g>
</g>
<defs>
<clipPath id="p4da876c7a0">
<rect x="0" y="0" width="554.4" height="554.4"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -2,6 +2,9 @@ import time
import pathlib
import toml
import typing
import playsound
import threading
import edge_tts as tts
class ConfigFile:
def __init__(self, path: str):
@@ -34,6 +37,20 @@ class ConfigFile:
"""获取配置值,如果不存在返回默认值"""
return self.data.get(key, default)
def action_play_voice(content):
config = ConfigFile("config.toml")
if config.get("auto_voice", False):
return
def play():
communicate = tts.Communicate(
content,
"zh-CN-YunjianNeural",
)
communicate.save_sync(
f"./cache/voice/{content}"
)
playsound()
threading.Thread(target=play).start()
def get_daystamp() -> int:
"""获取当前日戳(以天为单位的整数时间戳)"""

View File

@@ -124,9 +124,8 @@ class Recognition(Composition):
def handler(self, event, type_):
if type_ == "button":
if event.button.id == self.getid("ok"):
self.reactor.report(self.atom, 5)
return 0
if type_ == 1:
pass
return -1
@@ -175,7 +174,7 @@ class FillBlank(Composition):
self._work()
def _work(self):
self.puzzle = pz.BlankPuzzle(self.atom[1]["content"], 4)
self.puzzle = pz.BlankPuzzle(self.atom[1]["content"], 2)
self.puzzle.refresh()
self.ans = copy.copy(self.puzzle.answer)
random.shuffle(self.ans)
@@ -189,6 +188,7 @@ class FillBlank(Composition):
yield Button("退格", id=self.regid(f"delete"))
def handler(self, event, type_):
# TODO: 改动:在线错误纠正
if type_ == "button":
if self.recid(event.button.id) == "delete":
if len(self.inputlist) > 0:
@@ -201,9 +201,11 @@ class FillBlank(Composition):
return 1
else:
if self.inputlist == self.puzzle.answer:
self.reactor.report(self.atom, 4)
return 0
else:
self.inputlist = []
self.reactor.report(self.atom, 2)
return 1
@@ -240,9 +242,11 @@ class DrawCard(Composition):
return 1
else:
if self.inputlist == self.puzzle.answer:
self.reactor.report(self.atom, 4)
return 0
else:
self.inputlist = []
self.reactor.report(self.atom, 2)
return 1
@@ -276,7 +280,7 @@ class TestScreen(Screen):
class AppLauncher(App):
CSS_PATH = "styles.tcss"
CSS_PATH = "styles.css"
TITLE = "测试布局"
BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")]
SCREENS = {
@@ -290,4 +294,4 @@ class AppLauncher(App):
if __name__ == "__main__":
app = AppLauncher()
app.run()
app.run()

View File

@@ -1,8 +0,0 @@
# [调试] 将更改保存到文件
save = 1
# [调试] 覆写时间
time_override = 10
# 对于每个项目的新记忆核子数量
tasked_number = 8
# 竖屏适配
mobile_mode = 1

View File

265
main.py
View File

@@ -1,267 +1,10 @@
from textual.app import App, ComposeResult
from textual.widgets import (
Header,
Footer,
ListView,
ProgressBar,
DirectoryTree,
ListItem,
Label,
Static,
Button,
)
from textual.containers import Container, Horizontal, Center
from textual.screen import Screen
import pathlib
import threading
import edge_tts as tts
from playsound import playsound
import particles as pt
from reactor import Reactor, Apparatus
import auxiliary as aux
import compositions as compo
import builtins
_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"
config = aux.ConfigFile("config.toml")
class MemScreen(Screen):
BINDINGS = [
("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),
]
btn = dict()
def __init__(
self,
nucleon_file: pt.NucleonUnion,
electron_file: pt.ElectronUnion,
tasked_num,
):
super().__init__(name=None, id=None, classes=None)
self.reactor = Reactor(nucleon_file, electron_file, self, tasked_num)
self.stage = 1
self.stage += self.reactor.set_round_templated(self.stage)
self.reactor.forward()
self.compo = next(self.reactor.current_appar)
def compose(self) -> ComposeResult:
yield Header(show_clock=True)
with Center():
yield Static(
f"{len(self.reactor.procession) - self.reactor.index}/{len(self.reactor.procession)}"
)
yield from self.compo.compose()
yield Footer()
def on_mount(self):
pass
def on_button_pressed(self, event):
ret = self.compo.handler(event, "button")
self._forward_judge(ret)
def _forward_judge(self, ret):
if ret == -1:
return
if ret == 0:
try:
self.compo = next(self.reactor.current_appar)
self.refresh_ui()
except StopIteration:
nxt = self.reactor.forward(1)
try:
self.compo = next(self.reactor.current_appar)
except:
pass
if nxt == -1:
if self.reactor.round_set == 0:
if self.stage == 4:
if config.get("save"):
self.reactor.save()
self.compo = compo.Finished(
self, None, pt.Atom.placeholder()
)
self.refresh_ui()
else:
self.reactor.set_round_templated(self.stage)
self.reactor.forward(1)
self.stage += 1
self.compo = next(self.reactor.current_appar)
self.refresh_ui()
return
return
else:
self.refresh_ui()
return
if ret == 1:
self.refresh_ui()
return
def refresh_ui(self):
self.call_later(self.recompose)
def report(self, quality):
assessment = self.reactor.report(self.reactor.current_atom, quality)
return assessment
def action_play_voice(self):
def play():
cache_dir = pathlib.Path(f"./cache/voice/")
cache_dir.mkdir(parents=True, exist_ok=True)
cache = cache_dir / f"{self.reactor.current_atom[1].content.replace('/','')}.wav"
if not cache.exists():
communicate = tts.Communicate(
self.reactor.current_atom[1].content.replace("/", ""),
"zh-CN-YunjianNeural",
)
communicate.save_sync(
f"./cache/voice/{self.reactor.current_atom[1].content.replace('/','')}.wav"
)
playsound(str(cache))
threading.Thread(target=play).start()
def action_toggle_dark(self):
self.app.action_toggle_dark()
def action_pop_screen(self):
self.app.pop_screen()
class PreparationScreen(Screen):
BINDINGS = [("q", "go_back", "返回"), ("escape", "quit_app", "退出")]
def __init__(
self, nucleon_file: pt.NucleonUnion, electron_file: pt.ElectronUnion
) -> None:
super().__init__(name=None, id=None, classes=None)
self.nucleon_file = nucleon_file
self.electron_file = electron_file
def compose(self) -> ComposeResult:
yield Header(show_clock=True)
with Container(id="learning_screen_container"):
yield Label(f"记忆项目: [b]{self.nucleon_file.name}[/b]\n")
yield Label(
f"核子文件对象: ./nucleon/[b]{self.nucleon_file.name}[/b].toml"
)
yield Label(
f"电子文件对象: ./electron/[b]{self.electron_file.name}[/b].toml"
)
yield Label(f"核子数量:{len(self.nucleon_file)}")
yield Button(
"开始记忆",
id="start_memorizing_button",
variant="primary",
classes="start-button",
)
yield Static(f"\n全文如下:\n")
yield Static(self._get_full_content(), classes="full")
yield Footer()
def _get_full_content(self):
content = ""
for i in self.nucleon_file.nucleons:
content += i["content"]
return content
def action_go_back(self):
self.app.pop_screen()
def action_quit_app(self):
self.app.exit()
def on_button_pressed(self, event: Button.Pressed) -> None:
if event.button.id == "start_memorizing_button":
newscr = MemScreen(
self.nucleon_file, self.electron_file, config.get("tasked_number", 8)
)
self.app.push_screen(newscr)
class FileSelectorScreen(Screen):
global ver
def compose(self) -> ComposeResult:
yield Header(show_clock=True)
yield Container(
Label(f'欢迎使用 "潜进" 辅助记忆软件, 版本 {ver}', classes="title-label"),
Label("选择要学习的文件:", classes="title-label"),
ListView(id="file-list", classes="file-list-view"),
)
yield Footer()
def on_mount(self) -> None:
file_list_widget = self.query_one("#file-list", ListView)
nucleon_path = pathlib.Path("./nucleon")
nucleon_files = sorted(
[f.name for f in nucleon_path.iterdir() if f.suffix == ".toml"]
)
if nucleon_files:
for filename in nucleon_files:
file_list_widget.append(ListItem(Label(filename)))
else:
file_list_widget.append(
ListItem(Static("在 ./nucleon/ 中未找到任何核子文件. 请放置文件后重启应用."))
)
file_list_widget.disabled = True
def on_list_view_selected(self, event: ListView.Selected) -> None:
if not isinstance(event.item, ListItem):
return
selected_label = event.item.query_one(Label)
if "未找到任何 .toml 文件" in str(selected_label.renderable):
return
selected_filename = str(selected_label.renderable)
nucleon_file = pt.NucleonUnion(
pathlib.Path("./nucleon") / selected_filename
)
electron_file_path = pathlib.Path("./electron") / selected_filename
if electron_file_path.exists():
pass
else:
electron_file_path.touch()
electron_file = pt.ElectronUnion(
pathlib.Path("./electron") / selected_filename
)
self.app.push_screen(PreparationScreen(nucleon_file, electron_file))
def action_quit_app(self) -> None:
self.app.exit()
from textual.app import App
from screens import FileSelectorScreen
ver = "0.3.2"
class AppLauncher(App):
CSS_PATH = "styles.tcss"
CSS_PATH = "styles.css"
TITLE = "潜进 - 辅助记忆程序"
BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")]
SCREENS = {

View File

@@ -0,0 +1,42 @@
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
["喇叭/, 唢呐/, 曲儿/小/腔儿/大/"]
note = ["用喇叭唢呐比喻宦官,表面写乐器,实则讽刺宦官本事小却官腔十足"]
translation = "喇叭和唢呐,吹的曲子虽短,声音却很响亮"
keyword_note = {"喇叭" = "铜制管乐器,比喻宦官", "唢呐" = "管乐器,同'锁呐'", "曲儿小" = "曲子很短", "腔儿大" = "声音很响,暗指官腔十足"}
["官船/来往/乱如麻/, 全仗/你/抬/声价/"]
note = ["揭露宦官倚仗皇帝权势作威作福的丑态"]
translation = "官船来往频繁乱如麻,全凭借你抬高名誉地位"
keyword_note = {"官船" = "官府衙门的船只", "乱如麻" = "形容来往频繁", "仗" = "倚仗,凭借", "声价" = "名誉地位,同'身价'"}
["军/听了/军愁/, 民/听了/民怕/"]
note = ["表现宦官监军扰民,令军民都感到恐惧和忧愁"]
translation = "军队听了军队发愁,百姓听了百姓害怕"
keyword_note = {"军愁" = "军队因受宦官监军搅扰而发愁", "民怕" = "百姓害怕宦官的欺压"}
["哪里/去辨/甚么/真共假//"]
note = ["讽刺世人无法分辨宦官传达的旨意真假,暗指宦官常常假传圣旨"]
translation = "哪里会去辨别什么真和假?"
keyword_note = {"辨" = "分辨、分别", "甚么" = "同'什么'", "真共假" = "真和假"}
["眼见/的/吹翻了/这家/, 吹伤了/那家/, "]
note = ["具体描写宦官欺压百姓造成的严重后果"]
translation = "眼看着使有的人家倾家荡产,有的人家元气大伤"
keyword_note = {"吹翻了" = "使倾家荡产", "吹伤了" = "使元气大伤"}
["只吹/的/水尽/鹅飞/罢//"]
note = ["用比喻手法表现宦官欺压导致民穷财尽、家破人亡的悲惨结局"]
translation = "直吹得江水枯竭鹅飞跑,家破人亡啊!"
keyword_note = {"水尽鹅飞" = "比喻民穷财尽,家破人亡", "罢" = "语气词,表示完结"}

View File

@@ -0,0 +1,47 @@
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
["燎/沉香/, 消/溽暑/"]
note = ["描写夏日焚香消暑的雅致生活场景"]
translation = "焚烧沉香,来消除夏日潮湿的暑气"
keyword_note = {"燎" = "烧", "沉香" = "一种名贵香料,置水中则下沉", "溽暑" = "潮湿的暑气"}
["鸟雀/呼晴/, 侵晓/窥檐/语/"]
note = ["通过鸟雀欢鸣表现雨后初晴的喜悦气氛"]
translation = "快天亮的时候,鸟雀都在屋檐下叫个不停,欢呼天已放晴"
keyword_note = {"呼晴" = "唤晴,鸟鸣可占晴雨", "侵晓" = "快天亮的时候", "窥檐语" = "在屋檐下窥视鸣叫"}
["叶上/初阳/干/宿雨/, 水面/清圆/, 一一/风荷/举/"]
note = ["描绘晨光中荷叶挺立的生动画面,'举'字用得极妙"]
translation = "初出的阳光晒干了荷叶上昨夜的雨滴,水面上的荷叶清润圆正,迎着晨风,每一片都挺出水面"
keyword_note = {"初阳" = "初出的阳光", "宿雨" = "昨夜下的雨", "清圆" = "清润圆正", "风荷举" = "荷叶迎着晨风挺出水面"}
["故乡/遥/, 何日/去//"]
note = ["由景生情,转入思乡之情的抒发"]
translation = "想到那遥远的故乡,什么时候才能回去啊?"
keyword_note = {"故乡遥" = "故乡遥远", "何日去" = "何时能够回去"}
["家住/吴门/, 久作/长安/旅/"]
note = ["点明作者江南人的身份和长期客居京城的境遇"]
translation = "我家本在江南一带,却长久地客居汴京"
keyword_note = {"吴门" = "泛指江南一带,今江苏苏州", "长安" = "借指北宋都城汴京", "旅" = "客居"}
["五月/渔郎/相忆/否//"]
note = ["用反问句式表达对故乡亲友的深切思念"]
translation = "又到五月,不知家乡的朋友是否也在思念我?"
keyword_note = {"渔郎" = "指故乡的钓鱼朋友", "相忆" = "相互思念"}
["小楫/轻舟/, 梦入/芙蓉/浦/"]
note = ["以梦境作结,表现归乡不得只能在梦中重返故地的惆怅"]
translation = "在梦中,我划着一叶小舟,又闯入那西湖的荷花塘中"
keyword_note = {"小楫" = "短桨,指划船用具", "轻舟" = "轻快的小船", "芙蓉浦" = "有荷花的水边,指杭州西湖"}

View File

@@ -0,0 +1,72 @@
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
["国脉/微/如缕/"]
note = ["词人以'如缕'比喻国家命脉衰微脆弱,形势危急"]
translation = "国家的命脉已经衰微得像一根细丝"
keyword_note = {"国脉" = "国家的命脉", "微" = "衰微", "如缕" = "像丝线一样,形容脆弱"}
["问/长缨/何时/入手/, 缚将/戎主//"]
note = ["表达作者渴望投身军旅、为国擒敌的迫切心情"]
translation = "试问,捆敌的长绳何时才能到我手中,将敌酋捆绑擒来?"
keyword_note = {"长缨" = "长带子,喻指擒敌的武器", "缚将" = "捆绑", "戎主" = "敌人的首领"}
["未必/人间/无/好汉/, 谁与/宽些/尺度//"]
note = ["批判当时用人制度僵化,呼吁不拘一格降人才"]
translation = "人世间未必没有英雄好汉,只是谁能放宽用人的标准呢?"
keyword_note = {"好汉" = "英雄豪杰", "尺度" = "标准,这里指用人标准"}
["试看取/当年/韩五/"]
note = ["韩世忠虽出身行伍却成为抗金名将,说明人才不一定需要名师传授"]
translation = "试看当年的韩世忠将军"
keyword_note = {"韩五" = "南宋抗金名将韩世忠,排行第五"}
["岂有/谷城公/付授/, 也不干/曾遇/骊山母/"]
note = ["用典说明韩世忠的成功并非依靠神仙指点或名师传授"]
translation = "他既没有得到谷城公的传授,也不曾遇见骊山老母"
keyword_note = {"谷城公" = "即黄石公,传说曾向张良传授兵书", "骊山母" = "道教女仙,传说曾向李筌讲解《阴符》"}
["谈笑起/, 两河路/"]
note = ["形容韩世忠指挥若定,在河北地区大败金兵"]
translation = "却在谈笑间指挥大军,收复河北失地"
keyword_note = {"两河路" = "指宋代河北东路和河北西路,即今河北、山西、河南部分地区"}
["少时/棋柝/曾/联句/"]
note = ["回忆作者年轻时在军中的生活经历"]
translation = "年轻时曾在军营中一边下棋一边联句作诗"
keyword_note = {"棋柝" = "下棋和打更", "联句" = "多人合作写诗,每人一句或几句"}
["叹/而今/登楼/揽镜/, 事机/频误/"]
note = ["抒发作者年老力衰、壮志未酬的感慨"]
translation = "可叹如今登楼远望、揽镜自照,已力不从心,多次错过了报国机会"
keyword_note = {"登楼揽镜" = "上楼照镜,慨叹功业未建人已衰老", "事机" = "机会,指从军报国的机会"}
["闻说/北风/吹面/急/, 边上/冲梯/屡舞/"]
note = ["描绘边境危急,蒙古军攻势凶猛"]
translation = "听说北风凛冽(暗示蒙古军南侵),边境上敌军攻城的冲车云梯不断飞舞"
keyword_note = {"北风" = "暗指北来的蒙古兵", "冲梯" = "冲车和云梯,古代攻城器具"}
["君/莫道/投鞭/虚语/"]
note = ["警告不要轻视敌军实力,用苻坚投鞭断流的典故"]
translation = "你不要认为'投鞭断流'只是空话(喻敌军强大)"
keyword_note = {"投鞭" = "前秦苻坚曾说投鞭长江可断流,形容兵多将广"}
["自古/一贤/能/制难/, 有/金汤/便可/无/张许//"]
note = ["反问强调贤才比坚固城池更重要"]
translation = "自古以来,一位贤才就能解除危难,难道有了坚固城池就可以没有张巡、许远这样的良将吗?"
keyword_note = {"制难" = "解除危难", "金汤" = "金城汤池,比喻坚固的防御工事", "张许" = "张巡和许远,唐代安史之乱中死守睢阳的名将"}
["快/投笔/, 莫/题柱/"]
note = ["呼吁文人弃文从武,为国效力"]
translation = "赶快像班超那样投笔从戎,不要像司马相如那样只追求功名利禄"
keyword_note = {"投笔" = "投笔从戎,用汉代班超典故", "题柱" = "用司马相如题桥柱追求功名的典故"}

View File

@@ -0,0 +1,42 @@
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
["东风/夜放/花千树/, 更/吹落/、/星/如雨/"]
note = ["描写元宵夜灯火辉煌的景象,用夸张手法表现花灯之多如千树花开"]
translation = "东风吹开了元宵夜的火树银花,花灯灿烂,就像千树花开"
keyword_note = {"花千树" = "花灯之多如千树开花", "星如雨" = "焰火纷纷,乱落如雨"}
["宝马/雕车/香/满路/"]
note = ["描绘元宵节繁华街道上豪华马车往来不绝的盛况"]
translation = "豪华的马车在飘香的街道行过"
keyword_note = {"宝马雕车" = "豪华的马车", "香满路" = "香气弥漫整条街道"}
["凤箫/声动/, 玉壶/光转/, 一夜/鱼龙/舞/"]
note = ["描写元宵夜音乐悠扬、月光流转、灯舞不停的欢乐场景"]
translation = "悠扬的凤箫声四处回荡,玉壶般的明月渐渐转向西边,一夜舞动鱼灯、龙灯不停歇"
keyword_note = {"凤箫" = "箫的美称", "玉壶" = "比喻明月,亦可指灯", "鱼龙舞" = "舞动鱼形、龙形的彩灯"}
["蛾儿/雪柳/黄金缕/, 笑语/盈盈/暗香/去/"]
note = ["描写元宵节妇女们盛装出游、笑语盈盈的热闹场面"]
translation = "美人头上都戴着华丽的饰物,笑语盈盈地随人群走过,只有衣香犹在暗中飘散"
keyword_note = {"蛾儿" = "古代妇女元宵节的头饰", "雪柳" = "古代妇女元宵节的饰物", "黄金缕" = "头饰上的金丝绦", "盈盈" = "仪态娇美的样子", "暗香" = "女性身上散发出来的香气"}
["众里/寻他/千百度/"]
note = ["表达在人群中反复寻找意中人的执着心情"]
translation = "我在人群中寻找她千百回"
keyword_note = {"千百度" = "千百遍,形容次数极多"}
["蓦然/回首/, 那人/却在/, 灯火/阑珊/处/"]
note = ["最后发现意中人却在冷清之处,意境深远,成为千古名句"]
translation = "猛然回头,不经意间却在灯火将尽未尽之处发现了她"
keyword_note = {"蓦然" = "突然,猛然", "阑珊" = "暗淡、零落,指灯火稀疏的地方"}

93
nucleon_hide/劝学.toml Normal file
View File

@@ -0,0 +1,93 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["君子/曰: /学/不可以/已./"]
note = []
translation = "君子说: 学习是不可以停止的"
keyword_note = {"君子"="指有学问有修养的人", "已"="停止"}
["青/, 取之/于蓝/, 而/青/于蓝/; /冰/, 水/为之/, 而/寒/于水./"]
note = []
translation = "靛青是从蓝草里提取的, 可是比蓝草的颜色更深; 冰是水凝结而成的, 却比水还要寒冷"
keyword_note = {"青"="靛青, 一种染料", "蓝"="蓼蓝, 一年生草本植物, 叶子含蓝汁, 可以做蓝色染料"}
["木直/中绳/, 𫐓/以为/轮/, 其曲/中规./"]
note = []
translation = "一块木材直得合乎墨线, 假如用火烤使它弯曲做成车轮, 它的弧度就可以符合圆规的标准"
keyword_note = {"中绳"="合乎拉直的墨线", "𫐓"="通'煣', 古代用火烤使木条弯曲的一种工艺", "规"="圆规, 画圆的工具"}
["虽/有/槁暴/, 不复/挺者/, 𫐓/使之/然也./"]
note = []
translation = "即使又被风吹日晒而干枯了, 木材也不会再挺直, 是因为经过加工使它成为这样的"
keyword_note = {"有"="通'又'", "槁暴"="晒干。槁, 枯。暴, 同'曝', 晒干", "挺"="直"}
["故/木/受绳/则直/, 金/就砺/则利/, 君子/博学/而/日/参省/乎己/, 则/知明/而/行/无过矣./"]
note = []
translation = "所以木材用墨线量过再经辅具加工就能取直, 刀剑在磨刀石上磨过就能变得锋利, 君子广泛地学习并且每天检验反省自己, 那么他就会智慧明达而且行为没有过失了"
keyword_note = {"受绳"="用墨线量过", "金"="指金属制的刀剑等", "就砺"="拿到磨刀石上去磨", "博学"="广泛地学习", "参省"="检验反省。参, 一译检验, 检查; 二译同'叁', 多次", "知"="同'智', 见识"}
["吾尝/终日/而思矣/, 不如/须臾/之所学也/; /吾尝/跂/而望矣/, 不如/登高/之博见也./"]
note = []
translation = "我曾经整天思索, 却不如片刻学到的知识多; 我曾经踮起脚远望, 却不如登到高处看得广阔"
keyword_note = {"须臾"="片刻, 一会儿", "跂"="踮起脚后跟", "博见"="看见的范围广, 见得广"}
["登高/而招/, 臂/非加长也/, 而/见者/远/; /顺风/而呼/, 声/非加疾也/, 而/闻者/彰./"]
note = []
translation = "登到高处招手, 胳膊没有加长, 可是别人在远处也能看见; 顺着风呼叫, 声音没有变得洪亮, 可是听的人在远处也能听得很清楚"
keyword_note = {"疾"="声音洪大", "彰"="明显, 清楚。这里指听得更清楚"}
["假/舆马者/, 非/利足也/, 而/致/千里/; /假/舟楫者/, 非/能水也/, 而/绝/江河./"]
note = []
translation = "借助车马的人, 并不是脚走得快, 却可以达到千里之外; 借助舟船的人, 并不善于游泳, 却可以横渡江河"
keyword_note = {"假"="凭借, 利用", "舆"="车厢, 这里指车", "利足"="脚走得快", "水"="游泳", "绝"="横渡"}
["君子/生/非异也/, 善/假于/物也./"]
note = []
translation = "君子的资质秉性跟一般人没有不同, 只是君子善于借助外物罢了"
keyword_note = {"生"="通'性', 天赋, 资质"}
["积土/成山/, 风雨/兴焉/; /积水/成渊/, 蛟龙/生焉/; /积善/成德/, 而/神明/自得/, 圣心/备焉./"]
note = []
translation = "堆积土石成了高山, 风雨从这里兴起; 汇积水流成为深渊, 蛟龙从这儿产生; 积累善行养成高尚的道德, 精神得到提升, 圣人的心境由此具备"
keyword_note = {"神明"="精神", "圣心"="圣人的心境"}
["故/不积/跬步/, 无以/至/千里/; /不积/小流/, 无以/成/江海./"]
note = []
translation = "所以不积累一步半步的行程, 就没有办法达到千里之远; 不积累细小的流水, 就没有办法汇成江河大海"
keyword_note = {"跬"="行走时两脚之间的距离, 等于现在所说的一步、古人所说的半步", "步"="古人说一步, 指左右脚都向前迈一次的距离, 等于现在的两步"}
["骐骥/一跃/, 不能/十步/; /驽马/十驾/, 功在/不舍./"]
note = []
translation = "骏马一跨跃, 也不足十步远; 劣马连走十天, 它的成功在于不停止"
keyword_note = {"骐骥"="骏马, 千里马", "驽马"="劣马", "十驾"="劣马拉车连走十天也能到达。驾, 古代马拉车时, 早晨套一上车, 晚上卸去。套车叫驾, 所以这里用'驾'指代马车一天的行程", "舍"="舍弃。指不放弃行路"}
["锲/而舍之/, 朽木/不折/; /锲/而不舍/, 金石/可镂./"]
note = []
translation = "如果刻几下就停下来了, 那么腐朽的木头也刻不断。如果不停地刻下去, 那么金石也能雕刻成功"
keyword_note = {"锲"="用刀雕刻", "镂"="原指在金属上雕刻, 泛指雕刻"}
["蚓/无/爪牙/之利/, 筋骨/之强/, 上/食/埃土/, 下/饮/黄泉/, 用心/一也./"]
note = []
translation = "蚯蚓没有锐利的爪子和牙齿, 强健的筋骨, 却能向上吃到泥土, 向下喝到地下的泉水, 这是由于它用心专一"
keyword_note = {"黄泉"="地下的泉水", "一"="专一"}
["蟹/六跪/而/二螯/, 非/蛇鳝/之穴/无可/寄托者/, 用心/躁也./"]
note = []
translation = "螃蟹有六条腿, 两个蟹钳, 但是没有蛇、鳝的洞穴它就无处藏身, 这是因为它用心浮躁"
keyword_note = {"六跪"="六条腿。蟹实际上是八条腿。跪, 蟹脚", "螯"="螃蟹等节肢动物身前的大爪, 形如钳", "蛇鳝"="异文'蛇蟮'", "躁"="浮躁, 不专心"}

158
nucleon_hide/师说.toml Normal file
View File

@@ -0,0 +1,158 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["古之/学者/必有/师./"]
note = ["学者:求学的人"]
translation = "古代求学的人一定有老师"
keyword_note = {"学者"="求学的人"}
["师者/, 所以/传道/受业/解惑/也./"]
note = ["受:通'授',传授,讲授"]
translation = "老师是传授道理,教授学业,解决疑难问题的人"
keyword_note = {"传道"="传授道理", "受业"="教授学业", "解惑"="解决疑难问题", "受"="通'授',传授"}
["人非/生而/知之/者/, 孰能/无惑/?/"]
note = []
translation = "人不是生下来就懂得道理的,谁能没有疑惑"
keyword_note = {"孰能"="谁能"}
["惑而/不从/师/, 其/为惑/也/, 终/不解/矣./"]
note = []
translation = "有疑惑却不跟从老师学习,他所存在的疑惑,就始终不能解决"
keyword_note = {"终"="始终"}
["生乎/吾前/, 其/闻道/也/固/先乎/吾/, 吾/从而/师之/;/"]
note = []
translation = "在我之前出生的人,他懂得道理本来就比我早,我跟从他,拜他为师"
keyword_note = {"闻道"="懂得道理", "固"="本来", "师之"="以他为师"}
["生乎/吾后/, 其/闻道/也/亦/先乎/吾/, 吾/从而/师之/./"]
note = []
translation = "在我之后出生的人,他懂得道理如果也比我早,我也跟从他学习,把他当作老师"
keyword_note = {"亦"="也"}
["吾/师道/也/, 夫/庸知/其年/之/先后/生于/吾乎/?/"]
note = []
translation = "我学习的是道理,哪里管他的年龄比我大还是比我小呢"
keyword_note = {"师道"="学习道理", "庸知"="哪里管"}
["是故/无贵/无贱/, 无长/无少/, 道之/所存/, 师之/所存/也./"]
note = []
translation = "因此,不论地位显贵还是地位低下,不论年长年少,道理存在的地方,就是老师存在的地方"
keyword_note = {"是故"="因此", "所存"="存在的地方"}
["嗟乎!/ 师道/之/不传/也/久矣!/ 欲人/之/无惑/也/难矣!/"]
note = []
translation = "唉!从师学习的风尚没有流传已经很久了,想要人们没有疑惑很难呐"
keyword_note = {"嗟乎"="感叹词,唉", "师道"="从师学习的风尚"}
["古之/圣人/, 其/出人/也/远矣/, 犹且/从师/而问/焉/;/"]
note = []
translation = "古代的圣人,他们超过一般人很远了,尚且跟从老师向老师请教"
keyword_note = {"出人"="超出一般人", "犹且"="尚且"}
["今之/众人/, 其/下/圣人/也/亦/远矣/, 而/耻学/于师/./"]
note = []
translation = "现在的一般人,他们跟圣人相比相差很远了,却以向老师学为羞耻"
keyword_note = {"众人"="一般人", "下"="低于,不如", "耻学于师"="以向老师学习为耻"}
["是故/圣/益圣/, 愚/益愚/./"]
note = []
translation = "所以圣人就更加圣明,愚人就更加愚昧"
keyword_note = {"益"="更加"}
["圣人/之/所以/为圣/, 愚人/之/所以/为愚/, 其/皆/出于/此乎!/"]
note = []
translation = "圣人之所以成为圣人,愚人之所以成为愚人,大概都是这个原因引起的吧"
keyword_note = {"所以"="...的原因", "其"="大概"}
["爱/其子/, 择师/而教/之/;/ 于/其身/也/, 则/耻师/焉/, 惑矣/./"]
note = []
translation = "众人喜爱他们的孩子,选择老师教育孩子;他们自己呢,却以从师学习为耻,这真是糊涂啊"
keyword_note = {"其身"="他们自己", "耻师"="以从师为耻", "惑"="糊涂"}
["彼/童子/之师/, 授之/书/而习/其/句读/者/, 非/吾/所谓/传其道/解其惑/者也/./"]
note = ["句读:也叫句逗。古代称文辞意尽处为句,语意未尽而须停顿处为读"]
translation = "那孩子的老师,教他们读书,学习书中的文句,并不是我所说的给人传授道理,给人解释疑惑的老师"
keyword_note = {"句读"="文句停顿", "所谓"="所说的"}
["句读/之/不知/, 惑之/不解/, 或/师焉/, 或/不焉/, 小学/而/大遗/, 吾/未见/其明/也/./"]
note = ["不:通'否',表否定"]
translation = "不理解文句,疑惑得不到解决,有的向老师学习,有的却不向老师求教,小的方面学习,大的方面却放弃了,我看不出他们有什么明智的呢"
keyword_note = {"或"="有的", "不"="通'否'", "小学"="小的方面学习", "大遗"="大的方面放弃"}
["巫医/乐师/百工/之人/, 不耻/相师/./"]
note = ["巫医:古代用祝祷、占卜等迷信方法或兼用药物医治疾病为业的人", "百工:泛指手工业者"]
translation = "医生,乐师及各种工匠,不以互相学习为耻"
keyword_note = {"巫医"="医生", "乐师"="音乐师", "百工"="各种工匠", "不耻相师"="不以互相学习为耻"}
["士大夫/之族/, 曰师/曰弟子/云者/, 则/群聚/而笑/之/./"]
note = []
translation = "士大夫这类人中,如有人称人家为老师,称自己为学生,这些人就聚集在一起嘲笑他"
keyword_note = {"族"="类", "云者"="如此说"}
["问之/, 则曰//“彼与/彼年/相若/也/, 道/相似/也/./"]
note = []
translation = "问那些嘲笑者,他们就说:那个人与某人年龄相近,修养和学业也差不多"
keyword_note = {"相若"="相近", "相似"="差不多"}
["位卑/则/足羞/, 官盛/则/近谀/.”/"]
note = []
translation = "以地位低的人为师,足以感到羞愧,称官位高的人为师就近于谄媚"
keyword_note = {"位卑"="地位低", "足羞"="足以羞愧", "官盛"="官位高", "近谀"="近于谄媚"}
["呜呼!/ 师道/之/不复/, 可知/矣/./"]
note = []
translation = "啊!从师学习的风尚不能恢复,由此就可以知道了"
keyword_note = {"不复"="不能恢复"}
["巫医/乐师/百工/之人/, 君子/不齿/, 今/其智/乃/反不能/及/, 其/可怪/也欤!/"]
note = ["不齿:不屑与之同列,表示鄙视"]
translation = "医生、乐师及各种工匠,士大夫之类的人是不屑与他们为伍的,现在士大夫们的智慧反而不如他们。难道值得奇怪吗"
keyword_note = {"君子"="士大夫", "不齿"="不屑为伍", "乃"="反而", "及"="如"}
["圣人/无常/师/./ 孔子/师/郯子/、/苌弘/、/师襄/、/老聃/./"]
note = ["郯子:春秋时郯国国君", "苌弘:周敬王大夫", "师襄:鲁国乐官", "老聃:即老子"]
translation = "圣人没有固定的老师,孔子曾经以郯子、苌弘、师襄、老聃为师"
keyword_note = {"常师"="固定的老师"}
["郯子/之徒/, 其/贤/不及/孔子/./"]
note = []
translation = "郯子这一类人,他们的道德才能不如孔子"
keyword_note = {"之徒"="这一类人", "贤"="道德才能", "不及"="不如"}
["孔子/曰//三人/行/, 则/必有/我师/./"]
note = []
translation = "孔子说:几个人走在一起,其中就一定有我的老师"
keyword_note = {"三人行"="几个人一起走"}
["是故/弟子/不必/不如/师/, 师/不必/贤于/弟子/, 闻道/有/先后/, 术业/有/专攻/, 如是/而已/./"]
note = []
translation = "因此学生不一定不如老师,老师也不一定比弟子强,听闻道理有先有后,学问和技艺上各有各的主攻方向,像这样罢了"
keyword_note = {"不必"="不一定", "贤于"="比...强", "术业"="学问技艺", "专攻"="专门研究", "而已"="罢了"}
["李氏/子蟠/, 年/十七/, 好/古文/, 六艺/经传/皆/通习/之/, 不拘/于时/, 学/于余/./"]
note = ["六艺经传:六经的经文和传文"]
translation = "李蟠,十七岁,爱好古文,六经的经文和传文都普遍学习了,不被世俗的限制,向我学习"
keyword_note = {"好"="爱好", "古文"="先秦文章", "六艺经传"="六经的经文和传文", "通习"="普遍学习", "不拘于时"="不被时俗限制"}
["余/嘉/其/能行/古道/, 作/《师说》/以/贻之/./"]
note = []
translation = "我赞许他能遵行古人从师学习的风尚,特别写了这篇《师说》来赠给他"
keyword_note = {"嘉"="赞许", "古道"="古人风尚", "贻"="赠送"}

View File

@@ -0,0 +1,243 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["余家贫/, 耕植/不足/以自给./"]
note = []
translation = "我家境贫困,靠种田不能够自给"
keyword_note = {"耕植"="耕田植桑", "自给"="自己供给自己"}
["幼稚/盈室/, 瓶/无/储粟/, 生生/所资/, 未见/其术./"]
note = []
translation = "孩子很多,米瓮里没有存粮,维持生活所需的一切东西,找不到取得的办法"
keyword_note = {"幼稚"="孩童", "盈室"="满屋", "瓶"="米瓮", "储粟"="存粮", "生生"="维持生计", "所资"="所需的东西", "术"="方法"}
["亲故/多劝/余/为/长吏/, 脱然/有怀/, 求之/靡途./"]
note = []
translation = "亲友大都劝我去做官,我心里也有这个念头,可是求取官职缺少门路"
keyword_note = {"亲故"="亲友", "长吏"="较高职位的县吏", "脱然"="不经意的样子", "有怀"="心有所动", "靡途"="没有门路"}
["会/有/四方/之事/, 诸侯/以/惠爱/为德/, 家叔/以/余/贫苦/, 遂/见用/于/小邑./"]
note = []
translation = "恰巧遇到四方勤王的大事,诸侯大臣都以广施惠爱作为美德,叔父也因为我家境贫苦(替我设法),我就被委任到小县做官"
keyword_note = {"会有"="恰巧遇到", "四方之事"="出使到外地的事情", "诸侯"="州郡长官", "惠爱"="广施惠爱", "家叔"="叔父陶夔", "见用于"="被委任到", "小邑"="小县"}
["于时/风波/未静/, 心/惮/远役/, 彭泽/去家/百里/, 公田/之利/, 足以/为酒./"]
note = []
translation = "那时社会动荡不安,心里也惧怕到远地当官。彭泽县离家只有百余里路程,公田收获的粮食,足够造酒饮用"
keyword_note = {"风波"="社会动荡", "未静"="不安定", "惮"="惧怕", "远役"="到远地当官", "彭泽"="县名", "去家"="离家", "公田"="官田", "为酒"="造酒"}
["故/便/求之./ 及/少日/, 眷然/有/归欤/之情./"]
note = []
translation = "故而就向叔父谋求这个官职。等到过了一些日子,很怀念家乡,便有归去的心愿"
keyword_note = {"求之"="谋求这个官职", "少日"="过了一些日子", "眷然"="思恋的样子", "归欤之情"="回去的心情"}
["何则// 质性/自然/, 非/矫厉/所得./"]
note = []
translation = "那是为什么?我本性任其自然,这是勉强不得的"
keyword_note = {"何则"="为什么", "质性"="本性", "自然"="任其自然", "矫厉"="造作勉强"}
["饥冻/虽切/, 违己/交病./"]
note = []
translation = "饥寒虽然来得急迫,但是违背本意去做官,使我身心都感痛苦"
keyword_note = {"虽切"="虽然急迫", "违己"="违背本意", "交病"="身心痛苦"}
["尝/从/人事/, 皆/口腹/自役./"]
note = []
translation = "过去为官做事,都是为了口腹而役使自己"
keyword_note = {"从人事"="从事于仕途人事交往", "口腹自役"="为了口腹需要而驱使自己"}
["于是/怅然/慷慨/, 深愧/平生/之志./"]
note = []
translation = "于是惆怅感慨,为平生的抱负未能实现而深感惭愧"
keyword_note = {"怅然"="失意的样子", "慷慨"="感慨", "平生之志"="平生的抱负"}
["犹望/一稔/, 当/敛裳/宵逝./"]
note = []
translation = "只再等上一年,便收拾行装连夜离去"
keyword_note = {"犹望"="还希望", "一稔"="公田收获一次", "敛裳"="收拾行装", "宵逝"="连夜离去"}
["寻/程氏妹/丧于/武昌/, 情/在/骏奔/, 自免/去职./"]
note = []
translation = "不久,嫁到程家的妹妹在武昌去世,去吊丧的心情像骏马奔驰一样急迫,自己请求免去官职"
keyword_note = {"寻"="不久", "程氏妹"="嫁给程家的妹妹", "丧于"="在...去世", "骏奔"="像骏马奔驰一样急迫", "自免"="自己请求免去", "去职"="离职"}
["仲秋/至冬/, 在官/八十/余日./"]
note = []
translation = "自立秋第二个月到冬天,在职共八十多天"
keyword_note = {"仲秋"="农历八月", "在官"="在职"}
["因事/顺心/, 命篇/曰/《/归去来兮/》./"]
note = []
translation = "因辞官而顺遂了心愿,写了一篇文章,题目叫《归去来兮》"
keyword_note = {"因事"="因辞官之事", "顺心"="顺遂心愿", "命篇"="命名文章"}
["归去/来兮/, 田园/将芜/胡不归//"]
note = []
translation = "回家去吧!田园快要荒芜了,为什么不回去呢?"
keyword_note = {"归去来兮"="回去吧", "将芜"="快要荒芜", "胡不归"="为什么不回去"}
["既/自以/心为/形役/, 奚/惆怅/而/独悲//"]
note = []
translation = "既然自己使心为身所驱役,又何必怅惘而独自悲戚呢?"
keyword_note = {"心为形役"="心神被形体役使", "奚"="为什么", "惆怅"="怅惘", "独悲"="独自悲戚"}
["悟/已往/之/不谏/, 知/来者/之/可追./"]
note = []
translation = "我已明悟过去的错误已经不可挽回,未来的事还来得及补救"
keyword_note = {"已往"="过去", "不谏"="不可挽回", "来者"="未来的事", "可追"="可以补救"}
["实/迷途/其/未远/, 觉/今是/而/昨非./"]
note = []
translation = "我确实走入了迷途,但还不算太远,已觉悟如今的做法是对的,而曾经的行为是错的"
keyword_note = {"迷途"="走入迷途", "其"="但", "未远"="不算太远", "今是"="现在正确", "昨非"="过去错误"}
["舟/遥遥/以/轻飏/, 风/飘飘/而/吹衣./"]
note = []
translation = "船在水面上轻轻地飘荡着前进,微风吹拂着衣裳,衣袂翩翩"
keyword_note = {"遥遥"="飘摇放流", "轻飏"="轻轻地飘荡", "飘飘"="微风吹拂"}
["问/征夫/以/前路/, 恨/晨光/之/熹微./"]
note = []
translation = "向行人打听前面的路程,遗憾的是天刚刚放亮"
keyword_note = {"征夫"="行人", "前路"="前面的路程", "恨"="遗憾", "熹微"="天色微明"}
["乃/瞻/衡宇/, 载欣/载奔./"]
note = []
translation = "刚刚看到自己简陋的家门,心中欣喜,奔跑过去"
keyword_note = {"乃"="刚刚", "瞻"="看见", "衡宇"="横木为门的简陋房屋", "载欣载奔"="一边高兴一边奔跑"}
["僮仆/欢迎/, 稚子/候门./"]
note = []
translation = "家中童仆欢喜地前来迎接,孩子们守候在门前"
keyword_note = {"僮仆"="童仆", "欢迎"="欢喜迎接", "稚子"="幼儿", "候门"="在门前等候"}
["三径/就荒/, 松菊/犹存./"]
note = []
translation = "院子里的小路快要荒芜了,松菊还长在那里"
keyword_note = {"三径"="院中小路", "就荒"="快要荒芜", "犹存"="还存在"}
["携幼/入室/, 有酒/盈樽./"]
note = []
translation = "带着孩子们进了屋,美酒已经盛满了酒樽"
keyword_note = {"携幼"="带着孩子", "入室"="进屋", "盈樽"="满杯"}
["引/壶觞/以/自酌/, 眄/庭柯/以/怡颜./"]
note = []
translation = "我端起酒壶酒杯自斟自饮,看看院子里的树木,觉得很愉快"
keyword_note = {"引"="端起", "壶觞"="酒壶酒杯", "自酌"="自斟自饮", "眄"="随便看看", "庭柯"="院子里的树木", "怡颜"="使面容愉快"}
["倚/南窗/以/寄傲/, 审/容膝/之/易安./"]
note = []
translation = "倚着南窗寄托我的傲世之情,深知这狭小之地容易使我心安"
keyword_note = {"寄傲"="寄托傲世之情", "审"="深知", "容膝"="仅能容膝的小屋", "易安"="容易安适"}
["园/日涉/以/成趣/, 门/虽设/而/常关./"]
note = []
translation = "天天到园里行走,自成一种乐趣,小园的门经常地关闭着"
keyword_note = {"日涉"="天天走到", "成趣"="自成乐趣", "虽设"="虽然设置", "常关"="经常关闭"}
["策/扶老/以/流憩/, 时/矫首/而/遐观./"]
note = []
translation = "拄着拐杖出去走走,随时随地休息,时时抬头望着远方(的天空)"
keyword_note = {"策"="拄着", "扶老"="手杖", "流憩"="到处走走歇歇", "矫首"="抬头", "遐观"="远望"}
["云/无心/以/出岫/, 鸟/倦飞/而/知还./"]
note = []
translation = "云气自然而然地从山峰飘浮而出,倦飞的鸟儿也知道飞回巢中"
keyword_note = {"无心"="自然而然", "出岫"="从山中冒出", "倦飞"="飞累了", "知还"="知道返回"}
["景/翳翳/以/将入/, 抚/孤松/而/盘桓./"]
note = []
translation = "日光暗淡,太阳快要落下去了,我手抚着孤松徘徊着不忍离去"
keyword_note = {"景"="日光", "翳翳"="阴暗的样子", "将入"="快要落下", "抚"="手抚", "孤松"="孤立的松树", "盘桓"="徘徊"}
["归去/来兮/, 请/息交/以/绝游./"]
note = []
translation = "回家去吧!请让我同外界断绝交游"
keyword_note = {"息交"="停止交往", "绝游"="断绝交游"}
["世/与我/而/相违/, 复/驾言/兮/焉求//"]
note = []
translation = "世事与我所想的相违背,还要驾车出去追求什么?"
keyword_note = {"相违"="相违背", "驾言"="驾车出游", "焉求"="追求什么"}
["悦/亲戚/之/情话/, 乐/琴书/以/消忧./"]
note = []
translation = "以亲人间的知心话为愉悦,以弹琴读书为乐来消除忧愁"
keyword_note = {"悦"="以...为愉悦", "情话"="知心话", "乐"="以...为乐", "琴书"="弹琴读书", "消忧"="消除忧愁"}
["农人/告余/以/春及/, 将/有事/于/西畴./"]
note = []
translation = "农夫告诉我春天到了,西边田野里要开始耕种了"
keyword_note = {"告余"="告诉我", "春及"="春天到了", "有事"="指耕种之事", "西畴"="西边田野"}
["或/命/巾车/, 或/棹/孤舟./"]
note = []
translation = "有时驾着有布篷的小车,有时划着一条小船"
keyword_note = {"或"="有时", "命"="叫上", "巾车"="有帷的小车", "棹"="划船"}
["既/窈窕/以/寻壑/, 亦/崎岖/而/经丘./"]
note = []
translation = "有时经过幽深曲折的山谷,有时走过高低不平的山路"
keyword_note = {"窈窕"="幽深曲折", "寻壑"="经过山谷", "崎岖"="高低不平", "经丘"="走过山路"}
["木/欣欣/以/向荣/, 泉/涓涓/而/始流./"]
note = []
translation = "草木茂盛,细水缓流"
keyword_note = {"欣欣"="草木茂盛", "向荣"="滋长茂盛", "涓涓"="水流细微", "始流"="开始流动"}
["善/万物/之/得时/, 感/吾生/之/行休./"]
note = []
translation = "(我)羡慕自然界的万物一到春天便及时生长茂盛,感叹自己的一生行将结束"
keyword_note = {"善"="羡慕", "得时"="及时生长", "感"="感叹", "行休"="行将结束"}
["已矣乎// 寓形/宇内/复/几时//"]
note = []
translation = "算了吧!活在世上还能有多久?"
keyword_note = {"已矣乎"="算了吧", "寓形宇内"="活在世上", "复几时"="还能有多久"}
["曷不/委心/任/去留//"]
note = []
translation = "为什么不随心所欲,听凭自然的生死?"
keyword_note = {"曷不"="为什么不", "委心"="随心所欲", "任去留"="听凭生死"}
["胡为乎/遑遑/欲/何之//"]
note = []
translation = "为什么心神不定,想要到哪里去呢?"
keyword_note = {"胡为乎"="为什么", "遑遑"="心神不定", "欲何之"="想要到哪里去"}
["富贵/非/吾愿/, 帝乡/不可/期./"]
note = []
translation = "富贵不是我所求,修成神仙是没有希望的"
keyword_note = {"非吾愿"="不是我的愿望", "帝乡"="仙境", "不可期"="不可企及"}
["怀/良辰/以/孤往/, 或/植杖/而/耘耔./"]
note = []
translation = "爱惜那良辰美景我独自去欣赏,有时放下手杖,拿起农具除草培土"
keyword_note = {"怀"="爱惜", "良辰"="美好时光", "孤往"="独自外出", "植杖"="放下手杖", "耘耔"="除草培土"}
["登/东皋/以/舒啸/, 临/清流/而/赋诗./"]
note = []
translation = "登上东边的山坡我放声呼啸,傍着清清的溪流把诗歌吟唱"
keyword_note = {"东皋"="东边高地", "舒啸"="放声长啸", "临"="面对", "清流"="清清溪流", "赋诗"="吟诗"}
["聊/乘化/以/归尽/, 乐夫/天命/复/奚疑//"]
note = []
translation = "姑且顺随自然的变化,走到生命的尽头。乐天安命,还有什么可疑虑的呢?"
keyword_note = {"聊"="姑且", "乘化"="顺随自然变化", "归尽"="走到生命尽头", "乐夫天命"="乐天安命", "复奚疑"="还有什么疑虑"}

View File

@@ -0,0 +1,123 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["海客/谈/瀛洲/, 烟涛/微茫/信/难求/; /越人/语/天姥/, 云霞/明灭/或/可睹./"]
note = []
translation = "听海外来客们谈起瀛洲,烟波渺茫实在难以寻求。越中来人说起天姥山,在云雾忽明忽暗间有时能看见。"
keyword_note = {"海客"="海外来客", "瀛洲"="古代传说中的东海三座仙山之一", "烟涛"="波涛渺茫,远看像烟雾笼罩的样子", "微茫"="景象模糊不清", "信"="确实,实在", "越人"="指浙江一带的人", "天姥"="天姥山,在浙江新昌东面", "明灭"="忽明忽暗", "或"="有时", "睹"="看见"}
["天姥/连天/向天/横/, 势/拔/五岳/掩/赤城./"]
note = []
translation = "天姥山仿佛连接着天遮断了天空,山势高峻超过五岳,遮掩过赤城山。"
keyword_note = {"向天横"="遮蔽天空", "拔"="超出", "五岳"="指东岳泰山、西岳华山、中岳嵩山、北岳恒山、南岳衡山", "掩"="遮掩", "赤城"="山名,在今浙江天台北部"}
["天台/四万/八千/丈/, 对此/欲倒/东南/倾./"]
note = []
translation = "天台山虽高四万八千丈,面对着它好像要向东南倾斜拜倒一样。"
keyword_note = {"天台"="山名,在今浙江天台北部", "四万八千丈"="极言其高", "对此"="对着天姥山", "欲"="好像要", "东南倾"="向东南方向倾斜"}
["我/欲/因之/梦/吴越/, 一夜/飞度/镜湖/月./"]
note = []
translation = "我想依据越人说的话梦游到吴越,一天夜晚飞渡过明月映照下的镜湖。"
keyword_note = {"因之"="依据越人的话", "梦"="梦游", "吴越"="指越地", "飞度"="飞渡", "镜湖"="又名鉴湖,在浙江绍兴南面"}
["湖月/照/我影/, 送我/至/剡溪./"]
note = []
translation = "镜湖上的月光照着我的身影,一直送我到了剡溪。"
keyword_note = {"湖月"="镜湖上的月光", "照我影"="照着我的身影", "剡溪"="水名,在浙江嵊州南面"}
["谢公/宿处/今/尚在/, 渌水/荡漾/清猿/啼./"]
note = []
translation = "谢灵运住的地方如今还在,清澈的湖水荡漾,猿猴凄清啼叫。"
keyword_note = {"谢公"="指南朝诗人谢灵运", "宿处"="住宿的地方", "尚"="还", "渌水"="清澈的水", "荡漾"="水波摇动的样子", "清猿"="叫声凄清的猿猴"}
["脚/著/谢公/屐/, 身/登/青云/梯./"]
note = []
translation = "我脚上穿着谢公当年特制的木鞋,攀登直上云霄的山路。"
keyword_note = {"著"="穿", "谢公屐"="谢灵运特制的木屐", "青云梯"="指直上云霄的山路"}
["半壁/见/海日/, 空中/闻/天鸡./"]
note = []
translation = "上到半山腰就看见了从海上升起的太阳,空中传来天鸡报晓的啼鸣之声。"
keyword_note = {"半壁"="半山腰", "海日"="从海上升起的太阳", "天鸡"="古代传说中的神鸡"}
["千岩/万转/路/不定/, 迷花/倚石/忽/已暝./"]
note = []
translation = "无数山岩重叠,山道曲折,盘旋变化不定。迷恋着花,依倚着石,不觉天色已晚。"
keyword_note = {"千岩万转"="山岩重叠,道路曲折", "不定"="变化不定", "迷花"="迷恋花草", "倚石"="倚靠石头", "忽"="忽然", "暝"="天黑"}
["熊咆/龙吟/殷/岩泉/, 栗/深林/兮/惊/层巅./"]
note = []
translation = "熊在怒吼,龙在长鸣,岩中的泉水在震响,使深林战栗,使高耸而重叠的山峰惊颤。"
keyword_note = {"熊咆"="熊的怒吼", "龙吟"="龙的鸣叫", "殷"="震响", "岩泉"="山岩中的泉水", "栗"="使...战栗", "惊"="使...惊颤", "层巅"="重叠的山峰"}
["云/青青/兮/欲雨/, 水/澹澹/兮/生烟./"]
note = []
translation = "云层黑沉沉的,像是要下雨,水波动荡生起了薄薄的烟雾。"
keyword_note = {"青青"="黑沉沉的样子", "欲雨"="将要下雨", "澹澹"="水波荡漾的样子", "生烟"="产生烟雾"}
["列缺/霹雳/, 丘峦/崩摧./"]
note = []
translation = "电光闪闪,雷声轰鸣,山峰好像要崩塌似的。"
keyword_note = {"列缺"="闪电", "霹雳"="雷声", "丘峦"="山峰", "崩摧"="崩塌"}
["洞天/石扉/, 訇然/中开./"]
note = []
translation = "仙府的石门,“訇”的一声从中间打开。"
keyword_note = {"洞天"="仙人居住的洞府", "石扉"="石门", "訇然"="巨大的响声", "中开"="从中间打开"}
["青冥/浩荡/不见/底/, 日月/照耀/金银/台./"]
note = []
translation = "洞中蔚蓝的天空广阔无际,看不到尽头,日月照耀着金银做的宫阙。"
keyword_note = {"青冥"="天空", "浩荡"="广阔无边的样子", "不见底"="看不到尽头", "金银台"="金银铸成的宫阙"}
["霓/为衣/兮/风/为马/, 云之/君兮/纷纷/而来下./"]
note = []
translation = "用彩虹做衣裳,将风作为马来乘,云中的神仙们纷纷下来。"
keyword_note = {"霓"="彩虹", "为衣"="做衣裳", "为马"="作为马", "云之君"="云中的神仙", "纷纷"="众多的样子", "来下"="下来"}
["虎/鼓瑟/兮/鸾/回车/, 仙之/人兮/列/如麻./"]
note = []
translation = "老虎弹奏着琴瑟,鸾鸟驾着车。仙人们排成列,密密麻麻。"
keyword_note = {"鼓瑟"="弹奏琴瑟", "鸾"="传说中的神鸟", "回车"="驾车", "列如麻"="排列得像麻一样密集"}
["忽/魂悸/以/魄动/, 恍/惊起/而/长嗟./"]
note = []
translation = "忽然魂魄惊动,我猛然惊醒,不禁长声叹息。"
keyword_note = {"魂悸"="魂魄惊动", "魄动"="精神震动", "恍"="恍然", "惊起"="惊醒坐起", "长嗟"="长声叹息"}
["惟/觉时/之/枕席/, 失/向来/之/烟霞./"]
note = []
translation = "醒来时只有身边的枕席,刚才梦中所见的烟雾云霞全都消失了。"
keyword_note = {"惟"="只有", "觉时"="醒来时", "向来"="刚才", "烟霞"="指梦中的仙境景象"}
["世间/行乐/亦/如此/, 古来/万事/东流/水./"]
note = []
translation = "人世间的欢乐也是像梦中的幻境这样,自古以来万事都像东流的水一样一去不复返。"
keyword_note = {"行乐"="人世欢乐", "如此"="像这样", "古来"="自古以来", "东流水"="向东流去的水"}
["别君/去兮/何时/还? /且/放/白鹿/青崖/间/, 须/行/即骑/访/名山./"]
note = []
translation = "告别诸君,此番远去不知何时才能回来?暂且把白鹿放牧在青崖间,等到要远行时就骑上它寻访名山。"
keyword_note = {"别君"="告别诸君", "去兮"="离去啊", "还"="回来", "且"="暂且", "白鹿"="传说神仙或隐士多骑白鹿", "青崖"="青翠的山崖", "须"="等待", "即"="就", "访"="寻访"}
["安能/摧眉/折腰/事/权贵/, 使我/不得/开心/颜?/"]
note = []
translation = "岂能卑躬屈膝去侍奉权贵,让自己不能有舒心畅意的笑颜!"
keyword_note = {"安能"="怎么能", "摧眉折腰"="低头弯腰", "事"="侍奉", "权贵"="有权势的贵族", "开心颜"="心情愉快,笑逐颜开"}

243
nucleon_hide/赤壁赋.toml Normal file
View File

@@ -0,0 +1,243 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["壬戌/之秋/, 七月/既望/, 苏子/与客/泛舟/游于/赤壁/之下/"]
note = []
translation = "壬戌年秋天,七月十六日,我与友人在赤壁下泛舟游玩"
keyword_note = {"壬戌" = "宋神宗元丰五年1082", "既望" = "农历十六日(望指十五日)"}
["清风/徐来/, 水波/不兴/"]
note = []
translation = "清风阵阵拂来,水面波澜不起"
keyword_note = {"徐" = "舒缓地", "兴" = "起,作"}
["举酒/属客/, 诵/明月/之诗/, 歌/窈窕/之章/"]
note = []
translation = "举起酒杯向同伴劝酒,吟诵《明月》中'窈窕'这一章"
keyword_note = {"属" = "通'嘱',劝请", "窈窕之章" = "指《诗经·陈风·月出》篇"}
["少焉/, 月出/于/东山/之上/, 徘徊/于/斗牛/之间/"]
note = []
translation = "不一会儿,明月从东山后升起,在斗宿与牛宿之间来回移动"
keyword_note = {"少焉" = "一会儿", "斗牛" = "斗宿和牛宿,星宿名"}
["白露/横江/, 水光/接天/"]
note = []
translation = "月光下,白茫茫的雾气笼罩江面,天光、水色连成一片"
keyword_note = {"白露" = "白茫茫的水汽", "横" = "笼罩,横贯"}
["纵/一苇/之所如/, 凌/万顷/之茫然/"]
note = []
translation = "任凭一片苇叶似的小船随意漂浮,越过浩瀚无垠的江面"
keyword_note = {"一苇" = "像一片苇叶的小船", "凌" = "越过", "万顷" = "形容江面宽广"}
["浩浩乎/如/冯虚/御风/, 而/不知/其所止/"]
note = []
translation = "浩浩淼淼(像长出羽翼一样)驾风凌空飞行,并不知道到哪里才会停栖"
keyword_note = {"冯虚" = "同'凭虚',凌空", "御风" = "驾风"}
["飘飘乎/如/遗世/独立/, 羽化/而/登仙/"]
note = []
translation = "飘飘摇摇好像要离开尘世飘飞而起,羽化成仙进入仙境"
keyword_note = {"遗世" = "超脱尘世", "羽化" = "道教称成仙为羽化"}
["于是/饮酒/乐甚/, 扣舷/而歌之/"]
note = []
translation = "在这时喝酒喝得非常高兴,打着节拍唱起歌来"
keyword_note = {"扣舷" = "敲打船边,打节拍"}
["歌曰/: '桂棹/兮/兰桨/, 击/空明/兮/溯/流光/'"]
note = []
translation = "歌中唱到:'桂木船棹啊香兰船桨,击打着月光下的清波,在泛着月光的水面逆流而上'"
keyword_note = {"空明" = "月光下的清澈江水", "溯" = "逆流而上", "流光" = "月光浮动的水面"}
["渺渺兮/予怀/, 望/美人/兮/天一方/"]
note = []
translation = "我的情思啊悠远茫茫,眺望美人(君主)啊,却在天的另一方"
keyword_note = {"渺渺" = "悠远的样子", "美人" = "指内心思慕的人,常喻君主"}
["客有/吹洞箫/者/, 倚歌/而和之/"]
note = []
translation = "有会吹洞箫的客人,配着节奏为歌声伴和"
keyword_note = {"倚歌" = "随着歌声", "和" = "应和"}
["其声/呜呜然/, 如怨/如慕/, 如泣/如诉/"]
note = []
translation = "洞箫的声音呜呜咽咽:有如哀怨有如思慕,既像啜泣也像倾诉"
keyword_note = {"慕" = "思慕,眷恋"}
["余音/袅袅/, 不绝/如缕/"]
note = []
translation = "余音在江上回荡,像细丝一样连续不断"
keyword_note = {"袅袅" = "声音婉转悠长", "缕" = "细丝"}
["舞/幽壑/之潜蛟/, 泣/孤舟/之嫠妇/"]
note = []
translation = "能使深谷中的蛟龙为之起舞,能使孤舟上的寡妇为之饮泣"
keyword_note = {"幽壑" = "深谷", "嫠妇" = "寡妇"}
["苏子/愀然/, 正襟/危坐/而问/客曰/"]
note = []
translation = "我的神色也愁惨起来,整好衣襟坐端正,向客人问道"
keyword_note = {"愀然" = "容色改变的样子", "正襟危坐" = "整理衣襟,端正坐着"}
["何为/其然也?/"]
note = []
translation = "'箫声为什么这样哀怨呢?'"
keyword_note = {"然" = "这样"}
["客曰/: '月明/星稀/, 乌鹊/南飞/', 此非/曹孟德/之诗乎?/"]
note = []
translation = "客人回答:'月明星稀,乌鹊南飞,这不是曹公孟德的诗么?'"
keyword_note = {"曹孟德" = "曹操,字孟德"}
["西望/夏口/, 东望/武昌/, 山川/相缪/, 郁乎/苍苍/"]
note = []
translation = "这里向西可以望到夏口,向东可以望到武昌,山河接壤连绵不绝,目力所及,一片郁郁苍苍"
keyword_note = {"相缪" = "相互盘绕", "郁乎苍苍" = "树木茂密苍翠"}
["此非/孟德/之困于/周郎/者乎?/"]
note = []
translation = "这不正是曹孟德被周瑜所围困的地方么?"
keyword_note = {"周郎" = "周瑜"}
["方其/破/荆州/, 下/江陵/, 顺流/而东也/"]
note = []
translation = "当初他攻陷荆州,夺得江陵,沿长江顺流东下"
keyword_note = {"破" = "攻破", "下" = "攻下"}
["舳舻/千里/, 旌旗/蔽空/"]
note = []
translation = "麾下的战船首尾相连延绵千里,旗子将天空全都蔽住"
keyword_note = {"舳舻" = "战船首尾相接"}
["酾酒/临江/, 横槊/赋诗/"]
note = []
translation = "面对大江斟酒,横执长矛吟诗"
keyword_note = {"酾酒" = "斟酒", "横槊" = "横执长矛"}
["固/一世/之雄也/, 而今/安在哉?/"]
note = []
translation = "本来是当世的一位英雄人物,然而现在又在哪里呢?"
keyword_note = {"固" = "本来", "安在" = "在哪里"}
["况/吾与子/渔樵/于/江渚/之上/, 侣/鱼虾/而友/麋鹿/"]
note = []
translation = "何况我与你在江中的小洲打渔砍柴,以鱼虾为侣,以麋鹿为友"
keyword_note = {"渔樵" = "打渔砍柴", "侣" = "以...为伴侣", "友" = "以...为朋友"}
["驾/一叶/之扁舟/, 举/匏樽/以相属/"]
note = []
translation = "在江上驾着这一叶小舟,举起杯盏相互敬酒"
keyword_note = {"扁舟" = "小舟", "匏樽" = "用葫芦做的酒器"}
["寄/蜉蝣/于天地/, 渺/沧海/之一粟/"]
note = []
translation = "如同蜉蝣置身于广阔的天地中,像沧海中的一粒粟米那样渺小"
keyword_note = {"蜉蝣" = "一种生命短暂的昆虫", "粟" = "米粒"}
["哀/吾生/之须臾/, 羡/长江/之无穷/"]
note = []
translation = "哀叹我们的一生只是短暂的片刻,不由羡慕长江的没有穷尽"
keyword_note = {"须臾" = "片刻", "无穷" = "没有穷尽"}
["挟/飞仙/以遨游/, 抱/明月/而长终/"]
note = []
translation = "想要携同仙人携手遨游各地,与明月相拥而永存世间"
keyword_note = {"挟" = "携同", "长终" = "永远存在"}
["知/不可乎/骤得/, 托/遗响/于悲风/"]
note = []
translation = "知道上面这些想法不能一下子实现,只得将憾恨化为箫音,托寄在悲凉的秋风中罢了"
keyword_note = {"骤得" = "一下子得到", "遗响" = "余音,指箫声"}
["苏子/曰/: '客/亦知/夫/水与月/乎?/"]
note = []
translation = "我问道:'你可也知道这水与月?'"
keyword_note = {"夫" = "那"}
["逝者/如斯/, 而/未尝/往也/"]
note = []
translation = "江水总是不停的流逝,但它们并没有流走"
keyword_note = {"逝者如斯" = "语出《论语》,流逝的就像这样", "往" = "流失"}
["盈虚者/如彼/, 而/卒莫/消长也/"]
note = []
translation = "月亮总是那样有圆有缺,但它终究也没有增减"
keyword_note = {"盈虚" = "圆缺", "卒" = "最终", "消长" = "增减"}
["盖将/自其/变者/而观之/, 则/天地/曾不能/以一瞬/"]
note = []
translation = "可见,从事物易变的一面看来,天地间万事万物时刻在变动,连一眨眼的工夫都不停止"
keyword_note = {"曾" = "甚至", "一瞬" = "一眨眼"}
["自其/不变者/而观之/, 则/物与我/皆无尽也/"]
note = []
translation = "而从事物不变的一面看来,万物同我们来说都是永恒的"
keyword_note = {"无尽" = "没有穷尽"}
["而又/何羡乎/"]
note = []
translation = "又有什么可羡慕的呢?"
keyword_note = {"何羡" = "羡慕什么"}
["且夫/天地/之间/, 物/各有主/"]
note = []
translation = "何况天地之间,万物各有主宰者"
keyword_note = {"且夫" = "况且", "各有主" = "各有主宰"}
["苟/非吾之/所有/, 虽/一毫/而莫取/"]
note = []
translation = "若不是自己应该拥有的,即使一分一毫也不能求取"
keyword_note = {"苟" = "如果", "一毫" = "一丝一毫"}
["惟/江上/之清风/, 与/山间/之明月/"]
note = []
translation = "只有江上的清风,以及山间的明月"
keyword_note = {"惟" = "只有"}
["耳得之/而为声/, 目遇之/而成色/"]
note = []
translation = "听到便成了声音,进入眼帘便绘出形色"
keyword_note = {"得" = "听到", "遇" = "看到"}
["取之/无禁/, 用之/不竭/"]
note = []
translation = "取得这些不会有人禁止,感受这些也不会有竭尽的忧虑"
keyword_note = {"无禁" = "没有禁止", "不竭" = "不会枯竭"}
["是/造物者/之无尽藏也/, 而/吾与子/之所共适/"]
note = []
translation = "这是大自然恩赐的没有穷尽的宝藏,我和你可以共同享受"
keyword_note = {"造物者" = "大自然", "无尽藏" = "无穷无尽的宝藏", "共适" = "共同享受"}
["客/喜而笑/, 洗盏/更酌/"]
note = []
translation = "客人高兴地笑了,洗净酒杯重新饮酒"
keyword_note = {"更酌" = "重新斟酒"}
["肴核/既尽/, 杯盘/狼籍/"]
note = []
translation = "菜肴果品都已吃完,杯子盘子杂乱一片"
keyword_note = {"肴核" = "菜肴和果品", "狼籍" = "凌乱的样子"}
["相与/枕藉/乎/舟中/, 不知/东方/之既白/"]
note = []
translation = "大家互相枕着垫着睡在船上,不知不觉东方已经露出白色的曙光"
keyword_note = {"枕藉" = "相互枕着躺着", "既白" = "已经天亮"}

View File

@@ -1,3 +1,8 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 示例文件: 陈情表
# 散列表的键翻译
["keydata"]
note = "笔记"
@@ -8,12 +13,12 @@ translation = "语句翻译"
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content指代键名
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["臣/密/言: /臣/以/险衅/, 夙/遭/闵凶./"]
["臣/密/言: /臣/以/险衅/, 夙/遭/闵凶./"] # 键名应该使用"/"基于意思断句(填空生成需要, 避免分离单个标点), 句末应该有断句, 不要断得太碎
note = []
translation = "臣子李密陈言: 我因命运不好, 小时候遭遇到了不幸"
keyword_note = {"险衅"="凶险祸患(这里指命运不好)", "夙"="早时, 这里指年幼的时候", "闵"="通'悯', 指可忧患的事", "凶"="不幸, 指丧父"}
@@ -151,4 +156,4 @@ keyword_note = {"陨首"="掉脑袋, 指献出生命", "结草"="死后报恩的
["臣/不胜/犬马/怖惧/之情/, 谨/拜表/以闻./"]
note = []
translation = "臣下我怀着牛马一样不胜恐惧的心情, 恭敬地呈上此表来使陛下知道这件事"
keyword_note = {"不胜"="禁不住", "犬马怖惧"="臣子谦卑的自比", "闻"="使...知道"}
keyword_note = {"不胜"="禁不住", "犬马怖惧"="臣子谦卑的自比", "闻"="使...知道"}

View File

0
nucleon_todo/书愤.toml Normal file
View File

View File

View File

View File

0
nucleon_todo/客至.toml Normal file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
nucleon_todo/无衣.toml Normal file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
nucleon_todo/登高.toml Normal file
View File

View File

View File

0
nucleon_todo/礼运.toml Normal file
View File

0
nucleon_todo/离骚.toml Normal file
View File

View File

View File

View File

View File

View File

0
nucleon_todo/蜀相.toml Normal file
View File

View File

0
nucleon_todo/论语.toml Normal file
View File

View File

@@ -0,0 +1,93 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["臣闻/求木之/长者/, 必固/其根本/; /欲流之/远者/, 必浚/其泉源/; /思国之/安者/, 必积/其德义./"]
note = []
translation = "我听说想要树木长得好,一定要使它的根牢固;想要泉水流得远,一定要疏通它的源泉;想要国家安定,一定要厚积道德仁义"
keyword_note = {"长(zhǎng)"="生长,这里指长得好", "固"="使……牢固", "根本"="树根", "浚(jùn)"="疏通,挖深", "德义"="道德仁义"}
["源不深/而望/流之远/, 根不固/而求/木之长/, 德不厚/而思/国之理/, 臣虽/下愚/, 知其/不可/, 而况于/明哲乎!/"]
note = ["思国之理 一作:思国之治"]
translation = "源泉不深却希望泉水流得远,根系不牢固却想要树木生长得高,道德不深厚却想要国家安定,微臣虽然愚笨,(也)知道这是不可能的,更何况(您这)聪明睿智(的人)呢!"
keyword_note = {"下愚"="处于地位低见识浅的人", "明哲"="聪明睿智的人", "国之理"="国家治理,太平"}
["人君/当/神器之重/, 居/域中之大/, 将崇/极天之峻/, 永保/无疆之休./"]
note = []
translation = "国君掌握帝位的重权,在天地间尊大,就要推崇皇权的高峻,永保永无止境的美善"
keyword_note = {"神器"="帝位", "域中"="天地之间", "休"="美,这里指政权的平和美好"}
["不念/居安思危/, 戒奢/以俭/, 德不处/其厚/, 情不胜/其欲/, 斯亦/伐根/以求/木茂/, 塞源/而欲/流长者也./"]
note = ["塞源而欲流长者也 一作:塞源而欲流长也"]
translation = "如果不在安逸的环境中想着危难,戒奢侈而行节俭,道德不能保持宽厚,性情不能克服欲望,这也如同挖断树根却想要树木长得茂盛,堵塞源泉却想要泉水流得远一样啊!"
keyword_note = {"居安思危"="在安逸时想到危难", "戒奢以俭"="戒除奢侈而行节俭", "伐"="砍伐", "塞"="堵塞"}
["凡百/元首/, 承天/景命/, 莫不/殷忧/而道著/, 功成/而德衰./"]
note = ["凡百 一作:凡昔"]
translation = "(古代)所有的帝王,承受了上天赋予的重大使命,他们没有一个不为国家深切地忧虑而且治理成效显著的,但一旦功业建成就德性衰减"
keyword_note = {"凡百"="所有的", "元首"="帝王", "景命"="大命,重大使命", "殷忧"="深忧"}
["有/善始者/实繁/, 能/克终者/盖寡./"]
note = []
translation = "国君开头做得好的实在很多,能够坚持到底的大概很少"
keyword_note = {"善始"="开头做得好", "克终"="能够坚持到底", "盖"="大概,表推测语气"}
["岂/取之易/而守之难乎/? /昔/取之/而有余/, 今/守之/而不足/, 何也/?/"]
note = []
translation = "难道是取得天下容易守住天下困难吗?过去夺取天下时力量有余,现在守卫天下却力量不足,这是为什么呢?"
keyword_note = {"取"="取得天下", "守"="守卫天下"}
["夫/在殷忧/, 必/竭诚/以待下/; /既得志/, 则/纵情/以傲物./"]
note = []
translation = "因为处在深重的忧虑之中,一定能竭尽诚心来对待臣民。成功之后,就放纵自己的性情来傲视别人"
keyword_note = {"竭诚"="竭尽诚心", "待下"="对待臣下", "纵情"="放纵情感", "傲物"="傲视别人"}
["竭诚/则/胡越/为一体/, 傲物/则/骨肉/为行路./"]
note = ["胡越 一作:吴越"]
translation = "竭尽诚心,胡越之人也将同心同德;傲视别人,至亲骨肉也会成为不相干的路人"
keyword_note = {"胡越"="胡地在北,越地在南,比喻相隔遥远", "骨肉"="指父母兄弟子女", "行路"="路人,比喻毫无关系的人"}
["虽/董之/以严刑/, 振之/以威怒/, 终/苟免/而不怀仁/, 貌恭/而不心服./"]
note = []
translation = "即使用严酷的刑罚来督责(人们),用威风怒气来吓唬(人们),人们最终只求苟且免于刑罚而不怀念感激国君的仁德,表面上恭敬但在心里不服气"
keyword_note = {"董"="督责", "振"="通'震',震慑", "苟免"="苟且免于刑罚", "怀仁"="怀念仁德"}
["怨/不在大/, 可畏/惟人/; /载舟/覆舟/, 所宜/深慎/; /奔车/朽索/, 其可/忽乎!/"]
note = []
translation = "(臣民)对国君的怨恨不在大小,可怕的只是百姓的力量;(他们像水一样)能够负载船只,也能颠覆船只,这是应当深切戒慎的。用腐烂的绳索驾驭疾驰的马车,这样可以忽视不理吗?"
keyword_note = {"惟人"="只是百姓(因避讳写作'人'", "载舟覆舟"="比喻百姓能拥戴皇帝,也能推翻他的统治", "奔车朽索"="用腐烂的绳索驾驭疾驰的马车"}
["君人者/, 诚能/见可欲/则思/知足/以自戒/, 将有作/则思/知止/以安人/, 念高危/则思/谦冲/而自牧/, 惧满溢/则思/江海/下百川/, 乐盘游/则思/三驱/以为度/, 忧懈怠/则思/慎始/而敬终/, 虑壅蔽/则思/虚心/以纳下/, 想谗邪/则思/正身/以黜恶/, 恩所加/则思/无因喜/以谬赏/, 罚所及/则思/无因怒/而滥刑./"]
note = ["想谗邪 一作:惧谗邪"]
translation = "统治天下的人,如果真的能够做到一见到能引起(自己)喜好的东西就要想到用知足来自我克制,将要兴建什么就要想到适可而止来使百姓安定,想到(君位)高而险,就要不忘谦虚,加强自身的道德修养。害怕骄傲自满,就要像江海居于百川之下(而能容纳百川),喜爱狩猎就想到网三面留一面,担心意志松懈就想到(做事)要慎始慎终,担心(言路)不通受蒙蔽就想到虚心采纳臣下的意见,考虑到(朝中可能会出现)谗佞奸邪就想到使自身端正(才能)罢黜奸邪,施加恩泽就要考虑到不要因为一时高兴而奖赏不当,动用刑罚就要想到不要因为一时发怒而滥用刑罚"
keyword_note = {"见可欲"="见到能引起喜好的东西", "有作"="兴建建筑物", "知止"="知道适可而止", "谦冲"="谦虚", "自牧"="自我修养", "下百川"="居于百川之下", "三驱"="一年打猎三次为度", "慎始敬终"="谨慎开始谨慎结束", "壅蔽"="堵塞蒙蔽", "谗邪"="谗佞奸邪", "黜恶"="罢黜奸恶", "谬赏"="错误奖赏", "滥刑"="滥用刑罚"}
["总/此十思/, 弘兹/九德/, 简能/而任之/, 择善/而从之/, 则/智者/尽其谋/, 勇者/竭其力/, 仁者/播其惠/, 信者/效其忠./"]
note = ["弘兹 一作:宏兹"]
translation = "全面做到这十件应该深思的事,弘扬这九种美德,选拔有才能的人而任用他,挑选好的意见而听从它。那么有智慧的人就能充分献出他的谋略,勇敢的人就能完全使出他的力量,仁爱的人就能散播他的恩惠,诚信的人就能献出他的忠诚"
keyword_note = {"弘兹"="弘扬这", "九德"="九种美德", "简能"="选拔有才能的人", "择善"="挑选好的意见", "效"="献出"}
["文武/争驰/, 在君/无事/, 可以/尽/豫游之乐/, 可以/养/松乔之寿/, 鸣琴/垂拱/, 不言/而化./"]
note = ["在君 一作:君臣"]
translation = "文臣武将争先恐后前来效力,国君没有大事烦扰,可以尽情享受出游的快乐,可以颐养得像赤松子与王子乔那样长寿,皇上弹着琴垂衣拱手就能治理好天下,不用再说什么,天下人就已经都有教化了"
keyword_note = {"争驰"="争先效力", "豫游"="出游", "松乔"="赤松子和王子乔,古代传说中的仙人", "垂拱"="垂衣拱手,比喻轻易治理天下", "化"="教化"}
["何必/劳神/苦思/, 代下/司职/, 役/聪明/之耳目/, 亏/无为/之大道哉!/"]
note = []
translation = "为什么一定要(自己)劳神费思,代替臣下管理职事,役使自己灵敏、明亮的耳、眼,减损顺其自然就能治理好天下的大道理呢!"
keyword_note = {"代下司职"="代替臣下管理职事", "役"="役使", "亏"="减损", "无为"="道家主张清静虚无,顺其自然"}

View File

173
nucleon_todo/过秦论.toml Normal file
View File

@@ -0,0 +1,173 @@
# Wang Zhiyu 2025
# Nucleon 是 HeurAMS 软件项目使用的专有源文件格式 (格式版本 v1, 基于 toml 格式)
# 建议使用的 MIME 类型: application/vnd.xyz.imwangzhiyu.heurams-nucleon.v1+toml
# 散列表的键翻译
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
# 测试项目元数据
["testdata"]
# 记忆时显示的额外信息
additional_inf = ["translation","keyword_note", "note"]
# 填空测试, content 指代键名
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
# 选择题测试
draw_card_test = {"from"=["keyword_note"]}
["秦孝公/据/崤函/之固/, 拥/雍州/之地/, 君臣/固守/以窥/周室/, 有/席卷/天下/, 包举/宇内/, 囊括/四海/之意/, 并吞/八荒/之心./"]
note = []
translation = "秦孝公占据着崤山和函谷关的险固地势,拥有雍州的土地,君臣牢固地守卫着,借以窥视周王室(的权力),有席卷天下,包办天宇之间,囊括四海的意图,并统天下的雄心"
keyword_note = {"据"="占据", "崤函"="崤山和函谷关", "雍州"="古代九州之一", "窥"="窥视", "席卷"="像卷席子一样全部卷进去", "包举"="像打包一样全部拿走", "囊括"="像装口袋一样全部装进去", "八荒"="八方荒远之地"}
["当是时也/, 商君/佐之/, 内/立法度/, 务/耕织/, 修/守战/之具/, 外/连衡/而斗/诸侯./"]
note = []
translation = "正当这时,商鞅辅佐他,对内建立法规制度,从事耕作纺织,修造防守和进攻的器械;对外实行连衡策略,使诸侯自相争斗"
keyword_note = {"商君"="商鞅", "法度"="法规制度", "务"="从事", "耕织"="耕作纺织", "守战之具"="防守和进攻的器械", "连衡"="连横策略", "斗"="使...相斗"}
["于是/秦人/拱手/而取/西河/之外./"]
note = []
translation = "因此,秦人轻而易举地夺取了黄河以西的土地"
keyword_note = {"拱手"="两手相合,形容毫不费力", "西河"="黄河以西地区"}
["孝公/既没/, 惠文/、/武/、/昭襄/蒙/故业/, 因/遗策/, 南取/汉中/, 西举/巴/、/蜀/, 东割/膏腴/之地/, 北收/要害/之郡./"]
note = []
translation = "秦孝公死了以后,惠文王、武王、昭襄王承继先前的基业,沿袭前代的策略,向南夺取汉中,向西攻取巴、蜀,向东割取肥沃的地区,向北占领非常重要的地区"
keyword_note = {"既没"="死后", "蒙"="承继", "故业"="先前的基业", "因"="沿袭", "遗策"="前代的策略", "膏腴"="肥沃", "要害"="非常重要"}
["诸侯/恐惧/, 会盟/而谋/弱秦/, 不爱/珍器/重宝/肥饶/之地/, 以致/天下/之士/, 合从/缔交/, 相与/为一./"]
note = []
translation = "诸侯恐慌害怕,集会结盟,商议削弱秦国。不吝惜奇珍贵重的器物和肥沃富饶的土地,用来招纳天下的优秀人才,采用合纵的策略缔结盟约,互相援助,成为一体"
keyword_note = {"会盟"="集会结盟", "弱秦"="削弱秦国", "不爱"="不吝惜", "珍器重宝"="奇珍贵重的器物", "以致"="用来招纳", "合从"="合纵策略", "缔交"="缔结盟约"}
["当此/之时/, 齐有/孟尝/, 赵有/平原/, 楚有/春申/, 魏有/信陵./"]
note = []
translation = "在这个时候,齐国有孟尝君,赵国有平原君,楚国有春申君,魏国有信陵君"
keyword_note = {"孟尝"="孟尝君田文", "平原"="平原君赵胜", "春申"="春申君黄歇", "信陵"="信陵君魏无忌"}
["此/四君/者/, 皆/明智/而/忠信/, 宽厚/而/爱人/, 尊贤/而/重士/, 约从/离衡/, 兼/韩/、/魏/、/燕/、/楚/、/齐/、/赵/、/宋/、/卫/、/中山/之众./"]
note = []
translation = "这四位封君,都见识英明有智谋,心地诚而讲信义,待人宽宏厚道而爱惜人民,尊重贤才而重用士人,以合纵之约击破秦的连横之策,联合韩、魏、燕、楚、齐、赵、宋、卫、中山的部队"
keyword_note = {"明智"="见识英明有智谋", "忠信"="心地诚而讲信义", "爱人"="爱惜人民", "尊贤"="尊重贤才", "重士"="重用士人", "约从"="采用合纵策略", "离衡"="破坏连横策略", "兼"="联合"}
["于是/六国/之士/, 有/甯越/、/徐尚/、/苏秦/、/杜赫/之属/为之/谋/, 齐明/、/周最/、/陈轸/、/召滑/、/楼缓/、/翟景/、/苏厉/、/乐毅/之徒/通其/意/, 吴起/、/孙膑/、/带佗/、/倪良/、/王廖/、/田忌/、/廉颇/、/赵奢/之伦/制其/兵./"]
note = []
translation = "在这时,六国的士人,有宁越、徐尚、苏秦、杜赫等人为他们出谋划策,齐明、周最、陈轸、召滑、楼缓、翟景、苏厉、乐毅等人沟通他们的意见,吴起、孙膑、带佗、倪良、王廖、田忌、廉颇、赵奢等人统率他们的军队"
keyword_note = {"之属"="等人", "为之谋"="为他们出谋划策", "之徒"="等人", "通其意"="沟通他们的意见", "之伦"="等人", "制其兵"="统率他们的军队"}
["尝以/十倍/之地/, 百万/之众/, 叩关/而攻/秦./"]
note = []
translation = "他们曾经用十倍于秦的土地,上百万的军队,攻打函谷关来攻打秦国"
keyword_note = {"尝"="曾经", "以"="用", "叩关"="攻打函谷关"}
["秦人/开关/延敌/, 九国/之师/, 逡巡/而不敢/进./"]
note = []
translation = "秦人打开函谷关口迎战敌人,九国的军队有所顾虑徘徊不敢入关"
keyword_note = {"开关"="打开函谷关", "延敌"="迎战敌人", "九国"="九个国家", "逡巡"="有所顾虑徘徊"}
["秦/无/亡矢/遗镞/之费/, 而/天下/诸侯/已困/矣./"]
note = []
translation = "秦人没有一兵一卒的耗费,然而天下的诸侯就已窘迫不堪了"
keyword_note = {"亡矢"="丢失箭矢", "遗镞"="遗失箭头", "费"="耗费", "困"="窘迫不堪"}
["于是/从散/约败/, 争/割地/而赂/秦./"]
note = []
translation = "因此,纵约失败了,各诸侯国争着割地来贿赂秦国"
keyword_note = {"从散"="纵约失败", "约败"="盟约破坏", "赂"="贿赂"}
["秦/有余力/而制/其弊/, 追亡/逐北/, 伏尸/百万/, 流血/漂橹/; /因利/乘便/, 宰割/天下/, 分裂/山河./"]
note = []
translation = "秦有剩余的力量趁他们困乏而制服他们,追赶逃走的败兵,百万败兵横尸道路,流淌的血液可以漂浮盾牌。秦国凭借这便利的形势,割取天下的土地,重新划分山河的区域"
keyword_note = {"制其弊"="趁他们困乏而制服他们", "追亡"="追赶逃兵", "逐北"="追逐败兵", "伏尸"="横尸", "漂橹"="漂浮盾牌", "因利乘便"="凭借便利的形势", "宰割"="割取", "分裂"="划分"}
["强国/请服/, 弱国/入朝./"]
note = []
translation = "强国主动表示臣服,弱国入秦朝拜"
keyword_note = {"请服"="请求臣服", "入朝"="入秦朝拜"}
["延及/孝文王/、/庄襄王/, 享国/之日/浅/, 国家/无事./"]
note = []
translation = "延续到孝文王、庄襄王,统治的时间不长,秦国并没有什么大事发生"
keyword_note = {"延及"="延续到", "享国"="统治国家", "浅"="时间短", "无事"="没有大事发生"}
["及至/始皇/, 奋/六世/之余烈/, 振/长策/而御/宇内/, 吞/二周/而亡/诸侯/, 履/至尊/而制/六合/, 执/敲扑/而鞭笞/天下/, 威振/四海./"]
note = []
translation = "到始皇的时候,发展六世遗留下来的功业,以武力来统治各国,将东周,西周和各诸侯国统统消灭,登上皇帝的宝座来统治天下,用严酷的刑罚来奴役天下的百姓,威风震慑四海"
keyword_note = {"奋"="发展", "余烈"="遗留下来的功业", "振长策"="挥动长鞭", "御宇内"="统治天下", "吞"="吞并", "二周"="东周和西周", "履至尊"="登上皇位", "制六合"="统治天下", "敲扑"="刑具", "鞭笞"="鞭打,奴役", "威振"="威风震慑"}
["南取/百越/之地/, 以为/桂林/、/象郡/; /百越/之君/, 俯首/系颈/, 委命/下吏./"]
note = []
translation = "秦始皇向南攻取百越的土地,把它划为桂林郡和象郡,百越的君主低着头,颈上捆着绳子(愿意服从投降),把性命交给司法官吏"
keyword_note = {"百越"="古代南方少数民族", "以为"="把它作为", "俯首"="低头", "系颈"="颈上捆着绳子", "委命"="把性命交给", "下吏"="司法官吏"}
["乃使/蒙恬/北筑/长城/而守/藩篱/, 却/匈奴/七百/余里/; /胡人/不敢/南下/而牧马/, 士/不敢/弯弓/而报怨./"]
note = []
translation = "秦始皇于是又命令蒙恬在北方修筑长城,守卫边境,使匈奴退却七百多里;胡人不敢向下到南边来放牧,勇士不敢拉弓射箭来报仇"
keyword_note = {"蒙恬"="秦朝名将", "藩篱"="边境", "却"="使...退却", "匈奴"="北方少数民族", "胡人"="指匈奴人", "牧马"="放牧", "弯弓"="拉弓", "报怨"="报仇"}
["于是/废/先王/之道/, 焚/百家/之言/, 以愚/黔首/; /隳/名城/, 杀/豪杰/; /收/天下/之兵/, 聚之/咸阳/, 销/锋镝/, 铸以为/金人/十二/, 以弱/天下/之民./"]
note = []
translation = "秦始皇接着就废除古代帝王的治世之道,焚烧诸子百家的著作,来使百姓愚蠢;毁坏高大的城墙,杀掉英雄豪杰;收缴天下的兵器,集中在咸阳,销毁兵刃和箭头,冶炼它们铸造十二个铜人,以便削弱百姓的反抗力量"
keyword_note = {"先王"="古代帝王", "道"="治世之道", "百家之言"="诸子百家的著作", "愚"="使...愚蠢", "黔首"="百姓", "隳"="毁坏", "名城"="高大的城墙", "兵"="兵器", "销"="销毁", "锋镝"="兵刃和箭头", "铸以为"="铸造成为", "金人"="铜人", "弱"="削弱"}
["然后/践华/为城/, 因河/为池/, 据/亿丈/之城/, 临/不测/之渊/, 以为/固./"]
note = []
translation = "然后凭借华山为城墙,依据黄河为城池,凭借着高耸的华山,往下看着深不可测的黄河,认为这是险固的地方"
keyword_note = {"践华"="凭借华山", "因河"="依据黄河", "为城"="作为城墙", "为池"="作为护城河", "亿丈"="形容极高", "不测"="深不可测", "渊"="深水", "固"="险固"}
["良将/劲弩/守/要害/之处/, 信臣/精卒/陈/利兵/而谁何./"]
note = []
translation = "好的将领手执强弩,守卫着要害的地方,可靠的官员和精锐的士卒,拿着锋利的兵器,盘问过往行人"
keyword_note = {"劲弩"="强弩", "要害"="重要关键", "信臣"="可靠的官员", "精卒"="精锐的士卒", "陈"="陈列,拿着", "利兵"="锋利的兵器", "谁何"="盘问行人"}
["天下/已定/, 始皇/之心/, 自以为/关中/之固/, 金城/千里/, 子孙/帝王/万世/之业/也./"]
note = []
translation = "天下已经安定,始皇心里自己认为这关中的险固地势、方圆千里的坚固的城防,是子子孙孙称帝称王直至万代的基业"
keyword_note = {"自以为"="自己认为", "关中"="函谷关以西地区", "固"="险固地势", "金城"="坚固的城池", "帝王"="称帝称王", "万世"="万代"}
["始皇/既没/, 余威/震于/殊俗./"]
note = []
translation = "始皇去世之后,他的余威(依然)震慑着边远地区"
keyword_note = {"既没"="死后", "余威"="剩余的威势", "震"="震慑", "殊俗"="不同的风俗,指边远地区"}
["然/陈涉/瓮牖/绳枢/之子/, 氓隶/之人/, 而/迁徙/之徒/也/; /才能/不及/中人/, 非有/仲尼/、/墨翟/之贤/, 陶朱/、/猗顿/之富/; /蹑足/行伍/之间/, 而/倔起/阡陌/之中/, 率/疲弊/之卒/, 将/数百/之众/, 转而/攻秦/; /斩木/为兵/, 揭竿/为旗/, 天下/云集/响应/, 赢粮/而景从./"]
note = []
translation = "可是,陈涉不过是个破瓮做窗户、草绳做户枢的贫家子弟,是氓、隶一类的人,(后来)做了被迁谪戍边的卒子;才能不如普通人,并没有孔丘、墨翟那样的贤德,也不像陶朱、猗顿那样富有。(他)跻身于戍卒的队伍中,从田野间突然奋起发难,率领着疲惫无力的士兵,指挥着几百人的队伍,掉转头来进攻秦国,砍下树木作武器,举起竹竿当旗帜,天下豪杰像云一样聚集,回声似的应和他,许多人都背着粮食,如影随形"
keyword_note = {"瓮牖"="用破瓮做窗户", "绳枢"="用草绳系户枢", "氓隶"="平民和奴隶", "迁徙之徒"="被征发戍边的人", "中人"="普通人", "仲尼"="孔子", "墨翟"="墨子", "陶朱"="范蠡", "猗顿"="春秋时富商", "蹑足"="置身于", "行伍"="军队", "倔起"="突然奋起", "阡陌"="田野", "疲弊"="疲惫无力", "将"="率领", "斩木为兵"="砍树木作武器", "揭竿为旗"="举竹竿当旗帜", "云集"="像云一样聚集", "响应"="像回声一样应和", "赢粮"="背着粮食", "景从"="如影随形"}
["山东/豪俊/遂/并起/而亡/秦族/矣./"]
note = []
translation = "崤山以东的英雄豪杰于是一齐起事,消灭了秦的家族"
keyword_note = {"山东"="崤山以东", "豪俊"="英雄豪杰", "并起"="一齐起事", "亡"="消灭", "秦族"="秦的家族"}
["且夫/天下/非/小弱/也/, 雍州/之地/, 崤函/之固/, 自若/也./"]
note = []
translation = "况且那天下并没有缩小削弱,雍州的地势,崤山和函谷关的险固,是保持原来的样子"
keyword_note = {"且夫"="况且", "小弱"="变小削弱", "自若"="保持原样"}
["陈涉/之位/, 非/尊于/齐/、/楚/、/燕/、/赵/、/韩/、/魏/、/宋/、/卫/、/中山/之君/也/; /锄櫌/棘矜/, 非/铦于/钩戟/长铩/也/; /谪戍/之众/, 非/抗于/九国/之师/也/; /深谋/远虑/, 行军/用兵/之道/, 非及/乡时/之士/也./"]
note = []
translation = "陈涉的地位,没有比齐、楚、燕、赵、韩、魏、宋、卫、中山的国君更加尊贵;锄头木棍也不比钩戟长矛更锋利;那迁谪戍边的士兵也不能和九国部队抗衡;深谋远虑,行军用兵的方法,也比不上先前九国的武将谋臣"
keyword_note = {"尊于"="比...尊贵", "锄櫌"="锄头", "棘矜"="木棍", "铦于"="比...锋利", "钩戟"="带钩的戟", "长铩"="长矛", "谪戍"="被贬戍边", "抗于"="和...抗衡", "九国"="九个国家", "深谋远虑"="深谋远虑", "行军用兵"="行军作战", "非及"="比不上", "乡时"="先前"}
["然而/成败/异变/, 功业/相反/, 何也//"]
note = []
translation = "可是条件好者失败而条件差者成功,功业完全相反,为什么呢?"
keyword_note = {"成败异变"="成功失败发生变化", "功业相反"="功业完全相反"}
["试使/山东/之国/与/陈涉/度长/絜大/, 比权/量力/, 则/不可/同年/而语/矣./"]
note = []
translation = "假使拿东方诸侯国跟陈涉比一比长短大小,量一量权势力量,就更不能相提并论了"
keyword_note = {"试使"="假使", "度长絜大"="衡量长短大小", "比权量力"="比较权势力量", "同年而语"="相提并论"}
["然/秦/以/区区/之地/, 致/万乘/之势/, 序/八州/而朝/同列/, 百有/余年/矣/; /然后/以/六合/为家/, 崤函/为宫/; /一夫/作难/而/七庙/隳/, 身死/人手/, 为/天下/笑者/, 何也//"]
note = []
translation = "然而秦凭借着它的小小的地方,发展到兵车万乘的国势,管辖全国,使六国诸侯都来朝见,已经一百多年了;这之后把天下作为家业,用崤山、函谷关作为自己的内宫;陈涉一人起义国家就灭亡了,秦王子婴死在别人(项羽)手里,被天下人耻笑,这是为什么呢?"
keyword_note = {"区区"="小小", "致"="达到", "万乘"="兵车万乘", "序八州"="管辖全国", "朝同列"="使同列来朝拜", "百有余年"="一百多年", "六合为家"="把天下作为家业", "崤函为宫"="把崤山函谷关作为内宫", "一夫作难"="一人起义", "七庙隳"="宗庙毁灭,国家灭亡", "身死人手"="死在别人手里", "为天下笑"="被天下人耻笑"}
["仁义/不施/而/攻守/之势/异也./"]
note = []
translation = "就因为不施行仁政而使攻守的形势发生了变化啊"
keyword_note = {"仁义"="仁政", "不施"="不施行", "攻守之势"="进攻和防守的形势", "异"="发生变化"}

0
nucleon_todo/锦瑟.toml Normal file
View File

View File

View File

View File

0
nucleon_todo/静女.toml Normal file
View File

View File

View File

View File

@@ -48,6 +48,7 @@ class Electron:
Args:
quality (int): 记忆保留率量化参数
"""
print(f"REVISOR: {quality}, {is_new_activation}")
if quality == -1:
return -1
@@ -204,7 +205,9 @@ class ElectronUnion:
all = toml.load(f)
lst = list()
for i in all.keys():
lst.append(Electron(i, all[i]))
if i != "total":
lst.append(Electron(i, all[i]))
self.total = all.get("total", {"last_date": 0})
self.electrons = lst
self.electrons_dict = {i.content: i for i in lst}
@@ -214,8 +217,10 @@ class ElectronUnion:
def save(self):
# print(1)
self.total["last_date"] = aux.get_daystamp()
with open(self.path, 'w') as f:
tmp = {i.content: i.metadata for i in self.electrons}
tmp["total"] = self.total
# print(tmp)
toml.dump(tmp, f)

View File

@@ -21,8 +21,8 @@ def proc_file(path: Path):
c = 0
for i in nu.nucleons:
c += 1
print(f"预缓存 [{nu.name}] ({c}/{len(nu)}): {i['content']}")
precache(i['content'])
print(f"预缓存 [{nu.name}] ({c}/{len(nu)}): {i['content'].replace('/', '')}")
precache(i['content'].replace('/', ''))
def walk(path_str: str):
@@ -49,4 +49,4 @@ if __name__ == "__main__":
walk("./nucleon")
elif choice == "C":
shutil.rmtree("./cache/voice", ignore_errors=True)
print("缓存已清空")
print("缓存已清空")

View File

@@ -108,14 +108,14 @@ class SelectionPuzzle(Puzzle):
def __str__(self):
return f"{self.wording}\n正确答案: {', '.join(self.answer)}"
puz = SelectionPuzzle(
{"1+1": "2", "1+2": "3", "1+3": "4"},
["2", "5", "0"],
3,
'求值: '
)
puz.refresh()
print(puz.wording)
print(puz.answer)
print(puz.options)
if __name__ == "__main__":
puz = SelectionPuzzle(
{"1+1": "2", "1+2": "3", "1+3": "4"},
["2", "5", "0"],
3,
'求值: '
)
puz.refresh()
print(puz.wording)
print(puz.answer)
print(puz.options)

View File

@@ -20,6 +20,9 @@ class Apparatus():
for i in self.positron["testdata"].keys():
if i == "additional_inf":
continue
if i == "fill_blank_test": # 加深
self.procession.append(comps.registry[i](screen, reactor, atom))
self.procession.append(comps.registry[i](screen, reactor, atom))
self.procession.append(comps.registry[i](screen, reactor, atom))
# self.procession.reverse()
random.shuffle(self.procession)
@@ -32,7 +35,6 @@ class Reactor():
"""反应堆对象, 处理和分配一次文件记忆流程的资源与策略"""
def __init__(self, nucleon_file: pt.NucleonUnion, electron_file: pt.ElectronUnion, screen, tasked_num):
# 导入原子对象
self.reported = set()
self.nucleon_file = nucleon_file
self.electron_file = electron_file
self.tasked_num = tasked_num
@@ -41,6 +43,7 @@ class Reactor():
counter = self.tasked_num
self.screen = screen
self.electron_dict = electron_file.electrons_dict
self.quality_dict = {}
def electron_dict_get_fallback(key) -> pt.Electron:
value = self.electron_dict.get(key)
# 如果值不存在,则设置默认值
@@ -71,7 +74,6 @@ class Reactor():
self.procession: list
self.failed: list
self.round_title: str
self.reported: set
self.current_atom: typing.Tuple[pt.Electron, pt.Nucleon, dict]
self.round_set = 0
self.current_atom = pt.Atom.placeholder()
@@ -127,23 +129,27 @@ class Reactor():
return 0
def save(self):
self._deploy_report()
print("Progress saved")
# self.nucleon_file.save()
self.electron_file.save()
if self.electron_file.total["last_date"] < aux.get_daystamp():
self.electron_file.save()
def _deploy_report(self):
"部署所有 _report"
for e, q in self.quality_dict.items():
if q == -1:
e.revisor(5, True)
continue
e.revisor(q)
def report(self, atom, quality):
"""
0: 初次激活/通过
1: 不通过
"""
"向反应器和最低质量记录汇报"
if atom in self.atoms_new:
atom[0].revisor(quality, True)
return 0
if atom[0] not in self.reported:
atom[0].revisor(quality)
self.reported.add(atom[0])
self.quality_dict[atom[0]] = -1
print(self.quality_dict)
return
self.quality_dict[atom[0]] = min(quality, self.quality_dict.get(atom[0], 5))
if quality <= 3:
self.failed.append(atom)
return 1
else:
return 0
print(self.quality_dict)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

BIN
readme_src/img1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
readme_src/img2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 KiB

BIN
readme_src/img3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

BIN
readme_src/img4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

240
screens.py Normal file
View File

@@ -0,0 +1,240 @@
from textual.app import App, ComposeResult
from textual.widgets import (
Header,
Footer,
ListView,
ProgressBar,
DirectoryTree,
ListItem,
Label,
Static,
Button,
)
from textual.containers import Container, Horizontal, Center
from textual.screen import Screen
import pathlib
import threading
import edge_tts as tts
from playsound import playsound
import particles as pt
from reactor import Reactor, Apparatus
import auxiliary as aux
import compositions as compo
import builtins
import main
config = aux.ConfigFile("config.toml")
class MemScreen(Screen):
BINDINGS = [
("d", "toggle_dark", "改变色调"),
("q", "pop_screen", "返回主菜单"),
("v", "play_voice", "朗读"),
]
if config.get("quick_pass"):
BINDINGS.append(("k", "quick_pass", "快速通过[调试]"))
btn = dict()
def __init__(
self,
nucleon_file: pt.NucleonUnion,
electron_file: pt.ElectronUnion,
tasked_num,
):
super().__init__(name=None, id=None, classes=None)
self.reactor = Reactor(nucleon_file, electron_file, self, tasked_num)
self.stage = 1
self.stage += self.reactor.set_round_templated(self.stage)
self.reactor.forward()
self.compo = next(self.reactor.current_appar)
def compose(self) -> ComposeResult:
if type(self.compo).__name__ == "Recognition":
self.action_play_voice()
yield Header(show_clock=True)
with Center():
yield Static(
f"{len(self.reactor.procession) - self.reactor.index}/{len(self.reactor.procession)}"
)
yield from self.compo.compose()
yield Footer()
def on_mount(self):
pass
def on_button_pressed(self, event):
ret = self.compo.handler(event, "button")
self._forward_judge(ret)
def _forward_judge(self, ret):
if ret == -1:
return
if ret == 0:
try:
self.compo = next(self.reactor.current_appar)
self.refresh_ui()
except StopIteration:
nxt = self.reactor.forward(1)
try:
self.compo = next(self.reactor.current_appar)
except:
pass
if nxt == -1:
if self.reactor.round_set == 0:
if self.stage == 4:
if config.get("save"):
self.reactor.save()
self.compo = compo.Finished(
self, None, pt.Atom.placeholder()
)
self.refresh_ui()
else:
self.reactor.set_round_templated(self.stage)
self.reactor.forward(1)
self.stage += 1
self.compo = next(self.reactor.current_appar)
self.refresh_ui()
return
return
else:
self.refresh_ui()
return
if ret == 1:
self.refresh_ui()
return
def refresh_ui(self):
self.call_later(self.recompose)
print(type(self.compo).__name__)
def action_play_voice(self):
print("VOICE")
def play():
cache_dir = pathlib.Path(f"./cache/voice/")
cache_dir.mkdir(parents=True, exist_ok=True)
cache = cache_dir / f"{self.reactor.current_atom[1].content.replace('/','')}.wav"
if not cache.exists():
communicate = tts.Communicate(
self.reactor.current_atom[1].content.replace("/", ""),
"zh-CN-YunjianNeural",
)
communicate.save_sync(
f"./cache/voice/{self.reactor.current_atom[1].content.replace('/','')}.wav"
)
playsound(str(cache))
threading.Thread(target=play).start()
def action_quick_pass(self):
self.reactor.report(self.reactor.current_atom, 5)
self._forward_judge(0)
def action_toggle_dark(self):
self.app.action_toggle_dark()
def action_pop_screen(self):
self.app.pop_screen()
class PreparationScreen(Screen):
BINDINGS = [("q", "go_back", "返回"), ("escape", "quit_app", "退出")]
def __init__(
self, nucleon_file: pt.NucleonUnion, electron_file: pt.ElectronUnion
) -> None:
super().__init__(name=None, id=None, classes=None)
self.nucleon_file = nucleon_file
self.electron_file = electron_file
def compose(self) -> ComposeResult:
yield Header(show_clock=True)
with Container(id="learning_screen_container"):
yield Label(f"记忆项目: [b]{self.nucleon_file.name}[/b]\n")
yield Label(
f"核子文件对象: ./nucleon/[b]{self.nucleon_file.name}[/b].toml"
)
yield Label(
f"电子文件对象: ./electron/[b]{self.electron_file.name}[/b].toml"
)
yield Label(f"核子数量:{len(self.nucleon_file)}")
yield Button(
"开始记忆",
id="start_memorizing_button",
variant="primary",
classes="start-button",
)
yield Static(f"\n全文如下:\n")
yield Static(self._get_full_content().replace("/", ""), classes="full")
yield Footer()
def _get_full_content(self):
content = ""
for i in self.nucleon_file.nucleons:
content += i["content"]
return content
def action_go_back(self):
self.app.pop_screen()
def action_quit_app(self):
self.app.exit()
def on_button_pressed(self, event: Button.Pressed) -> None:
if event.button.id == "start_memorizing_button":
newscr = MemScreen(
self.nucleon_file, self.electron_file, config.get("tasked_number", 6)
)
self.app.push_screen(newscr)
class FileSelectorScreen(Screen):
def compose(self) -> ComposeResult:
yield Header(show_clock=True)
yield Container(
Label(f'欢迎使用 "潜进" 辅助记忆软件, 版本 {main.ver}', classes="title-label"),
Label("选择要学习的文件:", classes="title-label"),
ListView(id="file-list", classes="file-list-view"),
)
yield Footer()
def on_mount(self) -> None:
file_list_widget = self.query_one("#file-list", ListView)
nucleon_path = pathlib.Path("./nucleon")
nucleon_files = sorted(
[f.name for f in nucleon_path.iterdir() if f.suffix == ".toml"]
)
if nucleon_files:
for filename in nucleon_files:
file_list_widget.append(ListItem(Label(filename)))
else:
file_list_widget.append(
ListItem(Static("在 ./nucleon/ 中未找到任何核子文件. 请放置文件后重启应用."))
)
file_list_widget.disabled = True
def on_list_view_selected(self, event: ListView.Selected) -> None:
if not isinstance(event.item, ListItem):
return
selected_label = event.item.query_one(Label)
if "未找到任何 .toml 文件" in str(selected_label.renderable):
return
selected_filename = str(selected_label.renderable)
nucleon_file = pt.NucleonUnion(
pathlib.Path("./nucleon") / selected_filename
)
electron_file_path = pathlib.Path("./electron") / selected_filename
if electron_file_path.exists():
pass
else:
electron_file_path.touch()
electron_file = pt.ElectronUnion(
pathlib.Path("./electron") / selected_filename
)
self.app.push_screen(PreparationScreen(nucleon_file, electron_file))
def action_quit_app(self) -> None:
self.app.exit()

View File

@@ -0,0 +1,17 @@
function getStartUrl() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
params.delete("delay");
return url.pathname + "?" + params.toString();
}
async function refresh() {
const ping_url = document.body.dataset.pingurl;
if (ping_url) {
await fetch(ping_url, {
method: "GET",
mode: "no-cors",
});
}
window.location.href = getStartUrl();
}

View File

@@ -4,6 +4,7 @@
<link rel="stylesheet" href="{{ config.static.url }}css/xterm.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto%20Mono"/>
<script src="{{ config.static.url }}js/textual.js"></script>
<script src="{{ config.static.url }}js/script.js"></script>
<style>
body {
background: #000000;
@@ -99,24 +100,6 @@
z-index: 5;
}
</style>
<script>
function getStartUrl() {
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
params.delete("delay");
return url.pathname + "?" + params.toString();
}
async function refresh() {
const ping_url = document.body.dataset.pingurl;
if (ping_url) {
await fetch(ping_url, {
method: "GET",
mode: "no-cors",
});
}
window.location.href = getStartUrl();
}
</script>
</head>
<body data-pingurl="{{ ping_url }}">
<div class="dialog-container intro-dialog">
@@ -145,4 +128,4 @@
data-font-size="{{ font_size }}"
></div>
</body>
</html>
</html>