Documentation
¶
Overview ¶
MDict dictionary self-contained HTTP server.
A single binary serves the search page, handles ?q / ?path / ?max queries, and serves .mdd resources extracted on demand into assetRoot.
Configuration priority (highest → lowest):
CLI flag > environment variable > config.toml > built-in default
Config file search order:
--config / CONFIG_PATH → <exe-dir>/config.toml → ~/.mdict/config.toml → /etc/mdict/config.toml → ./config.toml
Param CLI flag Env var TOML key Default ───────────────────────────────────────────────────────────────────────────────────── dict dir --dict-dir DICT_DIR DICT_DIR ~/Dictionaries asset dir --asset-dir MDICT_TEMP_ASSETS_DIR MDICT_TEMP_ASSETS_DIR ~/.mdict/res default dict --default-dict DEFAULT_DICT DEFAULT_DICT (none, rel. to dict-dir) server IP --ip SERVER_IP SERVER_IP 127.0.0.1 server port --port SERVER_PORT SERVER_PORT 8808 speexdec path --speexdec SPEEXDEC SPEEXDEC /usr/bin/speexdec no browser --no-browser NO_BROWSER=1 NO_BROWSER=1 (open browser) config file --config CONFIG_PATH — (auto-detect)
Package main: mdict-go-web dictionary server
reader.go exact/prefix/accent-fold lookup with @@@LINK following, HTML definition fix-ups (internal links, audio, sound://, file://, server-absolute refs, spx->wav), stylesheet substitution, and CSS-transitive extraction of .mdd resources into ASSET_ROOT. The raw MDict v1/v2/v3 block parsing is delegated to the vendored go-mdict package.