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.
6 IN: para afh server list user_list
7 SN: list of afs commands
11 P: AFS_READ | AFS_WRITE
12 D: Add new audio files to the database.
13 U: add [-l] [-f] [-v] path1 ...
14 H: Each given path may be either the full path to an audio file, or the full path
15 H: of a directory. In case of a directory, all audio files in that directory
16 H: are added recursively.
20 H: -a Add all files. The default is to add only files ending in a known suffix
21 H: for a supported audio format.
23 H: -l Add files lazily. If a file already exists in the database, skip this file.
24 H: This operation is really cheap. Use it when adding large directories if only a
25 H: few files where added.
27 H:-f Force adding/updating. Recompute the audio format handler data
28 H: even if a file with the same path and the same hash value exists.
30 H: -v Verbose mode. Print what is being done.
33 P: AFS_READ | AFS_WRITE
34 D: Initialize the osl tables for the audio file selector.
35 U: init [table_name ...]
36 H: When invoked without arguments, this command creates all tables. Otherwise
37 H: only the tables given by table_name... are created.
42 U: ls [-l[s|l|v|m]] -p -a -r -s{p|s|l|n|f|c|i|y|b|d|a} [pattern...]
43 H: Print a list of all audio files matching pattern.
47 H: -l Change listing mode. Defaults to short listing if not given.
48 H: -ls: short listing mode
49 H: -ll: long listing mode (equivalent to -l)
50 H: -lv: verbose listing mode
51 H: -lm: mbox listing mode
53 H: -p List full path of audio file. If not specified, only the basename
54 H: of each file is printed.
56 H: -a List only file that are admissible with respect to the current mood or
59 H: -r Reverse sort order.
61 H: -s Change sort order. Defaults to alphabetical path sort if not given.
65 H: -sl: sort by last played time.
67 H: -ss: sort by score (implies -a).
69 H: -sn: sort by num played count.
71 H: -sf: sort by frequency.
73 H: -sc: sort by number of channels.
75 H: -si: sort by image id.
77 H: -sy: sort by lyrics id.
79 H: -sb: sort by bit rate.
81 H: -sd: sort by duration.
83 H: -sa: sort by audio format.
88 U: lsatt [-i] [-l] [-r] [pattern]
90 H: Print the list of all defined attributes which match the given pattern. If no
91 H: pattern is given, the full list is printed.
95 H: -i Sort attributes by id. The default is to sort alphabetically by name.
97 H: -l Print a long listing containing both identifier and attribute name. The
98 H: default is to print only the name.
100 H: -r Reverse sort order.
103 P: AFS_READ | AFS_WRITE
104 D: Set attribute(s) for all files matching a pattern.
105 U: setatt attribute{+|-}... pattern
106 H: Set ('+') or unset ('-') the given attributes for all audio files matching
109 H: setatt rock+ punk+ classic- '*foo.mp3'
111 H: sets the 'rock' and the 'punk' attribute but unsets the 'classic'
112 H: attribute of all files ending with 'foo.mp3'.
115 P: AFS_READ | AFS_WRITE
116 D: Add new attribute(s).
117 U: addatt attribute1...
118 H: This adds new attributes to the attribute table. At most 64 attributes
123 D: Run integrity checks against osl tables.
124 U: check [-a] [-m] [-p]
125 H: Check the audio file table, the mood definitions and all defined playlists and
126 H: report any inconsistencies found.
130 H: -a Run audio file table checks. Checks for entries in the audio file
131 H: table which are not present in the file system. Moreover, it checks
132 H: whether the lyrics id and all entries in the audio file table are
135 H: -m Run syntax checks on all defined moods in the mood table.
137 H: -p Check all playlists for lines that correspond to files not contained
138 H: in the audio file table.
140 H: If called without arguments, all three checks are run.
143 P: AFS_READ | AFS_WRITE
144 D: Remove attribute(s).
146 H: Remove all attributes matching any given pattern. All information
147 H: about this attribute in the audio file table is lost.
150 P: AFS_READ | AFS_WRITE
151 D: Remove entries from the audio file table.
152 U: rm [-v] [-f] [-p] pattern...
153 H: Delete all entries in the audio file table that match any given pattern.
154 H: Note that affects the table entries only; paraslash won't touch your
155 H: audio files in any way.
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 data for all audio files matching a pattern.
171 U: touch [-n numplayed] [-l lastplayed] [-y lyrics_id] [-i image_id] [-v] [-p] pattern
172 H: If no option is given, lastplayed is set to the current time and numplayed is
173 H: increased by one. Otherwise, only the given options are taken into account.
177 H: -n Set numplayed count. The number of times afs has selected this
178 H: audio file for streaming.
180 H: -l Set lastplayed time. The last time this audio file was selected.
181 H: Must be given as the number of seconds since the epoch. Example:
183 H: touch -l $(date +%s) file
185 H: sets the lastplayed time of 'file' to the current time.
187 H: -y Set the lyrics id. Specify the lyrics data file associated with
190 H: -i Set the image id. Same as -y, but sets the image.
192 H: -v Verbose mode. Explain what is being done.
194 H: -p Pathname match. Match a slash in the path only with a slash
195 H: in pattern and not by an asterisk (*) or a question mark
196 H: (?) metacharacter, nor by a bracket expression ([]) containing
197 H: a slash (see fnmatch(3)).
200 P: AFS_READ | AFS_WRITE
201 D: Copy audio file selector info.
202 U: cpsi [-a] [-y] [-i] [-l] [-n] [-v] source pattern...
203 H: If no option, or only the -v option is given, all fields of the audio file
204 H: selector info are copied to all files matching pattern. Otherwise, only the
205 H: given options are taken into account.
209 H: -a Copy attributes.
211 H: -y Copy the lyrics id.
213 H: -i Copy the image id.
215 H: -l Copy the lastplayed time.
217 H: -n Copy the numplayed count.
223 O: int com_add@member@(int fd, int argc, char * const * const argv);
224 P: AFS_READ | AFS_WRITE
225 D: Read data from stdin and add it as a blob to an osl table.
226 U: add@member@ @member@_name
227 H: Each command of this family reads arbitrary binary data from stdin and sends
228 H: that data to the audio file selector process. The afs process then creates a
229 H: new blob for the data in the corresponding osl table. Example:
231 H: addimg foo.jpg < bar.jpg
233 H: adds the contents of the file 'bar.jpg' as a blob named 'foo.jpg' to the image
234 H: table. The names of the blobs of a table must be unique, i.e. it is an error
235 H: if an entry named 'foo.jpg' already exists.
239 O: int com_cat@member@(int fd, int argc, char * const * const argv);
241 D: Dump the contents of a blob to stdout.
242 U: cat@member@ @member@_name
243 H: These commands may be used to retrieve the blob identified by the given name from
244 H: the corresponding osl table to which they were previously added.
248 O: int com_ls@member@(int fd, int argc, char * const * const argv);
250 D: List blobs of an osl table matching a pattern.
251 U: ls@member@ [-i] [-l] [-r] [pattern]
252 H: Print a list of the names of all blobs in the corresponding osl table which
253 H: match the given pattern. If no pattern is given, the full list is printed.
257 H: -i Sort attributes by id. The default is to sort alphabetically by name.
259 H: -l Print a long listing containing both identifier and attribute name. The
260 H: default is to print only the name.
262 H: -r Reverse sort order.
266 O: int com_rm@member@(int fd, int argc, char * const * const argv);
267 P: AFS_READ | AFS_WRITE
268 D: Remove blob(s) from an osl table.
269 U: rm@member@ pattern...
270 H: Remove all blobs from the corresponding table which match any given pattern.
274 O: int com_mv@member@(int fd, int argc, char * const * const argv);
275 P: AFS_READ | AFS_WRITE
277 U: mv@member@ old_@member@_name new_@member@_name
278 H: Rename the blob identified by the first name as the second name.