Lan Hui
9da1a1cae6
Merge branch 'Alpha-snapshot20230621' of http://121.4.94.30:3000/mrlan/EnglishPal into Alpha-snapshot20230621
2023-08-11 18:29:54 +08:00
Hui Lan
9b1d60748d
Increase button size so that it is easier to use on tablets .
2023-08-11 18:29:35 +08:00
Lan Hui
83bbd8f600
Improve the speed of loading the next article further after incorporating Chen Qiuwei et al.'s suggestions.
2023-08-11 15:48:53 +08:00
Lan Hui
1b211f107d
Speed up loading next article
...
The key change is replacing "d1 = load_freq_history(path_prefix + 'static/frequency/ferquency.p)" with "d1 = load_freq_history(user_word_list)"
in function get_today_article() from Article.py. Now, with a user_word_list of size about 500, the next article can be loaded within 100ms.
The new d1 is much smaller than the old one, therefore the following computation "d3 = get_difficulty_level_for_user(d1, d2)" is much faster.
The students did not feel that loading next article is slow; this is because their frequency.p is quite small.
Also log information in app/log.txt
2023-08-11 11:59:48 +08:00
Lan Hui
10c291bed2
Highlight user difficulty level too.
2023-08-10 19:12:30 +08:00
Lan Hui
6d15b65e3c
Make highlighting text difficulty level work.
2023-08-10 19:09:15 +08:00
Lan Hui
e4f870c995
Create folder app/db with a README file.
2023-08-10 15:25:42 +08:00
Lan Hui
06f896a33a
Update .gitignore
2023-08-10 15:22:30 +08:00
Hui Lan
25c2e0aca8
README.md: update the path to wordfreqapp.db.
2023-08-10 14:24:00 +08:00
Hui Lan
dca76969eb
解决程序源文件更新了,但是 docker container 中的程序源文件没有更新的问题
...
问题出在 build.sh 中的 --mount type=volume,src=englishpal-db,target=/app 。
运行 docker container 时,会将整个 englishpal-db 对应的文件夹 /var/lib/docker/volumes/englishpal-db/_data
下面的内容拷贝到 docker container 里面的 /app 文件夹下面。
然而,/var/lib/docker/volumes/englishpal-db/_data 下面的源程序文件并不是最新的(比如其 main.py 是 7月17日的)。
将 target=/app 改为 target=/app/db。即可解决问题。
2023-08-10 14:19:37 +08:00
Hui Lan
00ae957b27
Try to figure out how to rebuild the image after updating the source code.
2023-08-10 10:47:57 +08:00
Hui Lan
a397c756cf
Merge branch 'Alpha-snapshot20230621' of http://121.4.94.30:3000/mrlan/EnglishPal into Alpha-snapshot20230621
2023-08-10 10:05:29 +08:00
Lan Hui
14ab63c85c
文章段落正确分段(在 lead class 中添加 white-space: pre-wrap;)
2023-08-10 10:03:02 +08:00
Hui Lan
b8c3d9bda7
No cache while building docker image
2023-07-17 17:46:55 +08:00
Lan Hui
43419ab4b6
Enlarge text difficult level for one second (make it work using vanilla JavaScript)
2023-07-17 16:28:08 +08:00
Hui Lan
78d9a66e88
After loading the next article, show its difficulty level in a larger size for one second.
2023-07-17 16:13:56 +08:00
Hui Lan
79bdec2a7d
Dockerfile: update docker image version.
2023-07-17 10:38:17 +08:00
Hui Lan
fb80e952b9
Simplify the docker run options
2023-07-17 10:25:07 +08:00
Hui Lan
6ea0b970a2
(1) Downgrade Flask version from 2.3.2 to 2.0.3 as installing the higher version reports errors. This is probably due to my outdated python version (3.6). (2) Persist SQLite database data in a docker volume. Created a docker volume called englishpal-db using command 'docker volume create englishpal-db' and associate this volume with the docker image file directory /app. So, now what happens in /app will be mirrored to englishpal-db. Where is englishpal-db located? Use command 'docker volume inspect englishpal-db' to find out.
2023-07-17 07:45:38 +08:00
Lan Hui
20051e1a93
article.py: correct data format
2023-07-14 09:17:11 +08:00
Lan Hui
5711f0e826
Update flask version in requirements.txt, use escape from markupsafe package.
2023-07-14 09:11:02 +08:00
Lan Hui
cc92e5e29a
admin_service.py: non-programmers probably do not know int. So, use integer instead.
2023-07-14 08:32:20 +08:00
Lan Hui
cd562a745c
admin_service.py: do not need to have seperate lines for a statement.
2023-07-14 08:30:58 +08:00
Lan Hui
c284893097
admin_service.py: correct typo parmas.
2023-07-14 08:27:33 +08:00
Lan Hui
87fd594636
admin_service.py: refactor view function article().
2023-07-14 08:26:37 +08:00
Lan Hui
18c37d583a
admin_service.py: show article content for the newly added article after clicking the button '保存'.
2023-07-14 08:15:15 +08:00
Lan Hui
472c0c115f
Fix Bug 541
2023-07-09 20:26:32 +08:00
Lan Hui
9a156ebf7e
Fix Bug 539
2023-07-08 18:23:45 +08:00
Hui Lan
807d74741b
修复 Bug 493。不要转义(escape)表单提交的内容。否则类 WordFreq 不能正确工作,比如转义会把单引号变成 ',这不利于 WordFreq 类处理。
2023-07-07 16:13:48 +08:00
Hui Lan
287d496ae9
Merge branch 'Alpha-snapshot20230621' of http://121.4.94.30:3000/mrlan/EnglishPal into Alpha-snapshot20230621
2023-07-01 15:17:34 +08:00
张艺腾
582f399f73
Bug537 and Bug538
2023-06-21 16:48:45 +08:00
Hui Lan
c37ee98b77
Merge branch 'fix-vuln' of http://121.4.94.30:3000/mrlan/EnglishPal into Alpha-snapshot20230619b
2023-06-19 21:50:48 +08:00
徐宣
f40a388277
Fix: Move wordfreqapp.db to new location
2023-06-19 14:48:35 +08:00
徐宣
2277473afe
Fix: Add import for 'abort' function
2023-06-18 19:49:33 +08:00
徐宣
f01c334827
Fix: no-random secret key generation and XSS vulnerability
2023-06-18 19:44:19 +08:00
Laugh
4d2535a6e8
Merge branch 'Alpha-snapshot20230605' into Bug527-ZhouZhifang
2023-06-15 15:59:29 +08:00
Laugh
bb2d0363e4
Feat: update fontsize and margin of some elements
2023-06-15 15:54:46 +08:00
顾涵
708a6a2821
Merge pull request 'WIP:Bug529-GuHan' ( #88 ) from Bug529-GuHan into master
...
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/88
2023-06-04 12:39:34 +08:00
poincareS
0ed7657747
Merge remote-tracking branch 'origin/SPM2023S-QianJunQi' into SPM2023S-QianJunQi
...
# Conflicts:
# app/wordCMD.py
2023-06-04 10:42:40 +08:00
poincareS
2fb3003808
fix: 2023.6.1
...
1. 删去了wordCMD.py中:
from flask import ....,Blueprint,....
改为:
from flask import *
2. 修改了代码的格式,包括:等号两边的空格、加号两边的空格
3. 更新了访问用户单词的token验证
3.1 使用Authorization的字段值(Bearer xxx)验证token
3.2 取消了路由访问用户单词的功能,只能在终端命令行中输入: "curl -H "Authorization: Bearer 密钥" http://127.0.0.1:5000/show/用户名/ "获取单词
2023-06-04 10:41:24 +08:00
黄子睿
9816596cf8
删除 'app/static/js/tanyanmei-fillword.js'
2023-06-02 21:34:27 +08:00
黄子睿
682247bff1
refactor partial function and code writing specifications
2023-06-02 21:33:21 +08:00
Hui Lan
b22c654f0f
Merge branch 'Bug529-GuHan' of http://121.4.94.30:3000/mrlan/EnglishPal into Alpha-snapshot20230601
2023-06-01 07:40:27 +08:00
倪玲丽
d402bb45cb
刷新屏幕,点击上下篇,加入生词库,停止阅读(更改)
2023-05-31 18:37:05 +08:00
倪玲丽
cdf6180901
刷新屏幕,点击上下篇,加入生词库,停止阅读
2023-05-30 18:48:37 +08:00
倪玲丽
38837c9c2f
合并最新的Alpha-snapshot20230529
2023-05-30 18:45:23 +08:00
顾涵
688a198768
已经与Alpha-snapshot20230525 分支同步,重新提交
2023-05-28 16:31:12 +08:00
黄子睿
a0ddf4bdad
上传文件至 'app/static/js'
...
修复了 Bug492 选中问号出现多个问号的问题。
解决了选中紧跟标点符号的单词,单词能正常显示。
优化了选中较长的文章时页面容易出现卡顿的问题。
2023-05-27 17:33:37 +08:00
poincareS
dc37f5f229
提供更便利的获取用户单词表的方法,以json数据格式范围
...
1、注册了一个新的蓝图路径以供功能实现
2、wordCMD中完成功能的代码代码实现
2023-05-26 17:34:43 +08:00
poincareS
e9ec65e7a5
提供更便利的获取用户单词表的方法,以json数据格式范围
...
1、注册了一个新的蓝图路径以供功能实现
2、wordCMD中完成功能的代码代码实现
2023-05-26 17:29:59 +08:00