ADPLUGDB(1)

Okay bestie, let's talk about adplugdb ๐Ÿ’– It's a User Command (manual section 1), and it's lowkey the most organised tool for keeping your AdPlug records in check โœจ


โœจ NAME โœจ

adplugdb - AdPlug database maintenance utility ๐ŸŽ€

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

adplugdb [OPTION]... COMMAND [ARGUMENT]...

๐Ÿ’… DESCRIPTION ๐Ÿ’…

Okay so adplugdb maintains database files in AdPlug database format ๐Ÿ’œ It can add, list and remove records inside a central database, or merge a whole set of databases together into one single database ๐Ÿ”ฅ

It always works on a central database file โœจ To find it, it first checks whether you have a home directory. If you do, the file lives at ~/.adplug/adplug.db ๐ŸŒธ If you don't have a home directory, it looks for a file called adplug.db in the current working directory instead ๐Ÿงš

Want a system-wide one? Use -s ๐Ÿ‘‘ That file is at /usr/com/adplug/adplug.db and it's superuser-only, no cap ๐Ÿ˜ญ You can also point it at any file with -d ๐Ÿฆ‹

Only one database file can be manipulated at a time, so pick your favourite and stick with it ๐Ÿ’€

๐ŸŒˆ EXIT STATUS ๐ŸŒˆ

If everything goes smoothly, adplugdb gives you a successful exit status, which is 0 on most systems ๐Ÿซถ Otherwise you get an unsuccessful exit status, which is 1 on most systems ๐Ÿ’€

๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

Commands control the main operation mode of adplugdb ๐Ÿ’– They can take a bunch of arguments, but only one command can be specified at a time, periodt ๐Ÿ’…

  • add โ€” This one takes a list of filenames separated by spaces ๐Ÿ“ Each file gets examined, and a record is added to the database if AdPlug supports the file โœจ By default the record is type Plain, unless you use -t (more on that below) ๐ŸŽ€ The default comment is the filename itself ๐Ÿ’ฌ If a record for that file is already in the database, the new one replaces it ๐ŸŒธ
  • list โ€” This takes an optional list of filenames or keys, separated by spaces โœจ Each file gets examined, and its record is looked up in the database and displayed on stdout in a human-readable form ๐Ÿ‘€ No arguments? Then every record in the database gets shown ๐Ÿงš
  • remove โ€” This takes a list of filenames or keys, separated by spaces ๐Ÿ’€ Each file gets examined, and the matching record is removed from the database ๐Ÿซก
  • merge โ€” This takes a list of database filenames, separated by spaces ๐Ÿฆ‹ Each database file gets loaded, and its contents get merged and written to the central database file ๐Ÿซถ They're processed in the order you specify them on the commandline ๐Ÿ”ฅ Records from databases specified earlier take precedence over records from databases specified later ๐Ÿ‘‘ Records from the central database take precedence over everything else ๐Ÿ’– So only additional records from the other databases get added to the central database ๐ŸŒˆ If a record isn't already in the central database, the version from the earliest specified database that contains it is taken โœจ Records are never overwritten in the central database, no exceptions ๐Ÿ˜ค

๐Ÿ’œ OPTIONS ๐Ÿ’œ

The order of the option commandline parameters doesn't matter, so vibe however you want ๐Ÿซถ

๐Ÿ“ Database options ๐Ÿ“

  • -d <file> โ€” Specify any arbitrary file to use as the central database ๐Ÿงš
  • -s โ€” Use the system-wide database file as the central database ๐Ÿ‘‘ This option is only present if adplugdb was compiled with system-wide database file support ๐Ÿ’€
  • -t <type> โ€” Set the record type used for all newly added records ๐ŸŽ€ Each record needs a special type to be useful to AdPlug's players โœจ The commandline help, shown with -h, lists the types you can specify ๐Ÿ’…
  • -c โ€” Prompt for record comment ๐Ÿ’ฌ If you give this option, you'll be asked for the comment of each newly added record ๐ŸŒธ
  • -k โ€” Specify keys instead of filenames ๐Ÿ”‘ With this on, every command argument that would normally be a filename is treated as a record key instead ๐Ÿฆ‹ Each record has a unique identifying key generated from the file's contents โœจ To manipulate a record, you either need the exact same file and specify its name, or you specify the record's key using this option ๐Ÿ’– Keys are written the same way list displays them: a CRC16:CRC32 value in hexadecimal format ๐Ÿงฎ

๐ŸŒธ Generic options ๐ŸŒธ

  • -q, --quiet โ€” Be more quiet ๐Ÿคซ
  • -v, --verbose โ€” Be more verbose ๐Ÿ“ข
  • -h, --help โ€” Show a summary of commandline commands, arguments and options ๐Ÿ“–
  • -V, --version โ€” Show version and author information for the program ๐Ÿท๏ธ

๐Ÿซถ AUTHOR ๐Ÿซถ

Simon Peter <dn.tlp@gmx.net> ๐Ÿ’œ


That's the tea, bestie ๐Ÿซถ This page belongs to the AdPlug database maintenance crew and was last updated March 4, 2006 ๐ŸŒธ Stay iconic and keep your records organised ๐Ÿ’– ADPLUGDB(1) forever ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from