7 Commits

Author SHA1 Message Date
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
66 changed files with 51 additions and 28 deletions

View File

@@ -1,9 +1,9 @@
# 潜进 (HeurAMS) - 实验型辅助记忆程序 # 潜进 (HeurAMS) - 启发式辅助记忆程序
> 形人而我无形,**则我专而敌分** > 形人而我无形,**则我专而敌分**
## 概述 ## 概述
"潜进" (HeurAMS, 中文含义: 启发式辅助记忆软件) 是为习题册, 古诗词, 及其他问答/记忆/理解型知识设计的辅助记忆软件, 提供动态规划的优化记忆方案 "潜进" (HeurAMS) 是为习题册, 古诗词, 及其他问答/记忆/理解型知识设计的辅助记忆软件, 提供动态规划的优化记忆方案
## 技术集成与特性 ## 技术集成与特性
@@ -68,4 +68,4 @@ graph TD
## 系统要求 ## 系统要求
- 平台支持Windows / macOS / Linux / Android (需要 Termux 或 Linux) (终端或浏览器) - 平台支持Windows / macOS / Linux / Android (需要 Termux 或 Linux) (终端或浏览器)
- 网络连接:可预缓存语音文件, 需联网使用大模型服务功能 - 网络连接:可预缓存语音文件, 需联网使用大模型服务功能

View File

@@ -188,6 +188,7 @@ class FillBlank(Composition):
yield Button("退格", id=self.regid(f"delete")) yield Button("退格", id=self.regid(f"delete"))
def handler(self, event, type_): def handler(self, event, type_):
# TODO: 改动:在线错误纠正
if type_ == "button": if type_ == "button":
if self.recid(event.button.id) == "delete": if self.recid(event.button.id) == "delete":
if len(self.inputlist) > 0: if len(self.inputlist) > 0:
@@ -279,7 +280,7 @@ class TestScreen(Screen):
class AppLauncher(App): class AppLauncher(App):
CSS_PATH = "styles.tcss" CSS_PATH = "styles.css"
TITLE = "测试布局" TITLE = "测试布局"
BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")] BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")]
SCREENS = { SCREENS = {
@@ -293,4 +294,4 @@ class AppLauncher(App):
if __name__ == "__main__": if __name__ == "__main__":
app = AppLauncher() app = AppLauncher()
app.run() app.run()

View File

@@ -250,7 +250,7 @@ class FileSelectorScreen(Screen):
class AppLauncher(App): class AppLauncher(App):
CSS_PATH = "styles.tcss" CSS_PATH = "styles.css"
TITLE = "潜进 - 辅助记忆程序" TITLE = "潜进 - 辅助记忆程序"
BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")] BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")]
SCREENS = { SCREENS = {

0
nucleon/书愤.toml Normal file
View File

View File

0
nucleon/六国论.toml Normal file
View File

0
nucleon/劝学.toml Normal file
View File

0
nucleon/声声慢.toml Normal file
View File

0
nucleon/客至.toml Normal file
View File

0
nucleon/将进酒.toml Normal file
View File

View File

View File

0
nucleon/师说.toml Normal file
View File

View File

View File

View File

View File

0
nucleon/扬州慢.toml Normal file
View File

View File

View File

0
nucleon/无衣.toml Normal file
View File

View File

0
nucleon/望海潮.toml Normal file
View File

0
nucleon/朝天子.toml Normal file
View File

View File

0
nucleon/桂枝香.toml Normal file
View File

View File

0
nucleon/永遇乐.toml Normal file
View File

0
nucleon/江城子.toml Normal file
View File

View File

0
nucleon/燕歌行.toml Normal file
View File

0
nucleon/琵琶行.toml Normal file
View File

View File

0
nucleon/登快阁.toml Normal file
View File

View File

0
nucleon/登高.toml Normal file
View File

0
nucleon/短歌行.toml Normal file
View File

View File

22
nucleon/示例.toml Normal file
View File

@@ -0,0 +1,22 @@
# 文件头, 按部就班复制即可
["keydata"]
note = "笔记"
keyword_note = "关键词翻译"
translation = "语句翻译"
["testdata"]
additional_inf = ["translation","keyword_note", "note"]
fill_blank_test = {"from"=["content"], "hint"=["translation"]}
#可重复的单元
draw_card_test = {"from"=["keyword_note"]}
[CONTENT]
note = []
translation = "TRANSLATION"
keyword_note = {"KN_KEY": "KN_VALUE"}
#这是一个示例:(不要求附加在生成文本中)
["臣/密/言: /臣/以/险衅/, 夙/遭/闵凶./"]
note = []
translation = "臣子李密陈言: 我因命运不好, 小时候遭遇到了不幸"
keyword_note = {"险衅"="凶险祸患(这里指命运不好)", "夙"="早时, 这里指年幼的时候", "闵"="通'悯', 指可忧患的事", "凶"="不幸, 指丧父"}

0
nucleon/礼运.toml Normal file
View File

0
nucleon/离骚.toml Normal file
View File

View File

View File

0
nucleon/苏幕遮.toml Normal file
View File

0
nucleon/菩萨蛮.toml Normal file
View File

0
nucleon/虞美人.toml Normal file
View File

0
nucleon/蜀相.toml Normal file
View File

0
nucleon/蜀道难.toml Normal file
View File

0
nucleon/论语.toml Normal file
View File

View File

0
nucleon/贺新郎.toml Normal file
View File

0
nucleon/赤壁赋.toml Normal file
View File

0
nucleon/过秦论.toml Normal file
View File

0
nucleon/锦瑟.toml Normal file
View File

View File

View File

0
nucleon/青玉案.toml Normal file
View File

0
nucleon/静女.toml Normal file
View File

View File

0
nucleon/鹊桥仙.toml Normal file
View File

View File

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

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="{{ config.static.url }}css/xterm.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto%20Mono"/> <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/textual.js"></script>
<script src="{{ config.static.url }}js/script.js"></script>
<style> <style>
body { body {
background: #000000; background: #000000;
@@ -99,24 +100,6 @@
z-index: 5; z-index: 5;
} }
</style> </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> </head>
<body data-pingurl="{{ ping_url }}"> <body data-pingurl="{{ ping_url }}">
<div class="dialog-container intro-dialog"> <div class="dialog-container intro-dialog">
@@ -145,4 +128,4 @@
data-font-size="{{ font_size }}" data-font-size="{{ font_size }}"
></div> ></div>
</body> </body>
</html> </html>