Documentation
¶
Overview ¶
Command dictshelf is DictShelf's entry point - the only one.
Go names an installed binary after the last element of its package path, so the module path github.com/DMSHLabs/DictShelf makes
go install github.com/DMSHLabs/DictShelf@latest
yield the built name directly, with no second shim package (D28). Everything the program actually does lives in internal/cli.
Directories
¶
| Path | Synopsis |
|---|---|
|
android
|
|
|
nativebridge
command
|
|
|
internal
|
|
|
artmark
Package artmark is the markup contract for articles DictShelf writes itself.
|
Package artmark is the markup contract for articles DictShelf writes itself. |
|
cli
dictshelf CLI - Phase 1 surface: inspect and query dictionaries via the direct backends.
|
dictshelf CLI - Phase 1 surface: inspect and query dictionaries via the direct backends. |
|
config
Package config implements wudict's configuration with the layering borrowed from mdict-go-web: CLI flag > environment variable > wudict.toml > built-in default.
|
Package config implements wudict's configuration with the layering borrowed from mdict-go-web: CLI flag > environment variable > wudict.toml > built-in default. |
|
dict
Package dict defines the format-agnostic core of wudict: the Dictionary interface every backend (direct native readers, ingested SQLite) implements, plus the ingest-side Reader contract shared by all format packages.
|
Package dict defines the format-agnostic core of wudict: the Dictionary interface every backend (direct native readers, ingested SQLite) implements, plus the ingest-side Reader contract shared by all format packages. |
|
estimate
Package estimate predicts what an index will cost before it is built.
|
Package estimate predicts what an index will cost before it is built. |
|
facet
Package facet derives the handful of GROUPS a dictionary belongs to, from what is already known about it: its declared language, its file and folder names, and its own title.
|
Package facet derives the handful of GROUPS a dictionary belongs to, from what is already known about it: its declared language, its file and folder names, and its own title. |
|
favorites
Package favorites stores saved articles in the same SQLite databases used to search and serve them.
|
Package favorites stores saved articles in the same SQLite databases used to search and serve them. |
|
format/bgl
Package bgl is the direct backend for Babylon BGL dictionaries.
|
Package bgl is the direct backend for Babylon BGL dictionaries. |
|
format/lsd
Package lsd contains the reader for compiled Lingvo LSD dictionaries.
|
Package lsd contains the reader for compiled Lingvo LSD dictionaries. |
|
format/mdx
Package mdx is the direct backend for Octopus MDict dictionaries: one .mdx plus its companion .mdd resource files (NAME.mdd, NAME.1.mdd, …).
|
Package mdx is the direct backend for Octopus MDict dictionaries: one .mdx plus its companion .mdd resource files (NAME.mdd, NAME.1.mdd, …). |
|
format/slob
Package slob implements the Aard2 .slob container (direct backend + ingest reader).
|
Package slob implements the Aard2 .slob container (direct backend + ingest reader). |
|
format/stardict
Package stardict is the direct backend + ingest reader for StarDict dictionaries: NAME.ifo (metadata), NAME.idx[.gz|.dz] (sorted headword index), NAME.dict[.dz] (article data), optional NAME.syn (synonyms) and res/ dir or res.zip (resources).
|
Package stardict is the direct backend + ingest reader for StarDict dictionaries: NAME.ifo (metadata), NAME.idx[.gz|.dz] (sorted headword index), NAME.dict[.dz] (article data), optional NAME.syn (synonyms) and res/ dir or res.zip (resources). |
|
format/wmd
Package wmd reads WuWeiDict markdown (docs/WUDICT-MARKDOWN.md): standard CommonMark with GFM tables, one dictionary per `<name>.wudict.md`, a plain `<name>.md` whose line 2 is the `wudict` field, or either one gzip- or dictzip-compressed.
|
Package wmd reads WuWeiDict markdown (docs/WUDICT-MARKDOWN.md): standard CommonMark with GFM tables, one dictionary per `<name>.wudict.md`, a plain `<name>.md` whose line 2 is the `wudict` field, or either one gzip- or dictzip-compressed. |
|
format/zim
Package zim implements the openZIM container (direct backend + ingest reader) - the format behind offline Wiktionary, Wikipedia and devdocs dumps.
|
Package zim implements the openZIM container (direct backend + ingest reader) - the format behind offline Wiktionary, Wikipedia and devdocs dumps. |
|
format/zim/glass
Package glass reads the Xapian "glass" database that Kiwix archives carry as their full-text index (the X/fulltext/xapian entry, stored uncompressed), so a dictionary can be searched without building an index of our own.
|
Package glass reads the Xapian "glass" database that Kiwix archives carry as their full-text index (the X/fulltext/xapian entry, stored uncompressed), so a dictionary can be searched without building an index of our own. |
|
fsx
Package fsx is the file handling every package shares: reading a file a user may have edited by hand without trusting its size or its kind, and replacing a file so that a crash leaves the old one or the new one, never a truncated one.
|
Package fsx is the file handling every package shares: reading a file a user may have edited by hand without trusting its size or its kind, and replacing a file so that a crash leaves the old one or the new one, never a truncated one. |
|
ftsq
Package ftsq turns what the user typed into one query, lowered two ways.
|
Package ftsq turns what the user typed into one query, lowered two ways. |
|
hilite
Package hilite marks the spans a full-text query matched inside an article's HTML.
|
Package hilite marks the spans a full-text query matched inside an article's HTML. |
|
howto
Package howto is the wudict howto: the app's own guide, written as a wudict markdown dictionary (docs/WUDICT-MARKDOWN.md) and built into the binary.
|
Package howto is the wudict howto: the app's own guide, written as a wudict markdown dictionary (docs/WUDICT-MARKDOWN.md) and built into the binary. |
|
htmlref
Package htmlref locates the resource references inside one dictionary article and rewrites them, using the browser's own HTML tokenizer.
|
Package htmlref locates the resource references inside one dictionary article and rewrites them, using the browser's own HTML tokenizer. |
|
indexconst
Package indexconst holds shared sizes and intervals for prepared indexes and their views.
|
Package indexconst holds shared sizes and intervals for prepared indexes and their views. |
|
intake
Package intake turns arbitrary bytes into candidate dictionaries.
|
Package intake turns arbitrary bytes into candidate dictionaries. |
|
lang
Package lang resolves the language a dictionary is indexed in, so the search path knows which lemmatizer (if any) may speak for it.
|
Package lang resolves the language a dictionary is indexed in, so the search path knows which lemmatizer (if any) may speak for it. |
|
lemmas
Package lemmas installs the lemma data internal/morph reads (D88).
|
Package lemmas installs the lemma data internal/morph reads (D88). |
|
limits
Package limits holds the bounds on how much a dictionary file or an import may make wudict allocate or write: the guards against a corrupt or hostile file whose size field, compressed block or archive entry claims more than any real dictionary needs.
|
Package limits holds the bounds on how much a dictionary file or an import may make wudict allocate or write: the guards against a corrupt or hostile file whose size field, compressed block or archive entry claims more than any real dictionary needs. |
|
logx
Package logx is the app-wide message channel.
|
Package logx is the app-wide message channel. |
|
mdictwrite
Package mdictwrite writes unencrypted MDict 2.0 MDX and MDD containers.
|
Package mdictwrite writes unencrypted MDict 2.0 MDX and MDD containers. |
|
morph
Package morph turns an inflected word into its dictionary form (O3).
|
Package morph turns an inflected word into its dictionary form (O3). |
|
resource
Package resource matches the file name an article asks for against the names a container actually stores.
|
Package resource matches the file name an article asks for against the names a container actually stores. |
|
search
Package search fans one query out over many dictionaries concurrently (draego's "all" mode, minus its sequential per-request DB opens - FTS-audit #6: dictionaries stay open, queries run in parallel).
|
Package search fans one query out over many dictionaries concurrently (draego's "all" mode, minus its sequential per-request DB opens - FTS-audit #6: dictionaries stay open, queries run in parallel). |
|
speex
Package speex decodes Ogg-Speex (.spx) audio to 16-bit WAV (mono, or intensity stereo expanded to two channels) entirely in-process.
|
Package speex decodes Ogg-Speex (.spx) audio to 16-bit WAV (mono, or intensity stereo expanded to two channels) entirely in-process. |
|
speex/clib
Package clib is a thin cgo wrapper over a vendored decode-only subset of libspeex (BSD-3, see LICENSE.speex).
|
Package clib is a thin cgo wrapper over a vendored decode-only subset of libspeex (BSD-3, see LICENSE.speex). |
|
store
Package store is the ingested backend: the wudict canonical SQLite format (docs/SPEC.md §2).
|
Package store is the ingested backend: the wudict canonical SQLite format (docs/SPEC.md §2). |
|
store/goldentest
Package goldentest pins what a format's Reader, fed through IngestPlan, writes into a prepared text.db.
|
Package goldentest pins what a format's Reader, fed through IngestPlan, writes into a prepared text.db. |
|
sysmem
Package sysmem reads how much memory the machine has and has free, and keeps the budget preparing dictionaries may use (D182).
|
Package sysmem reads how much memory the machine has and has free, and keeps the budget preparing dictionaries may use (D182). |
|
tray
Package tray puts an optional system-tray icon around a running server.
|
Package tray puts an optional system-tray icon around a running server. |
|
watchdog
Package watchdog reports a loop that is ours when it stops moving.
|
Package watchdog reports a loop that is ours when it stops moving. |
|
wildcard
Package wildcard reads and matches wildcard queries (D167): `?` is exactly one character, `*` any run of characters including none, and a pattern covers the whole headword.
|
Package wildcard reads and matches wildcard queries (D167): `?` is exactly one character, `*` any run of characters including none, and a pattern covers the whole headword. |
|
tools
|
|
|
lemmafiles
command
Command lemmafiles builds the lemma catalogue `wudict lemmas` installs from (D87, D88).
|
Command lemmafiles builds the lemma catalogue `wudict lemmas` installs from (D87, D88). |
|
xapian-glass-check
command
Temporary diagnostic: read Kiwix's own full-text index (X/fulltext/xapian) from a ZIM archive with internal/format/zim/glass, and check what it says against the archive itself.
|
Temporary diagnostic: read Kiwix's own full-text index (X/fulltext/xapian) from a ZIM archive with internal/format/zim/glass, and check what it says against the archive itself. |
Click to show internal directories.
Click to hide internal directories.