这是一个用来从 mdx 字典中抓取所需的单词,并生成 html,pdf 或 jpg 文件的小工具。
usage: MdxConverter.py [-h] [--type [{pdf,html,jpg}]] [--invalid {0,1,2}] mdx_name input_name [output_name]
positional arguments:
mdx_name
input_name
output_name
optional arguments:
-h, --help show this help message and exit
--type [{pdf,html,jpg}]
--invalid {0,1,2} action for meeting invalid words
0: exit immediately
1: output warnning message to pdf/html
2: collect them to invalid_words.txt (default)
例如:
MdxConverter 某某词典.mdx input.xlsx output.pdf
#Lesson 1
hello
world
#Lesson 2
python
is
awesome
[
{
"name": "Lesson 1",
"words": [
"hello",
"world"
]
},
{
"name": "Lesson 2",
"words": [
"python",
"is",
"awesome"
]
}
]
略