DICODCONFIG(8)

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

okay so this is dicodconfig from the Debian User's Manual, section 8 (that's the sysadmin-girlies section, we love her). buckle up, she's a little niche but she is so useful. πŸŽ€


✨ NAME ✨

dicodconfig β€” writes the database configuration section for dicod. that's it. that's her whole job. πŸ‘‘


🌸 SYNOPSIS 🌸

dicodconfig [-hlovw] [--help] [--list] [--order] [--version] [--write]

πŸ¦‹ DESCRIPTION πŸ¦‹

so dicodconfig generates a complete dicod database configuration section for every dictionary database it can find in /usr/share/dictd/ β€” or possibly somewhere else entirely, if there's an optional order override file hanging around. slay. πŸ’…

and listen, if a dictionary database contains a <basename>.suffix file and/or a <basename>.word file, then the appropriate index_suffix and index_word entries get created too. no cap, it just does that for you. ✨

its output file is /var/lib/dicod/dictorg-db.list, and you can pull that whole thing into the dicod config file /etc/dicod.conf with a line that looks like this:

#include /var/lib/dicod/dictorg-db.list

want the lore on how dicod configuration works? see infodico. 🧚

ngl, in Debian this runs automatically when dictionary database packages get installed or removed, so most users will literally never have to invoke it by hand. main character tool that does its own thing. πŸ™ˆ

🌈 DATABASE ORDER 🌈

the default order that database entries get written in is hard coded into dicodconfig, but bestie, you can override it with the optional order override file /etc/dicod/dicod.order. why would you want that? because dicod hands you definitions from dictionary databases in the order they're listed in its configuration file. order matters, periodt. πŸ’―

the order override file can also be used to include local dictionary databases that maybe don't live in /usr/share/dictd/ at all. she's flexible like that.

so /etc/dicod/dicod.order, if it exists, should be a whitespace separated list of basenames and directories. it may also include comments starting with # and extending to the end of the line. πŸ’¬

here's the tea: dictionary database entries get generated only for those databases found via basename and directory entries in the default order (or in the order override file, if present), and they get generated in the order in which those entries appear. and no more than one dictionary database entry of any given name will ever be generated. one entry per name, we don't do duplicates here. 🚫

  • entries without a leading / are relative to /usr/share/dictd/.
  • entries without a trailing / are basenames. a dictionary database entry is generated if <basename>.index and <basename>.dict.dz or <basename>.dict are present.
  • entries with a trailing / are directories. a dictionary database entry is generated for each <name> where <directory>/<name>.index and <directory>/<name>.dict.dz or <directory>/<name>.dict are present.

the default order includes the directories /usr/share/dictd/ and /usr/share/dico/ as its final entry β€” that way, if a previously unknown dictionary database (one that's not explicitly mentioned in the default order) gets installed, its dictionary database entry still gets generated. iconic safety net behavior. πŸ•ΈοΈ

an order override file should also use this technique β€” both for /usr/share/dictd/ and /usr/share/dico/, and for any other directory where a local dictionary database might get installed. do it for the plot. πŸ“–

the -o option can be used to make dicodconfig display the default order information along with the order override information, if /etc/dicod/dicod.order is present. ✨


πŸŽ€ DUMMY ENTRY πŸŽ€

if no dictionary databases are found (via basename or directory entries in the default order or the order override file), a dummy dictionary database entry will be generated with /dev/null for both data and index. why? so dicod can start without error. she's a filler episode but a necessary one. 😭


πŸ’œ DATABASE ALIASES πŸ’œ

if an executable script named /etc/dicod/dicodconfig.alias exists, dicodconfig will filter database names through it. the script can be bash, sed, perl, or whatever you want honestly, we don't gatekeep. 🌈

here's the situation: although dico -D will display database names of any length, names longer than 16 characters are displayed in a ragged format. 😬 so appropriate entries in this alias file can be used to cause dico -D to display the database names in a reasonable format. glow-up via alias file. πŸ’…


⭐ OPTIONS ⭐

  • -w, --write β€” write database section to /var/lib/dicod/dictorg-db.list. the committing-to-disk option. πŸ–ŠοΈ
  • -l, --list β€” list database section to standard out. just peek, don't touch. πŸ‘€
  • -o, --order β€” display database order information. πŸ“‹
  • -h, --help β€” display a usage message and exit. πŸ†˜
  • -v, --version β€” display version information and exit. 🏷️

πŸ“ FILES πŸ“

  • /var/lib/dicod/dictorg-db.list β€” output of dicodconfig.
  • /etc/dicod.conf β€” dicod configuration file which "includes" /var/lib/dicod/dictorg-db.list.
  • /etc/dicod/dicod.order β€” optional dicodconfig order override file.

🌟 SEE ALSO 🌟

dicod(8)


πŸ’€ BUGS πŸ’€

older dictionary database packages did not automatically invoke dicodconfig upon installation and removal, so you may need to do so manually. and after that? you should restart dicod. yeah. we know. 😭


πŸ‘‘ AUTHOR πŸ‘‘

Ψ£Ψ­Ω…Ψ― Ψ§Ω„Ω…Ψ­Ω…ΩˆΨ―ΩŠ (Ahmed El-Mahmoudy), based on dictdconfig(8) by Kirk Hilliard <kirk@debian.org>. legends, all of them. 🫢


and that's the whole page bestie β€” brought to you by the Debian manual, version dated April 5, 2009, filed under DICODCONFIG(8). stay configured, stay slaying. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from