mdbDir(5)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– mdbDir β€” bestie edition πŸ’–

okay so this is mdbDir(5), a page from The m17n Library manual, and it's literally just about one little file that tells the library where all its data lives. buckle up πŸŽ€


✨ NAME ✨

mdbDir β€” the list of data chillin' inside a database directory. that's it, that's the whole vibe πŸ’…


🌸 DESCRIPTION 🌸

so here's the tea, bestie πŸ«– β€” when the m17n library wakes up (aka at initialization time), it goes looking for a list of definitions of data from the m17n database, and it finds them in files named mdb.dir, one in each database directory. and the format of that file is plist, like this:

MDB-DIR ::= DEFINITION *

DEFINITION ::= '(' TAG0 [ TAG1 [ TAG2 [ TAG3 ] ] ] FILE [ VERSION ]')'

TAGn ::= SYMBOL

FILE ::= MTEXT

VERSION ::= MTEXT

that's the grammar, no cap. πŸ“–βœ¨


now for the spicy part πŸ”₯ β€” if TAG0 is neither charset nor char-table, and TAGn (where n > 0) is the symbol *, then FILE is allowed to contain a wildcard character, and every file that matches FILE β€” using the same rules the shell uses β€” becomes a target of the database files. πŸ‘‘

in that case, each one of those files must contain a SELF-DEFINITION, which is a plist element that hands over the actual TAGn values, in this form:

SELF-DEFINITION ::= '(' TAG0 TAG1 TAG2 TAG3 [ VERSION ] ')'

like, it introduces itself. main character energy honestly πŸ’…


okay let's make it real with an example, because this is where it gets cute πŸ¦‹

say a database directory has these files in it:

zh-py.mim:
(input-method zh py)

ko-han2.mim:
(input-method ko han2)

and then these lines live in mdb.dir:

(input-method zh py "zh-py.mim")
(input-method ko han2 "ko-han2.mim")

bestie. that whole thing can be shortened to this single line:

(input-method * "*.mim")

obsessed?? me too. 😭✨ that's the wildcard * doing its thing.


and now, VERSION πŸ’œ β€” it's the required version number of the m17n library, and its format is 'XX.YY.ZZ', where:

  • XX is the major version number
  • YY is the minor version number
  • ZZ is the patch level

so like 1.8.4, iykyk 🌈

lowkey important: VERSION is required β€” not optional, not a suggestion. respect the version number bestie πŸ™ˆ

  • Copyright (C) 2001 Information-technology Promotion Agency (IPA)
  • Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


and that's the whole page, babes πŸŽ€ this was Version 1.8.4, dated Mon Sep 25 2023 β€” mwah, iconic, periodt πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from