GameSentenceMiner 2.19.16__py3-none-any.whl → 2.20.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.
Potentially problematic release.
This version of GameSentenceMiner might be problematic. Click here for more details.
- GameSentenceMiner/__init__.py +39 -0
- GameSentenceMiner/anki.py +6 -3
- GameSentenceMiner/gametext.py +13 -2
- GameSentenceMiner/gsm.py +40 -3
- GameSentenceMiner/locales/en_us.json +4 -0
- GameSentenceMiner/locales/ja_jp.json +4 -0
- GameSentenceMiner/locales/zh_cn.json +4 -0
- GameSentenceMiner/obs.py +4 -1
- GameSentenceMiner/owocr/owocr/ocr.py +304 -134
- GameSentenceMiner/owocr/owocr/run.py +1 -1
- GameSentenceMiner/ui/anki_confirmation.py +4 -2
- GameSentenceMiner/ui/config_gui.py +12 -0
- GameSentenceMiner/util/configuration.py +6 -2
- GameSentenceMiner/util/cron/__init__.py +12 -0
- GameSentenceMiner/util/cron/daily_rollup.py +613 -0
- GameSentenceMiner/util/cron/jiten_update.py +397 -0
- GameSentenceMiner/util/cron/populate_games.py +154 -0
- GameSentenceMiner/util/cron/run_crons.py +148 -0
- GameSentenceMiner/util/cron/setup_populate_games_cron.py +118 -0
- GameSentenceMiner/util/cron_table.py +334 -0
- GameSentenceMiner/util/db.py +236 -49
- GameSentenceMiner/util/ffmpeg.py +23 -4
- GameSentenceMiner/util/games_table.py +340 -93
- GameSentenceMiner/util/jiten_api_client.py +188 -0
- GameSentenceMiner/util/stats_rollup_table.py +216 -0
- GameSentenceMiner/web/anki_api_endpoints.py +438 -220
- GameSentenceMiner/web/database_api.py +955 -1259
- GameSentenceMiner/web/jiten_database_api.py +1015 -0
- GameSentenceMiner/web/rollup_stats.py +672 -0
- GameSentenceMiner/web/static/css/dashboard-shared.css +75 -13
- GameSentenceMiner/web/static/css/overview.css +604 -47
- GameSentenceMiner/web/static/css/search.css +226 -0
- GameSentenceMiner/web/static/css/shared.css +762 -0
- GameSentenceMiner/web/static/css/stats.css +221 -0
- GameSentenceMiner/web/static/js/components/bar-chart.js +339 -0
- GameSentenceMiner/web/static/js/database-bulk-operations.js +320 -0
- GameSentenceMiner/web/static/js/database-game-data.js +390 -0
- GameSentenceMiner/web/static/js/database-game-operations.js +213 -0
- GameSentenceMiner/web/static/js/database-helpers.js +44 -0
- GameSentenceMiner/web/static/js/database-jiten-integration.js +750 -0
- GameSentenceMiner/web/static/js/database-popups.js +89 -0
- GameSentenceMiner/web/static/js/database-tabs.js +64 -0
- GameSentenceMiner/web/static/js/database-text-management.js +371 -0
- GameSentenceMiner/web/static/js/database.js +86 -718
- GameSentenceMiner/web/static/js/goals.js +79 -18
- GameSentenceMiner/web/static/js/heatmap.js +29 -23
- GameSentenceMiner/web/static/js/overview.js +1205 -339
- GameSentenceMiner/web/static/js/regex-patterns.js +100 -0
- GameSentenceMiner/web/static/js/search.js +215 -18
- GameSentenceMiner/web/static/js/shared.js +193 -39
- GameSentenceMiner/web/static/js/stats.js +1536 -179
- GameSentenceMiner/web/stats.py +1142 -269
- GameSentenceMiner/web/stats_api.py +2104 -0
- GameSentenceMiner/web/templates/anki_stats.html +4 -18
- GameSentenceMiner/web/templates/components/date-range.html +118 -3
- GameSentenceMiner/web/templates/components/html-head.html +40 -6
- GameSentenceMiner/web/templates/components/js-config.html +8 -8
- GameSentenceMiner/web/templates/components/regex-input.html +160 -0
- GameSentenceMiner/web/templates/database.html +564 -117
- GameSentenceMiner/web/templates/goals.html +41 -5
- GameSentenceMiner/web/templates/overview.html +159 -129
- GameSentenceMiner/web/templates/search.html +78 -9
- GameSentenceMiner/web/templates/stats.html +159 -5
- GameSentenceMiner/web/texthooking_page.py +280 -111
- {gamesentenceminer-2.19.16.dist-info → gamesentenceminer-2.20.0.dist-info}/METADATA +43 -2
- {gamesentenceminer-2.19.16.dist-info → gamesentenceminer-2.20.0.dist-info}/RECORD +70 -47
- {gamesentenceminer-2.19.16.dist-info → gamesentenceminer-2.20.0.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.19.16.dist-info → gamesentenceminer-2.20.0.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.19.16.dist-info → gamesentenceminer-2.20.0.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.19.16.dist-info → gamesentenceminer-2.20.0.dist-info}/top_level.txt +0 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
{% set page_title = 'GSM Dashboard' %}
|
|
5
5
|
{% set page_specific_css = 'stats.css' %}
|
|
6
6
|
{% set include_kanji_grid_css = true %}
|
|
7
|
+
{% set include_chartjs = true %}
|
|
7
8
|
{% include 'components/html-head.html' %}
|
|
8
9
|
|
|
9
10
|
<body>
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
<!-- Include shared popup components -->
|
|
21
22
|
{% include 'components/popups.html' %}
|
|
22
23
|
|
|
24
|
+
<!-- SECTION 1: Summary Cards -->
|
|
23
25
|
<div class="dashboard-card peak-stats">
|
|
24
26
|
<div class="dashboard-card-header">
|
|
25
27
|
<h3 class="dashboard-card-title">
|
|
@@ -47,6 +49,87 @@
|
|
|
47
49
|
</div>
|
|
48
50
|
</div>
|
|
49
51
|
<br>
|
|
52
|
+
|
|
53
|
+
<div class="dashboard-card game-milestones">
|
|
54
|
+
<div class="dashboard-card-header">
|
|
55
|
+
<h3 class="dashboard-card-title">
|
|
56
|
+
<span class="dashboard-card-icon">🎮</span>
|
|
57
|
+
By Release Date
|
|
58
|
+
</h3>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="game-milestones-grid" id="gameMilestonesGrid">
|
|
61
|
+
<!-- Oldest game card -->
|
|
62
|
+
<div class="milestone-game-card" id="oldestGameCard" style="display: none;">
|
|
63
|
+
<div class="milestone-game-image-container">
|
|
64
|
+
<img id="oldestGameImage" class="milestone-game-image" alt="Game Cover">
|
|
65
|
+
</div>
|
|
66
|
+
<div class="milestone-game-info">
|
|
67
|
+
<div class="milestone-label oldest">📜 OLDEST</div>
|
|
68
|
+
<div class="milestone-game-title" id="oldestGameTitle">-</div>
|
|
69
|
+
<div class="milestone-game-subtitle" id="oldestGameSubtitle"></div>
|
|
70
|
+
<div class="milestone-game-details">
|
|
71
|
+
<div class="milestone-detail-row">
|
|
72
|
+
<span class="milestone-detail-icon">📅</span>
|
|
73
|
+
<span class="milestone-detail-label">Released:</span>
|
|
74
|
+
<span class="milestone-detail-value" id="oldestGameReleaseYear">-</span>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<!-- Newest game card -->
|
|
81
|
+
<div class="milestone-game-card" id="newestGameCard" style="display: none;">
|
|
82
|
+
<div class="milestone-game-image-container">
|
|
83
|
+
<img id="newestGameImage" class="milestone-game-image" alt="Game Cover">
|
|
84
|
+
</div>
|
|
85
|
+
<div class="milestone-game-info">
|
|
86
|
+
<div class="milestone-label newest">✨ NEWEST</div>
|
|
87
|
+
<div class="milestone-game-title" id="newestGameTitle">-</div>
|
|
88
|
+
<div class="milestone-game-subtitle" id="newestGameSubtitle"></div>
|
|
89
|
+
<div class="milestone-game-details">
|
|
90
|
+
<div class="milestone-detail-row">
|
|
91
|
+
<span class="milestone-detail-icon">📅</span>
|
|
92
|
+
<span class="milestone-detail-label">Released:</span>
|
|
93
|
+
<span class="milestone-detail-value" id="newestGameReleaseYear">-</span>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<!-- No data message -->
|
|
100
|
+
<div class="milestone-no-data" id="milestonesNoData" style="display: none;">
|
|
101
|
+
No data. <a href="http://localhost:55000/database">Create entries in Database Management</a>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
<br>
|
|
106
|
+
|
|
107
|
+
<!-- SECTION 2: Daily Activity (Last 4 Weeks) -->
|
|
108
|
+
<div class="chart-container">
|
|
109
|
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
|
110
|
+
<h2 style="margin: 0;" id="dailyTimeChartTitle">📊 Daily Reading Time (Last 4 Weeks)</h2>
|
|
111
|
+
<button id="toggleTimeDataBtn" class="chart-toggle-btn" data-mode="30days">View all time data</button>
|
|
112
|
+
</div>
|
|
113
|
+
<canvas id="dailyTimeChart"></canvas>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<div class="chart-container">
|
|
117
|
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
|
118
|
+
<h2 style="margin: 0;" id="dailyCharsChartTitle">📚 Daily Characters Read (Last 4 Weeks)</h2>
|
|
119
|
+
<button id="toggleCharsDataBtn" class="chart-toggle-btn" data-mode="30days">View all time data</button>
|
|
120
|
+
</div>
|
|
121
|
+
<canvas id="dailyCharsChart"></canvas>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div class="chart-container">
|
|
125
|
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
|
|
126
|
+
<h2 style="margin: 0;" id="dailySpeedChartTitle">⚡ Daily Reading Speed (Last 4 Weeks)</h2>
|
|
127
|
+
<button id="toggleSpeedDataBtn" class="chart-toggle-btn" data-mode="30days">View all time data</button>
|
|
128
|
+
</div>
|
|
129
|
+
<canvas id="dailySpeedChart"></canvas>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<!-- SECTION 3: Overall Progress Over Time -->
|
|
50
133
|
<div class="chart-container">
|
|
51
134
|
<h2>Lines Received Over Time</h2>
|
|
52
135
|
<canvas id="linesChart"></canvas>
|
|
@@ -58,20 +141,38 @@
|
|
|
58
141
|
</div>
|
|
59
142
|
|
|
60
143
|
<div class="chart-container">
|
|
61
|
-
<h2>Reading
|
|
62
|
-
<canvas id="
|
|
144
|
+
<h2>Reading Time Quantity</h2>
|
|
145
|
+
<canvas id="readingTimeChart"></canvas>
|
|
63
146
|
</div>
|
|
64
147
|
|
|
65
148
|
<div class="chart-container">
|
|
66
|
-
<h2>Reading
|
|
67
|
-
<canvas id="
|
|
149
|
+
<h2>Reading Chars Quantity</h2>
|
|
150
|
+
<canvas id="readingCharsChart"></canvas>
|
|
68
151
|
</div>
|
|
69
152
|
|
|
153
|
+
<!-- SECTION 4: Reading Speed Analysis -->
|
|
70
154
|
<div class="chart-container">
|
|
71
155
|
<h2>Reading Speed Improvement</h2>
|
|
72
156
|
<canvas id="readingSpeedPerGameChart"></canvas>
|
|
73
157
|
</div>
|
|
74
158
|
|
|
159
|
+
<div class="chart-container">
|
|
160
|
+
<h2>📉 Reading Speed by Game Difficulty</h2>
|
|
161
|
+
<canvas id="difficultySpeedChart"></canvas>
|
|
162
|
+
<div id="difficultySpeedNoData" class="chart-no-data" style="display: none;">
|
|
163
|
+
No data. <a href="http://localhost:55000/database">Create entries in Database Management</a>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<div class="chart-container">
|
|
168
|
+
<h2>🎮 Games by Type</h2>
|
|
169
|
+
<canvas id="gameTypeChart"></canvas>
|
|
170
|
+
<div id="gameTypeNoData" class="chart-no-data" style="display: none;">
|
|
171
|
+
No data. <a href="http://localhost:55000/database">Create entries in Database Management</a>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<!-- SECTION 5: Time Patterns -->
|
|
75
176
|
<div class="chart-container">
|
|
76
177
|
<h2>Time of Day Activity Pattern</h2>
|
|
77
178
|
<canvas id="hourlyActivityChart"></canvas>
|
|
@@ -82,6 +183,53 @@
|
|
|
82
183
|
<canvas id="hourlyReadingSpeedChart"></canvas>
|
|
83
184
|
</div>
|
|
84
185
|
|
|
186
|
+
<div class="chart-container">
|
|
187
|
+
<h2>📅 Day of Week Activity</h2>
|
|
188
|
+
<canvas id="dayOfWeekChart"></canvas>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<div class="chart-container">
|
|
192
|
+
<h2>⏰ Average Hours Read by Day</h2>
|
|
193
|
+
<canvas id="avgHoursByDayChart"></canvas>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<!-- SECTION 6: Top Performance Days -->
|
|
197
|
+
<div class="chart-container">
|
|
198
|
+
<h2>🏆 Top 5 Reading Speed Days</h2>
|
|
199
|
+
<canvas id="topReadingSpeedDaysChart"></canvas>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div class="chart-container">
|
|
203
|
+
<h2>📚 Top 5 Most Productive Days</h2>
|
|
204
|
+
<canvas id="topCharacterDaysChart"></canvas>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
<!-- SECTION 7: Mining Activity -->
|
|
208
|
+
<div class="chart-container">
|
|
209
|
+
<h2>Cards Mined Over Last 30 Days</h2>
|
|
210
|
+
<canvas id="cardsMinedChart"></canvas>
|
|
211
|
+
<div id="cardsMinedNoData" class="chart-no-data" style="display: none;">
|
|
212
|
+
No card mining activity recorded for the selected range.
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<!-- Mining Heatmap Card (Full Width) -->
|
|
217
|
+
<div class="dashboard-card all-games" id="miningHeatmapCard" style="margin-bottom: 24px;">
|
|
218
|
+
<div class="dashboard-card-header">
|
|
219
|
+
<h3 class="dashboard-card-title">
|
|
220
|
+
<span class="dashboard-card-icon">📊</span>
|
|
221
|
+
Mining Heatmap
|
|
222
|
+
</h3>
|
|
223
|
+
<p class="dashboard-card-subtitle">Track your daily sentence mining progress</p>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<div class="dashboard-progress-section">
|
|
227
|
+
<div class="dashboard-progress-title">Activity Heatmap</div>
|
|
228
|
+
<div id="miningHeatmapContainer"></div>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<!-- SECTION 8: Kanji Grid (Bottom) -->
|
|
85
233
|
<div class="chart-container">
|
|
86
234
|
<h2>Kanji Grid</h2>
|
|
87
235
|
<div id="kanjiGridContainer">
|
|
@@ -114,6 +262,7 @@
|
|
|
114
262
|
{% set chars_target = stats_config.character_count_target | default(25000000) %}
|
|
115
263
|
{% set games_target = stats_config.games_target | default(100) %}
|
|
116
264
|
{% set heatmap_year = 'all' %}
|
|
265
|
+
{% set first_date = first_rollup_date | default('') %}
|
|
117
266
|
|
|
118
267
|
{% set stats_config_vars = {
|
|
119
268
|
'afkTimerSeconds': afk_timer,
|
|
@@ -122,15 +271,20 @@
|
|
|
122
271
|
'readingHoursTarget': hours_target,
|
|
123
272
|
'characterCountTarget': chars_target,
|
|
124
273
|
'gamesTarget': games_target,
|
|
125
|
-
'heatmapDisplayYear': heatmap_year
|
|
274
|
+
'heatmapDisplayYear': heatmap_year,
|
|
275
|
+
'firstDate': first_date
|
|
126
276
|
} %}
|
|
127
277
|
|
|
128
278
|
<!-- Include shared JavaScript configuration -->
|
|
129
279
|
{% set config_vars = stats_config_vars %}
|
|
130
280
|
{% set config_object_name = 'statsConfig' %}
|
|
131
281
|
{% set include_kanji_grid_js = true %}
|
|
282
|
+
{% set include_heatmap_js = true %}
|
|
132
283
|
{% set page_specific_js = 'stats.js' %}
|
|
133
284
|
{% include 'components/js-config.html' %}
|
|
285
|
+
|
|
286
|
+
<!-- Load bar chart component before stats.js to ensure it's available -->
|
|
287
|
+
<script src="/static/js/components/bar-chart.js"></script>
|
|
134
288
|
|
|
135
289
|
</body>
|
|
136
290
|
|