study-tool
f8458cff51
feat(plugins): 插件支持热加载与启用/停用清单
...
- pugins/__init__.py 重写:load_plugins / discover / set_enabled / reload
- 热加载:把 study_tool.pugins.<名字> 的模块从 sys.modules 摘掉后重新 import;
重载前先 registry.unregister 旧 id,平台 id 改了也不会留残影
- 启用清单存设置项 plugins({"disabled": [...]}):未列出的默认启用,新插件自动生效;
停用即从注册表摘掉,/api/platforms 与账号平台下拉同步消失
- platforms/registry.py 新增 unregister(pid)
- 新接口:GET /api/plugins、POST /api/plugins/{name}/enable|disable、
POST /api/plugins/reload、POST /api/plugins/{name}/reload;失败返回 ok=false
- 同步 docs/pugin.md(新增「加载与启停」)、docs/architecture.md、docs/OPTIMIZATION.md、AGENTS.md
2026-10-31 15:50:06 +08:00
study-tool
f1a57853f4
refactor(plugins): gdgxk 迁到 pugins/gdgxk,插件由目录扫描加载
...
- platforms/gdgxk.py → pugins/gdgxk/main.py(实现不变,仍是 class Gdgxk(Platform))
- pugins/gdgxk/pugin.json 只放注册信息 id / title / name,不声明任何能力绑定
- pugins/__init__.py:load_plugins() 扫 pugins/*/pugin.json、import 各自的 main.py,
再用 pugin.json 的 id 校验注册结果;要换加载方式只改这一个函数
- platforms/__init__.py::load_builtin() 调 load_plugins();guanyixue 依赖 jspx/study,
暂留 platforms/
- engine / routes / quiz / contract / 前端未改动
- 同步 AGENTS.md、docs/architecture.md、docs/OPTIMIZATION.md
2026-10-31 15:41:22 +08:00
study-tool
f999e4fa4d
refactor(platforms): 平台能力改为子类实现,注册不再逐项绑定函数
...
- Platform 由 dataclass 字段绑定改为基类:id / label / entries 是类属性,能力是子类方法,
未实现的阶段保持基类 None,capabilities() 与 /api/platforms 输出不变
- gdgxk:session(原 new_session)/ login / list_courses / discover / study / _relogin
收进 class Gdgxk(Platform),解析与上报 helper 仍是模块级函数
- guanyixue:改成 class Guanyixue(Platform),方法转调 jspx / study
- 删除 src/study_tool/pugins/ 草稿目录(内容与 platforms/gdgxk.py 重复,
pugin.json 里按名字声明 study / entries 的绑定方式作废,元数据改由类属性承载)
- 引擎 / 路由 / quiz / contract / 前端未改动
- 同步 docs/architecture.md、AGENTS.md、docs/OPTIMIZATION.md
2026-10-31 15:02:21 +08:00
study-tool
1a3347f7f9
feat: 添加账号支持选择学习平台
...
账号新增 platform 字段,登录/刷新课程/发现课程按平台分发;同时把 JS 脚本收进 script/(目录规范调整)。
2026-10-30 01:13:47 +08:00
study-tool
e8634a6317
refactor: React 前端重构,新旧平台合并为莞易学
2026-10-29 23:53:17 +08:00
study-tool
585a7a28dd
feat: study modes (fast/parallel) and course-container completion fix
...
- settings: study.mode fast|normal and study.parallel 1-5
- normal mode: one headless browser per video, visibility keep-alive, auto-degrade when the platform enforces order
- report study/log/detail/save before isComplete; drop lastProgressTime on completion
- complete periodType 10/13 container nodes and recompute counters via PUT calFinalScore
- capture mode: POST /api/capture records all XHR/fetch including new tabs
- UI: study mode in settings, capture / stop-capture menu items
2026-10-27 22:30:57 +08:00