2 SF: afs.c aft.c attribute.c
3 HC: Prototypes for the commands of the audio file selector.
4 CC: Array of commands for the audio file selector.
7 IN: para error string afh afs server list user_list
8 SN: list of afs commands
12 P: AFS_READ | AFS_WRITE
13 D: Add new audio files to the database.
14 U: add [-l] [-f] [-v] path...
15 H: Each given path may be either the full path to an audio
16 H: file, or the full path of a directory. In case of a
17 H: directory, all audio files in that directory are added
18 H: recursively. Only absolute paths are accepted.
22 H: -a Add all files. The default is to add only files ending in a
23 H: known suffix for a supported audio format.
25 H: -l Add files lazily. If the path already exists in the
26 H: database, skip this file. This operation is really cheap.
27 H: Use it when adding large directories if only a few files
30 H:-f Force adding/updating. Recompute the audio format handler data
31 H: even if a file with the same path and the same hash value exists.
33 H: -v Verbose mode. Print what is being done.
36 P: AFS_READ | AFS_WRITE
37 D: Initialize the osl tables for the audio file selector.
38 U: init [table_name ...]
39 H: When invoked without arguments, this command creates all tables. Otherwise
40 H: only the tables given by table_name... are created.
45 U: ls [-l[s|l|v|m]] -p -a -r -s{p|s|l|n|f|c|i|y|b|d|a} [pattern...]
46 H: Print a list of all audio files matching pattern.
50 H: -l Change listing mode. Defaults to short listing if not given.
52 H: -ls: short listing mode
54 H: -ll: long listing mode (equivalent to -l)
56 H: -lv: verbose listing mode
58 H: -lm: mbox listing mode
60 H: -lc: chunk-table listing mode
62 H: -p List full path of audio file. If not specified, only the basename
63 H: of each file is printed.
65 H: -a List only files that are admissible with respect to the current mood or
68 H: -r Reverse sort order.
70 H: -s Change sort order. Defaults to alphabetical path sort if not given.
74 H: -sl: sort by last played time.
76 H: -ss: sort by score (implies -a).
78 H: -sn: sort by num played count.
80 H: -sf: sort by frequency.
82 H: -sc: sort by number of channels.
84 H: -si: sort by image id.
86 H: -sy: sort by lyrics id.
88 H: -sb: sort by bit rate.
90 H: -sd: sort by duration.
92 H: -sa: sort by audio format.
97 U: lsatt [-i] [-l] [-r] [pattern]
98 H: Print the list of all defined attributes which match the
99 H: given pattern. If no pattern is given, the full list is
104 H: -i Sort attributes by id. The default is to sort alphabetically by name.
106 H: -l Print a long listing containing both identifier and attribute name. The
107 H: default is to print only the name.
109 H: -r Reverse sort order.
112 P: AFS_READ | AFS_WRITE
113 D: Set attribute(s) for all files matching a pattern.
114 U: setatt attribute{+|-}... pattern
115 H: Set ('+') or unset ('-') the given attributes for all audio files matching
118 H: setatt rock+ punk+ classic- '*foo.mp3'
120 H: sets the 'rock' and the 'punk' attribute but unsets the 'classic'
121 H: attribute of all files ending with 'foo.mp3'.
124 P: AFS_READ | AFS_WRITE
125 D: Add new attribute(s).
126 U: addatt attribute1...
127 H: This adds new attributes to the attribute table. At most 64
128 H: attributes may be defined.
131 P: AFS_READ | AFS_WRITE
132 D: Rename an attribute.
134 H: Rename attribute old to new.
138 D: Run integrity checks against osl tables.
139 U: check [-a] [-m] [-p]
140 H: Check the audio file table, the mood definitions and all
141 H: defined playlists and report any inconsistencies found.
145 H: -a Run audio file table checks. Checks for entries in the audio file
146 H: table which are not present in the file system. Moreover, it checks
147 H: whether the lyrics id and all entries in the audio file table are
150 H: -m Run syntax checks on all defined moods in the mood table.
152 H: -p Check all playlists for lines that correspond to files not contained
153 H: in the audio file table.
155 H: If called without arguments, all three checks are run.
158 P: AFS_READ | AFS_WRITE
159 D: Remove attribute(s).
161 H: Remove all attributes matching any given pattern. All information
162 H: about this attribute in the audio file table is lost.
165 P: AFS_READ | AFS_WRITE
166 D: Remove entries from the audio file table.
167 U: rm [-v] [-f] [-p] pattern...
168 H: Delete all entries in the audio file table that match any given pattern.
169 H: Note that affects the table entries only; paraslash won't touch your
170 H: audio files in any way.
173 H: -v Verbose mode. Explain what is being done.
175 H: -f Force mode. Ignore nonexistent files. Don't complain if nothing
178 H: -p Pathname match. Match a slash in the path only with a slash
179 H: in pattern and not by an asterisk (*) or a question mark
180 H: (?) metacharacter, nor by a bracket expression ([]) containing
181 H: a slash (see fnmatch(3)).
184 P: AFS_READ | AFS_WRITE
185 D: Manipulate the afs data for all audio files matching a pattern.
186 U: touch [-n numplayed] [-l lastplayed] [-y lyrics_id] [-i image_id] [-a amp] [-v] [-p] pattern
187 H: If no option is given, lastplayed is set to the current time
188 H: and numplayed is increased by one. Otherwise, only the given
189 H: options are taken into account.
193 H: -n Set numplayed count. The number of times afs has selected this
194 H: audio file for streaming.
196 H: -l Set lastplayed time. The last time this audio file was selected.
197 H: Must be given as the number of seconds since the epoch. Example:
199 H: touch -l $(date +%s) file
201 H: sets the lastplayed time of 'file' to the current time.
203 H: -y Set the lyrics id. Specify the lyrics data file associated with
206 H: -i Set the image id. Same as -y, but sets the image.
208 H: -a Set the amplification value (0-255). This determines a scaling
209 H: factor by which the amplitude should be multiplied in order to
210 H: normalize the volume of the audio file. A value of zero means
211 H: no amplification, 64 means the amplitude should be multiplied
212 H: by a factor of two, 128 by three and so on.
214 H: This value is used by the compress filter.
216 H: -v Verbose mode. Explain what is being done.
218 H: -p Pathname match. Match a slash in the path only with a slash
219 H: in pattern and not by an asterisk (*) or a question mark
220 H: (?) metacharacter, nor by a bracket expression ([]) containing
221 H: a slash (see fnmatch(3)).
224 P: AFS_READ | AFS_WRITE
225 D: Copy audio file selector info.
226 U: cpsi [-a] [-y] [-i] [-l] [-n] [-v] source pattern...
227 H: If no option, or only the -v option is given, all fields of
228 H: the audio file selector info are copied to all files
229 H: matching pattern. Otherwise, only the given options are
230 H: taken into account.
234 H: -a Copy attributes.
236 H: -y Copy the lyrics id.
238 H: -i Copy the image id.
240 H: -l Copy the lastplayed time.
242 H: -n Copy the numplayed count.
247 P: AFS_READ | AFS_WRITE
248 D: Activate a mood or a playlist.
249 U: select specifier/name
250 H: The specifier is either 'm' or 'p' to indicate whether a playlist or
251 H: a mood should be activated. Example:
255 H: loads the mood named 'foo'.
259 O: int com_add@member@(int fd, int argc, char * const * const argv);
260 P: AFS_READ | AFS_WRITE
261 D: Read data from stdin and add it as a blob to the @member@ table.
262 U: add@member@ @member@_name
263 H: Read arbitrary binary data from stdin and send that data to
264 H: the audio file selector process which creates a new blob for
265 H: the data in the corresponding osl table.
267 H: The names of the blobs of a table are unique. If an entry with the
268 H: given name already exists, its contents are replaced by the new data.
272 O: int com_cat@member@(int fd, int argc, char * const * const argv);
274 D: Dump the contents of a blob of type @member@ to stdout.
275 U: cat@member@ @member@_name
276 H: This command may be used to retrieve the blob identified by
277 H: the given name from the corresponding osl table to which
278 H: they were previously added.
282 O: int com_ls@member@(int fd, int argc, char * const * const argv);
284 D: List blobs of type @member@ matching a pattern.
285 U: ls@member@ [-i] [-l] [-r] [pattern]
286 H: Print a list of the names of all blobs in the corresponding
287 H: osl table which match the given pattern. If no pattern is
288 H: given, the full list is printed.
292 H: -i Sort attributes by id. The default is to sort
293 H: alphabetically by name.
295 H: -l Print a long listing containing both identifier and
296 H: attribute name. The default is to print only the name.
298 H: -r Reverse sort order.
302 O: int com_rm@member@(int fd, int argc, char * const * const argv);
303 P: AFS_READ | AFS_WRITE
304 D: Remove blob(s) of type @member@ from the @member@ table.
305 U: rm@member@ pattern...
306 H: Remove all blobs from the corresponding table which match
307 H: any given pattern.
311 O: int com_mv@member@(int fd, int argc, char * const * const argv);
312 P: AFS_READ | AFS_WRITE
313 D: Rename a blob of type @member@.
314 U: mv@member@ old_@member@_name new_@member@_name
315 H: Rename the blob identified by the first name as the second name.