readmdict 

Read mdx/mdd files (repacking of readmdict from mdict-analysis)
This is a repacking of readmdict.py in https://github.com/csarron/mdict-analysis. All credit goes to the original author(s).
Prerequisite python-lzo
If python-lzo is not present, you' ll see "LZO compression support is not available" when running readmdict.
pip install python-lzo
# or poetry add python-lzo
In Windows without a functioning C++ environment, you won't be able to install python-lzo via pip. Head to
https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-lzo. Download and install python-lzo whl for your python version.
Installation
pip install readmdict
# or poetry add readmdict
Usage
Command line
- Browse a mdx or mdd file and print its meta information
readmdict
or
python -m readmdict
- Print meta info of a file
file.mdx
readmdict file.mdx
or
python -m readmdict file.mdx
- Print a short summary
readmdict -h
or
python -m readmdict -h
In Python code
from readmdict import MDX, MDD
filename = "some.mdx"
headwords = [*MDX(filename).header]
print(headwords[:10]) # fisrt 10 in bytes format
for hdw in headwords[:10]:
print(hdw.decode()) # fisrt 10 in string format
items = [*MDX(filename).items()]
for key, val in items[:10]:
print(key.decode(), val.decode()) # first 10 entries
# read an mdd file
filename = "some.mdd"
items = MDD(filename).items()
idx = 0
for filename, content in items:
idx += 1
if idx > 10:
break
print(filename.decode(), content.decode()) # first 10 entries
Metadata
Release files for readmdict 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| readmdict-0.1.1.tar.gz | 15.9 kB | Without provenance | Details for readmdict-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| readmdict-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for readmdict-0.1.1-py3-none-any.whl |
Total release size: 32.7 kB
Release files / readmdict-0.1.1.tar.gz
| Download URL | readmdict-0.1.1.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45556f5ce476b673cdf9a6f9024ed81cb6e01aaec013912cedc149aa3bd3beb6
|
|
BLAKE2b-256 checksum How to use checksums |
da93433a3a990fa7c2e671da92b653b0e65c4e98b54096219250cf19a9683365
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.7.9 Windows/10
|
Release files / readmdict-0.1.1-py3-none-any.whl
| Download URL | readmdict-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ac590f68489dfbec843a83a6c392fb0388f19fda2ce9ed83c8be8a7cf2f55e8
|
|
BLAKE2b-256 checksum How to use checksums |
e2ff6396b5a0aa754a5eafeaae1d50d4e718dfffffa4d285a1a9580f482b3d5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.7.9 Windows/10
|
Security for readmdict 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.