Compare commits
9 Commits
v0.3.4
...
v0.3.5-lat
Author | SHA1 | Date | |
---|---|---|---|
44573624aa | |||
1b33bb8618 | |||
d83025d818 | |||
f7e93cf05f | |||
e30cefeb44 | |||
7dc963d491 | |||
3640d8a799 | |||
1ea34ab87a | |||
2bedc686a5 |
11
README.md
11
README.md
@@ -79,7 +79,16 @@ graph TD
|
|||||||
D --> H
|
D --> H
|
||||||
```
|
```
|
||||||
|
|
||||||
## 系统要求
|
## 系统与平台要求
|
||||||
|
|
||||||
|
- 依赖组件: Python 3.7+ (与 PIP), Git (半自动更新 & 安装需要), requirements.txt 中依赖包
|
||||||
|
- 可选依赖: curl (首次下载需要)
|
||||||
- 平台支持:Windows / macOS / Linux / Android (需要 Termux 或 Linux) (终端或浏览器)
|
- 平台支持:Windows / macOS / Linux / Android (需要 Termux 或 Linux) (终端或浏览器)
|
||||||
- 网络连接:可预缓存语音文件, 需联网使用大模型服务功能
|
- 网络连接:可预缓存语音文件, 需联网使用大模型服务功能
|
||||||
|
|
||||||
|
运行此命令以在具备以上前置条件的计算机上快速安装/保留数据更新:
|
||||||
|
```
|
||||||
|
curl -O https://gitea.imwangzhiyu.xyz/ajax/HeurAMS/raw/branch/main/tweak.py
|
||||||
|
|
||||||
|
python3 tweak.py
|
||||||
|
```
|
0
electron/.keep
Normal file
0
electron/.keep
Normal file
7
main.py
7
main.py
@@ -1,5 +1,6 @@
|
|||||||
from textual.app import App
|
from textual.app import App
|
||||||
import screens
|
import screens
|
||||||
|
import os
|
||||||
|
|
||||||
class AppLauncher(App):
|
class AppLauncher(App):
|
||||||
CSS_PATH = "styles.css"
|
CSS_PATH = "styles.css"
|
||||||
@@ -12,7 +13,11 @@ class AppLauncher(App):
|
|||||||
def on_mount(self) -> None:
|
def on_mount(self) -> None:
|
||||||
self.push_screen("dashboard")
|
self.push_screen("dashboard")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
os.chdir(script_dir)
|
||||||
|
os.makedirs("electron", exist_ok=True)
|
||||||
|
os.makedirs("nucleon", exist_ok=True)
|
||||||
|
os.makedirs("cache/voice", exist_ok=True)
|
||||||
app = AppLauncher()
|
app = AppLauncher()
|
||||||
app.run()
|
app.run()
|
@@ -1,2 +1,2 @@
|
|||||||
ver = "0.3.4"
|
ver = "0.3.5"
|
||||||
stage = "prototype"
|
stage = "prototype"
|
1
plugin/heursync/screens.py
Normal file
1
plugin/heursync/screens.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# HeurSync 同步器
|
10
reactor.py
10
reactor.py
@@ -13,7 +13,7 @@ class Glimpse():
|
|||||||
self.nuc_u = nucleon_union
|
self.nuc_u = nucleon_union
|
||||||
self.elt_u = self.nuc_u.linked_electron_union()
|
self.elt_u = self.nuc_u.linked_electron_union()
|
||||||
self.lastest_date = -1
|
self.lastest_date = -1
|
||||||
self.next_date = -1
|
self.next_date = 0x3f3f3f3f
|
||||||
self.avg_efactor = 0
|
self.avg_efactor = 0
|
||||||
self.total_num = 0
|
self.total_num = 0
|
||||||
self.activated_num = 0
|
self.activated_num = 0
|
||||||
@@ -22,14 +22,20 @@ class Glimpse():
|
|||||||
self.is_initialized = 1
|
self.is_initialized = 1
|
||||||
self.total_num = len(self.elt_u.electrons)
|
self.total_num = len(self.elt_u.electrons)
|
||||||
for i in self.elt_u.electrons:
|
for i in self.elt_u.electrons:
|
||||||
self.next_date = max(self.next_date, i['next_date'])
|
if i['next_date'] > 0:
|
||||||
|
self.next_date = min(self.next_date, i['next_date'])
|
||||||
self.lastest_date = max(self.lastest_date, i['last_date'])
|
self.lastest_date = max(self.lastest_date, i['last_date'])
|
||||||
if i['is_activated']:
|
if i['is_activated']:
|
||||||
self.avg_efactor += i['efactor']
|
self.avg_efactor += i['efactor']
|
||||||
self.activated_num += 1
|
self.activated_num += 1
|
||||||
|
if self.next_date == 0x3f3f3f3f:
|
||||||
|
self.next_date = -1
|
||||||
|
self.is_initialized = 0
|
||||||
if self.activated_num == 0:
|
if self.activated_num == 0:
|
||||||
return
|
return
|
||||||
self.avg_efactor = round(self.avg_efactor / self.activated_num, 2)
|
self.avg_efactor = round(self.avg_efactor / self.activated_num, 2)
|
||||||
|
if self.next_date == 0x3f3f3f3f:
|
||||||
|
self.next_date = -1
|
||||||
return
|
return
|
||||||
|
|
||||||
class Apparatus():
|
class Apparatus():
|
||||||
|
@@ -229,8 +229,7 @@ class DashboardScreen(Screen):
|
|||||||
for file in nucleon_files:
|
for file in nucleon_files:
|
||||||
text = self.item_desc_generator(pathlib.Path(file))
|
text = self.item_desc_generator(pathlib.Path(file))
|
||||||
file_list_widget.append(ListItem(
|
file_list_widget.append(ListItem(
|
||||||
Label(text[0]),
|
Label(text[0] + '\n' + text[1]),
|
||||||
Label(text[1]),
|
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
file_list_widget.append(
|
file_list_widget.append(
|
||||||
|
Reference in New Issue
Block a user