https://github.com/liuyug/mdict-utils
MDict pack/unpack/list/info tool
https://github.com/liuyug/mdict-utils
mdict pack unpack
Last synced: 2 months ago
JSON representation
MDict pack/unpack/list/info tool
- Host: GitHub
- URL: https://github.com/liuyug/mdict-utils
- Owner: liuyug
- License: mit
- Created: 2019-03-27T01:53:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-02T06:02:59.000Z (over 1 year ago)
- Last Synced: 2025-10-30T00:25:08.809Z (8 months ago)
- Topics: mdict, pack, unpack
- Language: Python
- Size: 342 KB
- Stars: 378
- Watchers: 5
- Forks: 67
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==========
MDict Tool
==========
MDict pack/unpack tool
.. NOTE::
Support Reading with MDict Version 3.0
Support Reading and Writing with MDict Version 2.0
All files must be UTF-8 encoding, include HTML and TXT
Install
=======
::
pip install mdict-utils
Usage
=====
Meta information::
mdict -m dict.mdx
All key list::
mdict -k dict.mdx
Query key::
mdict -q dict.mdx
.. note::
只用于测试词典打包是否正确。
Unpack
------
Unpack MDX::
mdict -x dict.mdx -d ./mdx
Unpack MDX/MDD and split into 5 files::
mdict -x dict.mdx -d ./mdx --split-n 5
Unpack MDX/MDD and split into a...z files::
mdict -x dict.mdx -d ./mdx --split-az
Unpack MDD::
mdict -x dict.mdd -d ./mdd
Unpack MDX/MDD to sqlite3 DB::
mdict -x dict.mdx --exdb
mdict -x dict.mdd --exdb
Unpack MDX/MDD to sqlite3 DB with zip compress::
mdict -x dict.mdx --exdb-zip
Pack
----
Pack MDX::
mdict --title title.html --description description.html -a dict.txt dict.mdx
Pack MDX with many TXT files::
mdict --title title.html --description description.html -a dict.part1.txt -a dict.part2.txt dict.mdx
or::
mdict --title title.html --description description.html -a txt_dir dict.mdx
Pack MDD::
mdict --title title.html --description description.html -a mdd_dir dict.mdd
Other
-----
Convert TXT to sqlite3 DB::
mdict --txt-db dict.txt
Convert sqlite3 DB to TXT::
mdict --db-txt dict.db
Reference
=========
+ https://bitbucket.org/xwang/mdict-analysis
+ https://github.com/zhansliu/writemdict
Donate 捐赠
=============
请捐赠者在 issue 里留下捐赠信息,如交易流水号等,否则无法在支付系统里查找。再次感谢。
.. image:: alipay_pay.jpg
:width: 45%
.. image:: wx_pay.png
:width: 45%