readloops 2.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app/__init__.py +0 -0
- app/api/__init__.py +0 -0
- app/api/articles.py +97 -0
- app/api/reading.py +157 -0
- app/api/stats.py +254 -0
- app/api/words.py +210 -0
- app/cli.py +185 -0
- app/config.py +58 -0
- app/database.py +204 -0
- app/main.py +63 -0
- app/models.py +35 -0
- app/services/__init__.py +0 -0
- app/services/ai.py +571 -0
- app/services/corpus.py +78 -0
- app/services/dict_import.py +236 -0
- app/services/similarity.py +209 -0
- app/services/smart_test.py +345 -0
- app/services/srs.py +154 -0
- app/web/css/style.css +2338 -0
- app/web/icon.svg +14 -0
- app/web/index.html +179 -0
- app/web/js/app.js +1923 -0
- app/web/manifest.json +24 -0
- readloops-2.3.0.dist-info/METADATA +272 -0
- readloops-2.3.0.dist-info/RECORD +29 -0
- readloops-2.3.0.dist-info/WHEEL +5 -0
- readloops-2.3.0.dist-info/entry_points.txt +2 -0
- readloops-2.3.0.dist-info/licenses/LICENSE +21 -0
- readloops-2.3.0.dist-info/top_level.txt +1 -0
app/web/icon.svg
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
4
|
+
<stop offset="0%" style="stop-color:#2d2d30"/>
|
|
5
|
+
<stop offset="100%" style="stop-color:#1a1a1c"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="512" height="512" rx="96" fill="url(#bg)"/>
|
|
9
|
+
<g transform="translate(256, 256)">
|
|
10
|
+
<path d="M -90 -60 A 110 110 0 1 1 -90 60" fill="none" stroke="white" stroke-width="22" stroke-linecap="round" opacity="0.9"/>
|
|
11
|
+
<polygon points="-90,80 -60,55 -120,55" fill="white" opacity="0.9"/>
|
|
12
|
+
<path d="M 30 -30 L 30 30 M 30 30 L 70 0" fill="none" stroke="white" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" opacity="0.7"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
app/web/index.html
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN" data-theme="dark">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>ReadLoops</title>
|
|
7
|
+
<link rel="manifest" href="/manifest.json">
|
|
8
|
+
<meta name="theme-color" content="#1a1a1c">
|
|
9
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
11
|
+
<link rel="icon" type="image/svg+xml" href="/icon.svg">
|
|
12
|
+
<link rel="apple-touch-icon" href="/icon.svg">
|
|
13
|
+
<link rel="stylesheet" href="/static/css/style.css?v=37">
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<!-- 液态玻璃 SVG 滤镜(边缘折射效果) -->
|
|
17
|
+
<svg style="position:absolute;width:0;height:0;pointer-events:none;" aria-hidden="true">
|
|
18
|
+
<defs>
|
|
19
|
+
<filter id="liquid-glass" x="0%" y="0%" width="100%" height="100%" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
20
|
+
<feTurbulence type="fractalNoise" baseFrequency="0.012" numOctaves="2" seed="5" result="noise"/>
|
|
21
|
+
<feDisplacementMap in="SourceGraphic" in2="noise" scale="6" xChannelSelector="R" yChannelSelector="G"/>
|
|
22
|
+
</filter>
|
|
23
|
+
<filter id="liquid-glass-strong" x="0%" y="0%" width="100%" height="100%" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
24
|
+
<feTurbulence type="fractalNoise" baseFrequency="0.008" numOctaves="3" seed="8" result="noise"/>
|
|
25
|
+
<feDisplacementMap in="SourceGraphic" in2="noise" scale="10" xChannelSelector="R" yChannelSelector="G"/>
|
|
26
|
+
</filter>
|
|
27
|
+
<!-- 全屏涟漪扭曲滤镜:feTurbulence流动噪声 + feDisplacementMap像素扭曲 -->
|
|
28
|
+
<filter id="ripple-distort" x="-20%" y="-20%" width="140%" height="140%" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
29
|
+
<feTurbulence id="ripple-turbulence" type="fractalNoise" baseFrequency="0.015" numOctaves="2" seed="3" result="noise"/>
|
|
30
|
+
<feDisplacementMap id="ripple-displace" in="SourceGraphic" in2="noise" scale="0" xChannelSelector="R" yChannelSelector="G"/>
|
|
31
|
+
</filter>
|
|
32
|
+
</defs>
|
|
33
|
+
</svg>
|
|
34
|
+
<div class="app">
|
|
35
|
+
<aside class="sidebar" id="sidebar">
|
|
36
|
+
<a class="sidebar-header" id="projectHomeLink" href="https://github.com/pekoqq/ReadLoops" target="_blank" rel="noopener noreferrer" title="在 GitHub 上查看项目">ReadLoops</a>
|
|
37
|
+
<nav class="sidebar-nav">
|
|
38
|
+
<div class="nav-section">阅读</div>
|
|
39
|
+
<div class="nav-item active" data-view="reader">阅读</div>
|
|
40
|
+
<div class="nav-item" data-view="articles">历史文章</div>
|
|
41
|
+
<div class="nav-section">词汇</div>
|
|
42
|
+
<div class="nav-item" data-view="vocab">生词本</div>
|
|
43
|
+
<div class="nav-item" data-view="test">单词测试</div>
|
|
44
|
+
<div class="nav-item" data-view="stats">统计</div>
|
|
45
|
+
</nav>
|
|
46
|
+
<div class="sidebar-footer">
|
|
47
|
+
<label for="themeSelect">主题</label>
|
|
48
|
+
<select id="themeSelect">
|
|
49
|
+
<option value="dark" selected>深色</option>
|
|
50
|
+
<option value="paper">纸质护眼</option>
|
|
51
|
+
<option value="light">明亮</option>
|
|
52
|
+
<option value="black">纯黑</option>
|
|
53
|
+
</select>
|
|
54
|
+
</div>
|
|
55
|
+
</aside>
|
|
56
|
+
|
|
57
|
+
<main class="main">
|
|
58
|
+
<header class="toolbar">
|
|
59
|
+
<button class="toolbar-btn icon" id="toggleSidebar" title="折叠边栏">[≡]</button>
|
|
60
|
+
<button class="toolbar-btn primary" id="generateBtn">生成文章</button>
|
|
61
|
+
<span id="generateStatus" style="font-size:11px; color:var(--text-secondary);"></span>
|
|
62
|
+
<div class="toolbar-spacer"></div>
|
|
63
|
+
<button class="toolbar-btn" id="addWordBtn">+ 生词</button>
|
|
64
|
+
<button class="toolbar-btn large" id="settingsBtn" title="设置">设置</button>
|
|
65
|
+
<button class="toolbar-btn" id="lookupHistoryBtn" title="查词历史">查词</button>
|
|
66
|
+
<button class="toolbar-btn" id="focusBtn">专注</button>
|
|
67
|
+
</header>
|
|
68
|
+
|
|
69
|
+
<div class="reader-container" id="readerContainer">
|
|
70
|
+
<article class="reader" id="reader">
|
|
71
|
+
<div class="empty">
|
|
72
|
+
<h2>ReadLoops</h2>
|
|
73
|
+
<p>点击「生成文章」开始阅读训练</p>
|
|
74
|
+
<div class="empty-hints">
|
|
75
|
+
<span><kbd>空格</kbd>开始 / 暂停计时</span>
|
|
76
|
+
<span><kbd>选中</kbd>查词 · 选整句翻译</span>
|
|
77
|
+
<span><kbd>F</kbd>专注模式</span>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</article>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<footer class="timer-bar">
|
|
84
|
+
<span>阅读时间</span>
|
|
85
|
+
<span class="timer-time" id="timerDisplay">00:00</span>
|
|
86
|
+
<button class="timer-btn" id="timerBtn">开始 [空格]</button>
|
|
87
|
+
<span style="margin-left:20px;" id="articleMeta"></span>
|
|
88
|
+
</footer>
|
|
89
|
+
</main>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="lookup-panel" id="lookupPanel">
|
|
93
|
+
<div class="word" id="lpWord"></div>
|
|
94
|
+
<div class="phonetic" id="lpPhonetic"></div>
|
|
95
|
+
<div class="meaning" id="lpMeaning">查询中...</div>
|
|
96
|
+
<div class="actions">
|
|
97
|
+
<button class="action-btn" id="lpPronounce">发音</button>
|
|
98
|
+
<button class="action-btn" id="lpHighlight">高亮</button>
|
|
99
|
+
<button class="action-btn" id="lpAdd">加入生词本</button>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div class="modal-overlay" id="settingsModal">
|
|
104
|
+
<div class="modal">
|
|
105
|
+
<h2>设置</h2>
|
|
106
|
+
<div class="form-group">
|
|
107
|
+
<label>AI 服务商</label>
|
|
108
|
+
<select id="settingProvider">
|
|
109
|
+
<option value="deepseek" selected>DeepSeek</option>
|
|
110
|
+
<option value="opencode">OpenCode Zen</option>
|
|
111
|
+
<option value="openai">OpenAI</option>
|
|
112
|
+
<option value="custom">自定义</option>
|
|
113
|
+
</select>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="form-group">
|
|
116
|
+
<label>API Base URL</label>
|
|
117
|
+
<input type="text" id="settingBaseUrl" placeholder="https://opencode.ai/zen/v1">
|
|
118
|
+
</div>
|
|
119
|
+
<div class="form-group">
|
|
120
|
+
<label>API Key</label>
|
|
121
|
+
<input type="password" id="settingApiKey" placeholder="从 opencode.ai 获取">
|
|
122
|
+
</div>
|
|
123
|
+
<div class="form-group">
|
|
124
|
+
<label>模型</label>
|
|
125
|
+
<select id="settingModel">
|
|
126
|
+
<optgroup label="DeepSeek">
|
|
127
|
+
<option value="deepseek-flash">deepseek-flash (V4.1, 最新, 推荐)</option>
|
|
128
|
+
<option value="deepseek-v4-flash">deepseek-v4-flash (兼容, 自动路由到V4.1)</option>
|
|
129
|
+
<option value="deepseek-v4-pro">deepseek-v4-pro (9月14日下线)</option>
|
|
130
|
+
</optgroup>
|
|
131
|
+
<optgroup label="OpenCode 免费模型 (仅客户端可用)">
|
|
132
|
+
<option value="big-pickle">big-pickle</option>
|
|
133
|
+
<option value="mimo-v2.5-free">mimo-v2.5-free</option>
|
|
134
|
+
</optgroup>
|
|
135
|
+
<optgroup label="其他">
|
|
136
|
+
<option value="custom">自定义输入</option>
|
|
137
|
+
</optgroup>
|
|
138
|
+
</select>
|
|
139
|
+
<input type="text" id="settingModelCustom" placeholder="自定义模型名称" style="display:none; margin-top:6px;">
|
|
140
|
+
</div>
|
|
141
|
+
<div class="form-group">
|
|
142
|
+
<label>每篇目标生词数</label>
|
|
143
|
+
<input type="number" id="settingNewWords" min="3" max="30" value="10">
|
|
144
|
+
<div class="hint">前5篇为校准期,系统自动调整</div>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="form-group">
|
|
147
|
+
<button class="toolbar-btn" id="testApiBtn" style="width:100%;">测试连接</button>
|
|
148
|
+
<div class="test-result" id="testResult"></div>
|
|
149
|
+
</div>
|
|
150
|
+
<div class="modal-actions">
|
|
151
|
+
<button class="toolbar-btn" id="settingsCancel">取消</button>
|
|
152
|
+
<button class="toolbar-btn primary" id="settingsSave">保存</button>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<!-- 专注模式触发区域 -->
|
|
158
|
+
<div class="focus-top-trigger" id="focusTopTrigger"></div>
|
|
159
|
+
<div class="focus-left-trigger" id="focusLeftTrigger"></div>
|
|
160
|
+
<div class="focus-hint" id="focusHint">Esc 退出专注 · Space 暂停计时 · F 切换专注</div>
|
|
161
|
+
|
|
162
|
+
<!-- 水纹扩散引导效果 -->
|
|
163
|
+
<div class="ripple-container" id="rippleContainer"></div>
|
|
164
|
+
|
|
165
|
+
<!-- 右侧查词历史滑出面板 -->
|
|
166
|
+
<div class="right-panel-trigger" id="rightPanelTrigger"></div>
|
|
167
|
+
<div class="right-panel" id="rightPanel">
|
|
168
|
+
<div class="right-panel-header">
|
|
169
|
+
<span>查词历史</span>
|
|
170
|
+
<span class="count" id="lookupCount">0</span>
|
|
171
|
+
</div>
|
|
172
|
+
<div class="right-panel-body" id="lookupHistoryList">
|
|
173
|
+
<div class="right-panel-empty">还没有查词记录<br>选中文字即可查词</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<script src="/static/js/app.js?v=37"></script>
|
|
178
|
+
</body>
|
|
179
|
+
</html>
|