Extract the HTML source from the MDX

Hi all .
please, I am a beginner, teach me how to extract the HTML source from the MDX . If you attach the explanation with pictures or with examples, it will be easier for me .
thank you so much.

1 个赞

Unpack MDX
mdict -x dict.mdx -d ./mdx
Unpack MDD
mdict -x dict.mdd -d ./mdd

Pack MDX
mdict --title title.html --description description.html -a dict.txt dict.mdx
Pack MDD
mdict --title title.html --description description.html -a mdd_dir dict.mdd

1 个赞

ok thank you so much . but where I will put this code ?
I mean what is the tools ?
Plz explain to me more

If you are on Windows:
(A) 1. Download and install Python https://www.python.org/
2. Then open your Command Prompt (cmd.exe) and type “pip install mdict-utils”
image
3. In the Command Prompt, you Then change the directory to the path (cd PATH) in which your MDX file is stored and type “ mdict -x dict.mdx -d ./mdx” (note: dict.mdx is the mdx file of your mdx, for example: if your mdx file is “Oxforddictionary.mdx”, then change “dict.mdx” to “Oxforddictionary.mdx”.). And you will see the txt file and you are done!
(B) 1. Download and extract this file (https://github.com/liuyug/mdict-utils/releases/download/v1.0.9.0/mdict-windows.7z and you will see a file which is Mdict.exe, then copy it to the path in which your mdx file is stored. (Note: You can use this program [https://www.7-zip.org/] to extract that file.)
2. In the path in which your mdx file is stored, you click on path bar and replace it with “cmd” and press enter, then you will see the Command Prompt.


3. In the Command Prompt, you type “ mdict -x dict.mdx -d ./mdx” (note: dict.mdx is the mdx file of your mdx, for example: if your mdx file is “Oxforddictionary.mdx”, then change “dict.mdx” to “Oxforddictionary.mdx”.). And you will see the txt file and you are done!
If you are on Mac:
1.Download and install Python (https://www.python.org/downloads/release/python-3101/

2.open your terminal and type “pip install mdict-utils”

  1. In the terminal, you Then change the directory to the path (cd PATH) in which your MDX file is stored and type “ mdict -x dict.mdx -d ./mdx” (note: dict.mdx is the mdx file of your mdx, for example: if your mdx file is “Oxforddictionary.mdx”, then change “dict.mdx” to “Oxforddictionary.mdx”.). And you will see the txt file and you are done!

If you are on Linux:

  1. Have python [note: some linux distribution already have preinstalled Python such as, Ubuntu,… but some don’t such as Alpine … (for Alpine Linux, you can install it by “apk add python” or “apk add python3” ]

2.open your terminal and (for Ubuntu) type “ sudo apt install python3-pip” or “ sudo apt-get install python3-pip” then enter your root password! (For other distribution can vary)


3. In the terminal, you type “ pip install mdict-utils” or “ pip3 install mdict-utils”
4. In the terminal, Then you change the directory to the path (cd PATH) in which your MDX file is stored and type “ mdict -x dict.mdx -d ./mdx” (note: dict.mdx is the mdx file of your mdx, for example: if your mdx file is “Oxforddictionary.mdx”, then change “dict.mdx” to “Oxforddictionary.mdx”.). And you will see the txt file and you are done!

3 个赞

You are really great, thank you, I will apply the explanation, and if I encounter a problem, I will ask you, ok ?
you make me so happy :blush:

1 个赞

plz have u any vedio explain that ?

I understood everything until I got here (change the directory to the path (cd PATH) ) …
Please explain to me only this point.
Forgive me, I’m a newbie…
thank you so mutch