Skip to content

Commit 972ea4c

Browse files
committed
update english documentations
1 parent b35d6b6 commit 972ea4c

17 files changed

+1372
-143
lines changed
File renamed without changes.

doc/doc_deploy.md

+28-27
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
* [在wsl上运行](#在wsl上)
22
* [部署到wsl apache](#部署到wsl-apache)
33
* [删除数据库中重复词典](#删除数据库中重复词典)
4-
* [威联通部署docker](威联通部署docker)
5-
* [生成docker镜像(windows)](生成docker镜像(windows))
4+
* [生成docker镜像(windows)](#生成docker镜像(windows))
5+
* [威联通部署docker](#威联通部署docker)
66

77
### 在wsl上运行
88

@@ -119,30 +119,6 @@ for dic in all_dics:
119119
temp_dics.update({dic.mdict_file: None})
120120
```
121121

122-
### 威联通部署docker
123-
124-
1. 打开container station/创建,搜索django-mdict,点击安装。
125-
126-
2. 容器设置:
127-
128-
命令设置填写以下命令,8000可以替换为别的端口,进入点设置留空。
129-
130-
```
131-
python3 manage.py runserver 0.0.0.0:18000 --noreload
132-
```
133-
134-
高级设置/网络:网络模式选择host
135-
136-
高级设置/共享文件夹:
137-
138-
点击第一个新增:新增存储空间填写dmdict,挂载路径填写/code
139-
140-
点击第二个新增:挂载本机共享文件夹选择词典所在的路径,挂载路径填写/code/media/mdict/doc
141-
142-
点击创建
143-
144-
3. 其他设备访问nas ip:端口
145-
146122
### 生成docker镜像(windows)
147123

148124
1. 安装docker并运行
@@ -173,4 +149,29 @@ python3 manage.py createsuperuser
173149

174150
```
175151
docker compose build --progress=plain
176-
```
152+
```
153+
154+
### 威联通部署docker
155+
156+
1. 打开container station/创建,搜索已上传的镜像并安装。
157+
158+
2. 容器设置:
159+
160+
命令设置填写以下命令,18000可以替换为别的端口,进入点设置留空。
161+
162+
```
163+
python3 manage.py runserver 0.0.0.0:18000 --noreload
164+
```
165+
166+
高级设置/网络:网络模式选择host
167+
168+
高级设置/共享文件夹:
169+
170+
点击第一个新增:新增存储空间填写dmdict,挂载路径填写/code
171+
172+
点击第二个新增:挂载本机共享文件夹选择词典所在的路径,挂载路径填写/code/media/mdict/doc
173+
174+
点击创建
175+
176+
3. 其他设备访问nas ip:端口
177+

doc/doc_en/doc_admin.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
### admin operation
2+
3+
Enter the background admin interface
4+
5+
[http://127.0.0.1:18000/admin/](http://127.0.0.1:18000/admin/)
6+
7+
* return to home page
8+
<br />In the admin, click View Site at the top of the page to return to the main page.
9+
10+
* MDICT/Mdict dictionary:
11+
<br />No need to add dictionaries manually. Only used to modify dictionary name, dictionary sorting, and whether to enable the dictionary.
12+
13+
* MDICT/built-in entries:
14+
<br />Add entries from the built-in dictionary, support images and rich text, and support LaTex formulas.
15+
16+
* LaTex formula insertion:
17+
<br />Method 1. Click the latex formula button (button with the summation symbol) to insert the formula; <br />Method 2. Enter manually and wrap the formula with $.
18+
19+
* Custom command:
20+
<br />[link]The entry name to be jumped[/link]<br /> [wrap]The content to be folded[/wrap]<br /> Custom command insertion:<br /> 1. Select the text, click the L button, the text will be automatically wrapped with [link], and the selected text will be displayed as an entry jump. <br />2. Select the text, click the W button, the text will be automatically wrapped with [wrap], and the selected text will be folded.
21+
22+
* MDICT/Online Dictionary:
23+
<br />Add an online dictionary and replace the characters to be queried in the URL with %WORD%. Some websites do not support displaying in iframes. In this case, you need to remove the check box for opening in iframes.
24+
25+
* MDICT/tag
26+
<br />Create tags for built-in terms.
27+
28+
* MDICT/Dictionary Grouping
29+
<br />Create a dictionary group and then add the dictionary to the group.
30+
31+
* Enable/disable all dictionaries
32+
<br />On the Mdict dictionary page, check the check box before the ID, select all dictionaries on the first page, click on the right side of the execute button to select all XXX Mdict dictionaries, select EnableAllDics/DisableAllDics in the action drop-down box, and finally click the execute button.
33+
34+
### Built-in dictionary
35+
36+
The built-in dictionary adds entries through the background admin, supports LaTex formulas (MathJax), supports rich text and inserted pictures (django-ckeditor), and supports exporting to txt in mdict format. Since the current dictionary software does not support MathJax, it will not work when exporting txt. Export MathJax.
37+
38+
Order:
39+
40+
[link]abc[/link]
41+
42+
Create a link to the abc entry
43+
44+
[wrap]content[/wrap]
45+
46+
The contents of the package will be collapsed and need to be clicked to expand.
47+
48+
Export the built-in dictionary:
49+
50+
51+
```
52+
python export_builtin_dic.py
53+
```
54+
55+
The built-in dictionary is exported to django-mdict/export/, export.txt is the exported text, and data is the exported resource. Mathjax is not supported after export. The wrap script goldendict supports it, but mdict does not.

doc/doc_en/doc_anki.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
1. Install the computer version of anki, install the plug-in anki-connect (plug-in code: 2055492159), and restart anki.
2+
3+
anki-connect:[https://github.com/FooSoft/anki-connect](https://github.com/FooSoft/anki-connect)
4+
5+
2. Keep Anki running in the background. Check the button bar at the bottom of this page and the Add Card button will appear. Copy the content to the front and back of the card, then select the deck and click the Add Cards to button to create the card.
6+
7+
The front side of the card can only be pasted as plain text, and the back side of the card can be pasted as plain text or styled text.
8+
9+
Automatic copy: Automatically copy the prefix of the currently expanded entry to the front of the card without style, and copy the content of the currently expanded entry to the back of the card with style. There is unexpanded content in the entry when copying, and it cannot be expanded after copying. If the HTML structure is complex, copying will take a long time.
10+
11+
Manual copy: Manually select the content to copy. When pasting, ctrl+v is to paste with style, ctrl+shift+v is to paste as plain text, or right-click the mouse and select paste or paste as plain text, and then long press on the mobile phone to bring up the right-mouse button.
12+
13+
Copying with styles will lose some styles. And it can only display online images, and does not support the insertion of images and audio. Anki does not support the display of base64 images. It cannot be used in browsers that do not support ckeditor5 (cefpython cannot be used).
14+
15+
![图片](../img/img080901.png?raw=true)

doc/doc_en/doc_config.md

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
### Settings
2+
3+
Most of the following functions require the next query to take effect, that is, re-query and generate the page after being enabled.
4+
5+
* The enter key of the keyboard is bound to the query button, and the up and down arrow keys are bound to expand the previous term and expand the next term buttons. You can directly press the up and down keys or press ctrl+up and down keys. Pressing the up and down keys directly will trigger the browser's own For scrolling, it is more convenient to press the right ctrl + up and down keys with one hand on the full keyboard.
6+
7+
* Forced refresh: The background will cache the recently queried content. In order to display changes in query results during debugging, forced refresh needs to be enabled, and the next query will take effect.
8+
9+
* Jump to new tab page: By default, clicking the entry:// connection will query on the current page. After checking this option, a new tab page will be opened for query, and the next query will take effect.
10+
11+
* Force the use of full Song Dynasty: Forcibly change the fonts of all iframes to full Song Dynasty, which will take effect in the next query.
12+
13+
* Expand multiple dictionaries at the same time: By default, only one dictionary will be expanded. After it is turned on, multiple dictionaries are allowed to be expanded at the same time. However, the buttons to jump to the previous and next entries are invalid at this time, and the next query will take effect.
14+
15+
* Enable text selection menu: After enabling this function, after selecting text in the dictionary, a menu will pop up with three buttons: copy, query the selected word on the current page, open a new tab page to query the selected word, and the next query will take effect.
16+
17+
* Block default click: The click event of the entry is canceled and the next query will take effect.
18+
19+
* New tab page search: Select text on the full-text search page and single dictionary query page, click the new window query, if the new tab page is opened, the new window will open the query page for query, otherwise the full-text search or single dictionary query page will be opened Make a query and the next query will take effect.
20+
21+
* Accurate height calculation: Calculate the height of each element in the iframe to obtain the total height. The expansion speed will be slightly slower. The purpose is to solve the problem of incorrect height acquisition caused by absolute positioning in some dictionaries. The next query will take effect.
22+
23+
* Fixed height: Set the height of the iframe to be fixed. In order to solve the problem of abnormal display at custom heights such as phet.zim, the precise calculation of the height will be invalid after it is turned on, and it will take effect on the next query.
24+
25+
* Save as default value: If the value is not saved as default value, the settings will be restored to default after the page is refreshed.
26+
27+
* Convert text to Simplified Chinese and Convert text to Traditional Chinese buttons: Convert the content of the currently expanded entry into Traditional Chinese and Simplified Chinese. Known issues: Due to using direct replacement conversion, the results are inaccurate and have unconverted words.
28+
29+
* Night mode and day mode buttons: switch between night mode and original mode. Known issue: The M-W Visual Dictionary dictionary folding and expanding operation is invalid in night mode because it performs full matching judgment on class.
30+
31+
* Random query button: Randomly query an entry.
32+
33+
* Online dictionary: The online dictionary is added in the background admin. Change the word queried in the URL to %WORD%. There are two modes, open in an iframe or open in a new tab (some websites do not support display in an iframe).
34+
35+
### Configuration file
36+
37+
django-mdict/config.ini
38+
39+
#### [COMMON]
40+
41+
cache_num: Query prompt cache number
42+
43+
search_cache_num: The number of query (paging) caches
44+
45+
builtin_dic_enable: enable built-in dictionary
46+
47+
es_host: elasticsearch startup url (including port)
48+
49+
open_path_enable: Whether to allow opening the local dictionary folder (only local access is valid)
50+
51+
ws_server_port: The port number to enable ws_server under windows (default value 8766, 8765 is the default port of anki connect)
52+
53+
index_id: Select the home page (currently only 1 and 2)
54+
#### [SEARCH]
55+
56+
merge_entry_max_length: The default value is 1000. Entries with the same term are merged. When there are multiple query results in the same dictionary, entries with a length less than 1000 will be merged. If not merged at all, set to 0.
57+
58+
st_enable: Enable Traditional and Simplified conversion
59+
60+
chaizi_enable: Enable word splitting and reverse search
61+
62+
fh_char_enable: Enable full-width character conversion (convert full-width English to half-width English)
63+
64+
kana_enable: Enable kana conversion (hiragana and katakana conversion)
65+
66+
romaji_enable: Enable romaji kana conversion
67+
68+
force_refresh: Enable force refresh (when enabled, it will query again instead of reading from the cache)
69+
70+
select_btn_enable: Enable text selection menu (pop-up box after selecting text in the entry, only valid on PC)
71+
72+
disable_iframe_click: Block the default click event in iframe (turn off the automatic pronunciation of the dictionary and solve the problem of click accents, which will take effect on the next query)
73+
74+
history_enable: whether to save query history
75+
76+
suggestion_num: number of query suggestions
77+
78+
force_font: Force all entries to use Song Dynasty (effective for the next query)
79+
80+
card_show: Allows multiple entries to be expanded at the same time (effective for the next query)
81+
82+
default_group: default group
83+
84+
new_label_link: Open a new label page (when clicking the entry to jump, it will not jump to this page but will open a new tab page for query, and the next query will take effect)
85+
86+
compute_every_element: Calculate each element of the iframe to calculate the total height
87+
88+
fixed_height: All entries are displayed at a fixed height
89+
90+
copy_with_tag: include html tags and css styles when copying
91+
92+
magnifier_enable: Enable image magnifier
93+
94+
hide-bottom-bar: hide the bottom toolbar

0 commit comments

Comments
 (0)