2 SF: afs.c aft.c attribute.c
3 SN: list of afs commands
7 P: AFS_READ | AFS_WRITE
8 D: Add or update audio files.
9 U: add [-a] [-l] [-f] [-v] path...
10 H: Each path must be absolute and refer to either an audio file, or a
11 H: directory. In case of a directory, all audio files in that directory
12 H: are added recursively. Only absolute paths are accepted.
16 H: -a Add all files. The default is to add only files ending in a
17 H: known suffix for a supported audio format.
19 H: -l Add files lazily. If the path already exists in the
20 H: database, skip this file. This operation is really cheap. Useful
21 H: to update large directories after some files have been added or
24 H: -f Force adding/updating. Recompute the audio format handler data
25 H: even if a file with the same path and the same hash value exists.
27 H: -v Verbose mode. Print what is being done.
30 P: AFS_READ | AFS_WRITE
31 D: Initialize the osl tables for the audio file selector.
32 U: init [table_name ...]
33 H: When invoked without arguments, this command creates all tables. Otherwise
34 H: only the tables given by table_name... are created.
39 U: ls [-l=mode] [-p] [-a] [-r] [-d] [-s=order] [pattern...]
40 H: Print a list of all audio files matching pattern.
44 H: -l=mode Change listing mode. Defaults to short listing if not given.
47 H: s: short listing mode
48 H: l: long listing mode (equivalent to -l)
49 H: v: verbose listing mode
50 H: p: parser-friendly mode
51 H: m: mbox listing mode
52 H: c: chunk-table listing mode
54 H: -p List full paths. If this option is not specified, only the basename
55 H: of each file is printed.
57 H: -a List only files that are admissible with respect to the current mood or
60 H: -r Reverse sort order.
62 H: -d Print dates as seconds after the epoch.
64 H: -s=order Change sort order. Defaults to alphabetical path sort if not given.
66 H: Possible values for order:
68 H: l: by last played time
69 H: s: by score (implies -a)
70 H: n: by num played count
72 H: c: by number of channels
82 U: lsatt [-i] [-l] [-r] [pattern]
83 H: Print the list of all defined attributes which match the given
84 H: pattern. If no pattern is given, the full list is printed.
88 H: -i Sort attributes by id. The default is to sort alphabetically by name.
90 H: -l Print a long listing containing both identifier and attribute name. The
91 H: default is to print only the name.
93 H: -r Reverse sort order.
96 P: AFS_READ | AFS_WRITE
97 D: Set attribute(s) for all files matching a pattern.
98 U: setatt attribute{+|-}... pattern
99 H: Set ('+') or unset ('-') the given attributes for all audio files matching
102 H: setatt rock+ punk+ pop- '*foo.mp3'
104 H: sets the 'rock' and the 'punk' attribute and unsets the 'pop'
105 H: attribute of all files ending with 'foo.mp3'.
108 P: AFS_READ | AFS_WRITE
109 D: Add new attribute(s).
110 U: addatt attribute1...
111 H: This adds new attributes to the attribute table. At most 64
112 H: attributes may be defined.
115 P: AFS_READ | AFS_WRITE
116 D: Rename an attribute.
118 H: Rename attribute old to new.
122 D: Run integrity checks against osl tables.
123 U: check [-a] [-m] [-p]
124 H: Check the audio file table, the mood definitions and all
125 H: defined playlists and report any inconsistencies found.
129 H: -a Run audio file table checks. Checks for entries in the audio file
130 H: table which are not present in the file system. Moreover, it checks
131 H: whether the lyrics id and all entries in the audio file table are
134 H: -m Run syntax checks on all defined moods in the mood table.
136 H: -p Check all playlists for lines that correspond to files not contained
137 H: in the audio file table.
139 H: If called without arguments, all three checks are run.
142 P: AFS_READ | AFS_WRITE
143 D: Remove attribute(s).
145 H: Remove all attributes matching any given pattern. All information
146 H: about this attribute in the audio file table is lost.
149 P: AFS_READ | AFS_WRITE
150 D: Remove entries from the audio file table.
151 U: rm [-v] [-f] [-p] pattern...
152 H: Delete all entries in the audio file table that match any given pattern. Note
153 H: that this affects the table entries only; the command won't touch your audio
158 H: -v Verbose mode. Explain what is being done.
160 H: -f Force mode. Ignore nonexistent files. Don't complain if nothing
163 H: -p Pathname match. Match a slash in the path only with a slash
164 H: in pattern and not by an asterisk (*) or a question mark
165 H: (?) metacharacter, nor by a bracket expression ([]) containing
166 H: a slash (see fnmatch(3)).
169 P: AFS_READ | AFS_WRITE
170 D: Manipulate the afs entry of audio files.
171 U: touch [-n=numplayed] [-l=lastplayed] [-y=lyrics_id] [-i=image_id] [-a=amp] [-v] [-p] pattern
172 H: If no option is given, the lastplayed field is set to the current time
173 H: and the value of the numplayed field is increased by one. Otherwise,
174 H: only the given options are taken into account.
178 H: -n Set the numplayed count, i.e. the number of times this audio
179 H: file was selected for streaming so far.
181 H: -l Set the lastplayed time, i.e. the last time this audio file was
182 H: selected for streaming. The argument must be a number of seconds
183 H: since the epoch. Example:
185 H: touch -l=$(date +%s) file
187 H: sets the lastplayed time of 'file' to the current time.
189 H: -y Set the lyrics ID which specifies the lyrics data file associated
190 H: with the audio file.
192 H: -i Like -y, but sets the image ID.
194 H: -a Set the amplification value (0-255). This determines a scaling
195 H: factor by which the amplitude should be multiplied in order to
196 H: normalize the volume of the audio file. A value of zero means
197 H: no amplification, 64 means the amplitude should be multiplied
198 H: by a factor of two, 128 by three and so on.
200 H: This value is used by the amp filter.
202 H: -v Verbose mode. Explain what is being done.
204 H: -p Pathname match. Match a slash in the path only with a slash
205 H: in pattern and not by an asterisk (*) or a question mark
206 H: (?) metacharacter, nor by a bracket expression ([]) containing
207 H: a slash (see fnmatch(3)).
210 P: AFS_READ | AFS_WRITE
211 D: Copy audio file selector info.
212 U: cpsi [-a] [-y] [-i] [-l] [-n] [-v] source pattern...
213 H: If no option, or only the -v option is given, all fields of the
214 H: audio file selector info are copied to all files matching pattern.
215 H: Otherwise, only the given options are taken into account.
219 H: -a Copy attributes.
221 H: -y Copy the lyrics id.
223 H: -i Copy the image id.
225 H: -l Copy the lastplayed time.
227 H: -n Copy the numplayed count.
232 P: AFS_READ | AFS_WRITE
233 D: Activate a mood or a playlist.
234 U: select specifier/name
235 H: The specifier is either 'm' or 'p' to indicate whether a playlist or
236 H: a mood should be activated. Example:
240 H: loads the mood named 'foo'.
244 O: int com_add@member@(struct command_context *cc);
245 P: AFS_READ | AFS_WRITE
246 D: Add stdin as a blob to the @member@ table.
247 U: add@member@ @member@_name
248 H: Read from stdin and ask the audio file selector to create a blob in the
249 H: corresponding osl table. If the named blob already exists, it gets replaced
250 H: with the new data.
254 O: int com_cat@member@(struct command_context *cc);
256 D: Dump the contents of a blob of type @member@ to stdout.
257 U: cat@member@ @member@_name
258 H: Retrieve the named blob and write it to stdout.
262 O: int com_ls@member@(struct command_context *cc);
264 D: List blobs of type @member@ which match a pattern.
265 U: ls@member@ [-i] [-l] [-r] [pattern]
266 H: Print the list of all blobs which match the given pattern. If no
267 H: pattern is given, the full list is printed.
271 H: -i Sort by identifier. The default is to sort alphabetically by name.
273 H: -l Print identifier and name. The default is to print only the name.
275 H: -r Reverse sort order.
279 O: int com_rm@member@(struct command_context *cc);
280 P: AFS_READ | AFS_WRITE
281 D: Remove blob(s) of type @member@ from the @member@ table.
282 U: rm@member@ pattern...
283 H: Remove all blobs whose name matches any of the given patterns.
287 O: int com_mv@member@(struct command_context *cc);
288 P: AFS_READ | AFS_WRITE
289 D: Rename a blob of type @member@.
290 U: mv@member@ source_@member@_name dest_@member@_name
291 H: Rename the blob identified by the source blob name to the destination blob
292 H: name. The command fails if the source does not exist, or if the destination