1ADPLUGDB(1) User Commands ADPLUGDB(1)
2
3
4
6 adplugdb - AdPlug database maintenance utility
7
9 adplugdb [OPTION]... COMMAND [ARGUMENT]...
10
12 adplugdb maintains database files in AdPlug database format. It can
13 add, list and remove records within a central database, or merge a set
14 of databases together into one single database.
15
16 adplugdb always operates on a central database file. The location of
17 this database file is determined by first checking if the user has a
18 home directory. If a home directory is present, the database file will
19 be located in ~/.adplug/adplug.db. If a home directory is not present,
20 a database file adplug.db will be looked for in the current working
21 directory.
22
23 A system-wide database file can be used instead, by specifying the -s
24 commandline option. The system-wide database file is located in
25 /var/lib/adplug/adplug.db and may only be manipulated as the superuser.
26 An arbitrary database file might be used as well, by specifying the -d
27 commandline parameter. Only one database file may be manipulated at a
28 time.
29
31 adplugdb returns with a successful exit status (0 on most systems) on
32 successful operation. An unsuccessful exit status (1 on most systems)
33 is returned otherwise.
34
36 Commands control the main operation mode of adplugdb. Commands can have
37 a number of arguments. Only one command may be specified at a time.
38
39 add This command takes a list of filenames, separated by spaces, as
40 arguments. Each file is examined and a record is added to the
41 database if the file is supported by AdPlug. By default, the
42 record will be of type Plain, unless the -t commandline option
43 is specified (see below). The default comment entry is the spec‐
44 ified filename. If a record for a file is already in the data‐
45 base, it will be replaced by the new record.
46
47 list This command takes an optional list of filenames or keys, sepa‐
48 rated by spaces, as arguments. Each file is examined and the
49 corresponding record is looked up from the database and dis‐
50 played on stdout, in a human-readable form. If no arguments are
51 given, all records from the database are displayed.
52
53 remove This command takes a list of filenames or keys, separated by
54 spaces, as arguments. Each file is examined and the correspond‐
55 ing record is removed from the database.
56
57 merge This command takes a list of database filenames, separated by
58 spaces, as arguments. Each database file is loaded and the con‐
59 tents are merged and written to the central database file. The
60 database files are processed in the order they are specified on
61 the commandline. Records from databases that were specified ear‐
62 lier take precedence over records from databases that were spec‐
63 ified later. Records from the central database take precedence
64 over all other records. This means that only additional records
65 from the other databases will be added to the central database
66 and if a record is found that is not already in the central
67 database, the version from the earliest specified database that
68 contains this record will be taken. In no way will records ever
69 be overwritten in the central database.
70
72 The order of the option commandline parameters is not important.
73
74 Database options:
75 -d <file>
76 Specify an arbitrary file to use as the central database.
77
78 -s Use the system-wide database file as the central database. This
79 option is only present if adplugdb was compiled with system-wide
80 database file support.
81
82 -t <type>
83 Specify a record type to be used as the type for all newly added
84 records. Each record needs a special type to be useful to
85 AdPlug's players. The commandline help, displayed using the -h
86 commandline option, presents a list of types that may be speci‐
87 fied.
88
89 -c Prompt for record comment. If this option is given, the user
90 will be prompted and asked for each newly added record's com‐
91 ment.
92
93 -k Specify keys instead of filenames. If this option is given, all
94 command arguments that normally are filenames are expected to be
95 record keys instead. Each record in the database has a unique
96 identifying key, generated from the corresponding file's con‐
97 tents. To manipulate a record entry, you either must have the
98 exact same file and specify its name, or you specify the
99 record's key, using this option. Keys are specified the same way
100 they are displayed using the list command, as CRC16:CRC32 value
101 in hexadecimal format.
102
103 Generic options:
104 -q, --quiet
105 Be more quiet.
106
107 -v, --verbose
108 Be more verbose.
109
110 -h, --help
111 Show summary of commandline commands, arguments and options.
112
113 -V, --version
114 Show version and author information of the program.
115
117 Simon Peter <dn.tlp@gmx.net>
118
119
120
121AdPlug database maintenance utilitMyar2c.h2.41, 2006 ADPLUGDB(1)