Skip to content

mkd documentation

Read, search and create Monokakido dictionaries with Python or C++.

Installation

Python library

Install mkd-tools from PyPI into your Python environment:

python -m pip install mkd-tools

Import the library as mkd:

import mkd

For a complete creation example, see Birb dictionaries. It includes a general dictionary, a kanwa dictionary and a field guide, with article XML, stylesheets and media.

CLI

On macOS, install the CLI with Homebrew:

brew install kiwakiwaa/tap/mkd-tools

For the C++ library or a local build, see Build from source.

CLI usage

List products, inspect metadata and export resources from the terminal.

mkd-tools list
mkd-tools info DAIJISEN2
mkd-tools export DAIJISEN2

On macOS, installed dictionaries are found automatically. Elsewhere, provide the directory containing product folders:

mkd-tools -d /path/to/dictionaries list
mkd-tools -d /path/to/dictionaries export DAIJISEN2

Exports go to ./mkd-export/<product-id> by default. Use -o to select an output directory.

mkd-tools export DAIJISEN2 -o ./output
mkd-tools export DAIJISEN2 --only entries --pretty
mkd-tools export DAIJISEN2 --only graphics --only audio
mkd-tools export DAIJISEN2 --only keystores --keystore-mode both

--only accepts entries, graphics, audio, fonts, headlines, keystores and appendix-entries. --pretty formats XML. Use mkd-tools --help or mkd-tools export --help for all options.

For custom products, see installation and replacement.

Library guides

Start with products, dictionaries and articles, then read a dictionary, search or create your first dictionary.