Skip to content

Commit 34cef26

Browse files
committed
upgrade font to 2022.9 and change port from 8000 to 18000
1 parent f1fde72 commit 34cef26

26 files changed

+141
-77
lines changed

doc/doc_admin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
进入后台admin界面
44

5-
[http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin/)
5+
[http://127.0.0.1:18000/admin/](http://127.0.0.1:18000/admin/)
66

77
* 返回主页
88
<br />在admin中点击页面上方的查看站点返回主页面。

doc/doc_deploy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ sudo bash run_server.sh
3737

3838
最后要求输入django用户名和密码。
3939

40-
5. 本机访问http://127.0.0.1:8000/mdict
40+
5. 本机访问http://127.0.0.1:18000/mdict
4141

4242
已知问题:在ubuntu20.04下,由于多进程的原因,run_server.sh运行过程中,migrate等命令无法自动结束,需要手动ctrl+c结束,在ubuntu18.04下正常。
4343

@@ -128,7 +128,7 @@ for dic in all_dics:
128128
命令设置填写以下命令,8000可以替换为别的端口,进入点设置留空。
129129

130130
```
131-
python3 manage.py runserver 0.0.0.0:8000 --noreload
131+
python3 manage.py runserver 0.0.0.0:18000 --noreload
132132
```
133133

134134
高级设置/网络:网络模式选择host

doc/doc_es.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pip install elasticsearch-dsl
4949

5050
5151

52-
[http://127.0.0.1:8000/mdict/es/](http://127.0.0.1:8000/mdict/es/)
52+
[http://127.0.0.1:18000/mdict/es/](http://127.0.0.1:18000/mdict/es/)
5353

5454
在进行全文查询时,eselasticsearch.bat需要一直运行,否则查询无结果,如果需要一直开启,需设置开机启动。
5555

doc/doc_huaci.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pip install -r requirements3.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
1010

1111
3. 双击运行,右下角出现托盘图标。
1212

13-
4. 默认url是http://127.0.0.1:8000/mdict/?query=%WORD%,在huaci/utils/huaci.ini中修改url。
13+
4. 默认url是http://127.0.0.1:18000/mdict/?query=%WORD%,在huaci/utils/huaci.ini中修改url。
1414

1515
如果查词结果是空白,查看huaci/utils/huaci.ini中的ip和端口是否正确。
1616

doc/doc_index.md

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 说明文档
22

33
- [说明文档](#说明文档)
4+
* [设备测试](设备测试)
45
* [PWA支持](#PWA支持)
56
* [格式支持](#格式支持)
67
* [不支持](#不支持)
@@ -17,6 +18,29 @@
1718
* [可能的问题](#可能的问题)
1819
* [分流](#分流)
1920

21+
### 设备测试
22+
23+
#### 设备测试
24+
25+
测试词典库,共1248本词典,大小(mdx+mdd+zim)761GB。
26+
27+
测试设备1:腾讯云4核云服务器,50G硬盘。
28+
29+
硬盘容量和CPU性能均不足,只能运行50本左右的词典,连接速度有时快,有时很慢。
30+
31+
测试设备2:威联通464C(开启固态缓存加速)。
32+
33+
运行测试词典库,第一次查询会耗时几个小时,之后的查询耗时在30秒-60秒之间,每次查词CPU占用100%。
34+
35+
测试设备3:台式机(CPU3900X12核锁频3.8GHz),固态硬盘。
36+
37+
运行测试词典库,查词耗时3-4秒左右。
38+
39+
#### 网络测试
40+
41+
光猫无公网IP,有IPv6,手机使用流量访问。采用威联通DDNS无法联通;采用zerotier,在IPv4下速度约30KB/s,查词极慢;路由器开启IPv6后,速度约2MB/s,和局域网下查词速度一样。
42+
43+
2044
### PWA支持
2145

2246
在本机浏览器上打开时,点击主页面、查询页面或者全文搜索页面地址栏上的安装按钮,可以安装为PWA应用,默认打开页面是查询页面。
@@ -111,7 +135,7 @@ windows下的d盘在wsl下为/mnt/d/。 注意输入规范的路径,用双引
111135

112136
#### 修改服务器端口
113137

114-
测试服务器修改启动脚本(run_server.bat,run_server_no_check.bat,run_server.sh,run_server_no_check.sh)中的0.0.0.0:8000
138+
测试服务器修改启动脚本(run_server.bat,run_server_no_check.bat,run_server.sh,run_server_no_check.sh)中的0.0.0.0:18000
115139

116140
apache修改配置文件django-mdict.conf中的VirtualHost *:80。
117141

@@ -141,17 +165,17 @@ mdict/readlib/pyx/mdict/ cython编译生成的中间文件
141165

142166
设置/研究/自定义URL
143167

144-
[http://IP地址:8000/mdict/?query={keyword}]()
168+
[http://IP地址:18000/mdict/?query={keyword}]()
145169

146170
2. 使用GET方法获取查词的json结果
147171

148-
[http://IP地址:8000/api/mdict2/mdict/]()
172+
[http://IP地址:18000/api/mdict2/mdict/]()
149173

150174
参数是query:apple,page:1
151175

152176
3. 使用url获取查词的json结果
153177

154-
[http://IP地址:8000/api/mdict2/mdict/?query=apple&page=2&format=json]()
178+
[http://IP地址:18000/api/mdict2/mdict/?query=apple&page=2&format=json]()
155179

156180
#### 切换主页
157181

doc/readme_en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ git clone https://github.com/jiangnianshun/django-mdict.git --depth=1
4545
4.3 finally enter username and password
4646

4747
5. Django dafault port 8000
48-
<br />local url: http://127.0.0.1:8000/mdict/
48+
<br />local url: http://127.0.0.1:18000/mdict/
4949

5050
### Recommendation
5151

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ services:
33
app:
44
restart: always
55
build: .
6-
command: "python3 manage.py runserver 0.0.0.0:8000 --noreload"
6+
command: "python3 manage.py runserver 0.0.0.0:18000 --noreload"
77
volumes:
88
- .:/code
99
- /path/to/mdict/library:/library
1010
ports:
11-
- "8000:8090"
11+
- "18000:8090"

huaci/utils/tkhuaci.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def __init__(self, master):
4444
self.t2 = 0
4545

4646
self.url_dict = collections.OrderedDict()
47-
self.url_dict['查询'] = 'http://127.0.0.1:8000/mdict/?query=%WORD%'
48-
self.url_dict['全文查询'] = 'http://127.0.0.1:8000/mdict/es/?query=%WORD%'
47+
self.url_dict['查询'] = 'http://127.0.0.1:18000/mdict/?query=%WORD%'
48+
self.url_dict['全文查询'] = 'http://127.0.0.1:18000/mdict/es/?query=%WORD%'
4949

5050
self.p = None
5151

huaci/utils/tkini.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
default_url_dict = collections.OrderedDict()
2424
default_url_dict.update({
25-
'查询': 'http://127.0.0.1:8000/mdict/?query=%WORD%',
26-
'全文查询': 'http://127.0.0.1:8000/mdict/es/?query=%WORD%'
25+
'查询': 'http://127.0.0.1:18000/mdict/?query=%WORD%',
26+
'全文查询': 'http://127.0.0.1:18000/mdict/es/?query=%WORD%'
2727
})
2828

2929
cef_settings = {

0 commit comments

Comments
 (0)