Creating/Converting mdict Files (.mdx) Using Python

To convert an mdx format medical dictionary into a Rime dictionary, I found a very useful tool

You can install it using pip and directly convert .mdx to .txt via the command line

pip install mdict-utils
mdict -x dict.mdx -d ./mdx

Afterwards, you can use rimetool’s singleword tool to convert it into a Rime dictionary

rimetool --input-path /Users/whitewatercn/Downloads/英汉汉英医学辞典/英汉汉英医学辞典/mdx/output_without_word.txt --tool singleword

The result has already been uploaded to rime_clinic
https://github.com/whitewatercn/rime_clinic/blob/master/en_clinic.dict.yaml