rename vector_fmul_add() vector_fmul_reverse_c() and make them static.
[paraslash.git] / afs.cmd
1 OF: afs_command_list
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.
5 AT: server_command
6 SI: openssl/rc4 osl regex
7 IN: para error crypt command string afh afs server list user_list
8 SN: list of afs commands
9 TM: mood lyr img pl
10 ---
11 N: add
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.
19 H:
20 H: Options:
21 H:
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.
24 H:
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
28 H: where added.
29 H:
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.
32 H:
33 H: -v Verbose mode. Print what is being done.
34 ---
35 N: init
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.
41 ---
42 N: ls
44 D: List audio files.
45 U: ls [-l[s|l|v|m]] [-p] [-a] [-r] [-d] [-s{p|s|l|n|f|c|i|y|b|d|a}] [pattern...]
46 H: Print a list of all audio files matching pattern.
47 H:
48 H: Options:
49 H:
50 H: -l Change listing mode. Defaults to short listing if not given.
51 H:
52 H: -ls: short listing mode
53 H:
54 H: -ll: long listing mode (equivalent to -l)
55 H:
56 H: -lv: verbose listing mode
57 H:
58 H: -lp: parser-friendly mode
59 H:
60 H: -lm: mbox listing mode
61 H:
62 H: -lc: chunk-table listing mode
63 H:
64 H: -p List full path of audio file. If not specified, only the basename
65 H: of each file is printed.
66 H:
67 H: -a List only files that are admissible with respect to the current mood or
68 H: playlist.
69 H:
70 H: -r Reverse sort order.
71 H:
72 H: -d Print dates as seconds after the epoch.
73 H:
74 H: -s Change sort order. Defaults to alphabetical path sort if not given.
75 H:
76 H: -sp: sort by path.
77 H:
78 H: -sl: sort by last played time.
79 H:
80 H: -ss: sort by score (implies -a).
81 H:
82 H: -sn: sort by num played count.
83 H:
84 H: -sf: sort by frequency.
85 H:
86 H: -sc: sort by number of channels.
87 H:
88 H: -si: sort by image id.
89 H:
90 H: -sy: sort by lyrics id.
91 H:
92 H: -sb: sort by bit rate.
93 H:
94 H: -sd: sort by duration.
95 H:
96 H: -sa: sort by audio format.
97 ---
98 N: lsatt
100 D: List attributes.
101 U: lsatt [-i] [-l] [-r] [pattern]
102 H: Print the list of all defined attributes which match the
103 H: given pattern. If no pattern is given, the full list is
104 H: printed.
105 H:
106 H: Options:
107 H:
108 H: -i Sort attributes by id. The default is to sort alphabetically by name.
109 H:
110 H: -l Print a long listing containing both identifier and attribute name. The
111 H: default is to print only the name.
112 H:
113 H: -r Reverse sort order.
114 ---
115 N: setatt
117 D: Set attribute(s) for all files matching a pattern.
118 U: setatt attribute{+|-}... pattern
119 H: Set ('+') or unset ('-') the given attributes for all audio files matching
120 H: pattern. Example:
121 H:
122 H: setatt rock+ punk+ classic- '*foo.mp3'
123 H:
124 H: sets the 'rock' and the 'punk' attribute but unsets the 'classic'
125 H: attribute of all files ending with 'foo.mp3'.
126 ---
127 N: addatt
129 D: Add new attribute(s).
130 U: addatt attribute1...
131 H: This adds new attributes to the attribute table. At most 64
132 H: attributes may be defined.
133 ---
134 N: mvatt
136 D: Rename an attribute.
137 U: mvatt old new
138 H: Rename attribute old to new.
139 ---
140 N: check
142 D: Run integrity checks against osl tables.
143 U: check [-a] [-m] [-p]
144 H: Check the audio file table, the mood definitions and all
145 H: defined playlists and report any inconsistencies found.
146 H:
147 H: Options:
148 H:
149 H: -a Run audio file table checks. Checks for entries in the audio file
150 H: table which are not present in the file system. Moreover, it checks
151 H: whether the lyrics id and all entries in the audio file table are
152 H: valid.
153 H:
154 H: -m Run syntax checks on all defined moods in the mood table.
155 H:
156 H: -p Check all playlists for lines that correspond to files not contained
157 H: in the audio file table.
158 H:
159 H: If called without arguments, all three checks are run.
160 ---
161 N: rmatt
163 D: Remove attribute(s).
164 U: rmatt pattern...
165 H: Remove all attributes matching any given pattern. All information
166 H: about this attribute in the audio file table is lost.
167 ---
168 N: rm
170 D: Remove entries from the audio file table.
171 U: rm [-v] [-f] [-p] pattern...
172 H: Delete all entries in the audio file table that match any given pattern.
173 H: Note that affects the table entries only; paraslash won't touch your
174 H: audio files in any way.
175 H: Options:
176 H:
177 H: -v Verbose mode. Explain what is being done.
178 H:
179 H: -f Force mode. Ignore nonexistent files. Don't complain if nothing
180 H: was removed.
181 H:
182 H: -p Pathname match. Match a slash in the path only with a slash
183 H: in pattern and not by an asterisk (*) or a question mark
184 H: (?) metacharacter, nor by a bracket expression ([]) containing
185 H: a slash (see fnmatch(3)).
186 ---
187 N: touch
189 D: Manipulate the afs data for all audio files matching a pattern.
190 U: touch [-n=numplayed] [-l=lastplayed] [-y=lyrics_id] [-i=image_id] [-a=amp] [-v] [-p] pattern
191 H: If no option is given, lastplayed is set to the current time
192 H: and numplayed is increased by one. Otherwise, only the given
193 H: options are taken into account.
194 H:
195 H: Options:
196 H:
197 H: -n Set numplayed count. The number of times afs has selected this
198 H: audio file for streaming.
199 H:
200 H: -l Set lastplayed time. The last time this audio file was selected.
201 H: Must be given as the number of seconds since the epoch. Example:
202 H:
203 H: touch -l=$(date +%s) file
204 H:
205 H: sets the lastplayed time of 'file' to the current time.
206 H:
207 H: -y Set the lyrics id. Specify the lyrics data file associated with
208 H: this audio file.
209 H:
210 H: -i Set the image id. Same as -y, but sets the image.
211 H:
212 H: -a Set the amplification value (0-255). This determines a scaling
213 H: factor by which the amplitude should be multiplied in order to
214 H: normalize the volume of the audio file. A value of zero means
215 H: no amplification, 64 means the amplitude should be multiplied
216 H: by a factor of two, 128 by three and so on.
217 H:
218 H: This value is used by the compress filter.
219 H:
220 H: -v Verbose mode. Explain what is being done.
221 H:
222 H: -p Pathname match. Match a slash in the path only with a slash
223 H: in pattern and not by an asterisk (*) or a question mark
224 H: (?) metacharacter, nor by a bracket expression ([]) containing
225 H: a slash (see fnmatch(3)).
226 ---
227 N: cpsi
229 D: Copy audio file selector info.
230 U: cpsi [-a] [-y] [-i] [-l] [-n] [-v] source pattern...
231 H: If no option, or only the -v option is given, all fields of
232 H: the audio file selector info are copied to all files
233 H: matching pattern. Otherwise, only the given options are
234 H: taken into account.
235 H:
236 H: Options:
237 H:
238 H: -a Copy attributes.
239 H:
240 H: -y Copy the lyrics id.
241 H:
242 H: -i Copy the image id.
243 H:
244 H: -l Copy the lastplayed time.
245 H:
246 H: -n Copy the numplayed count.
247 H:
248 H: -v Verbose mode.
249 ---
250 N: select
252 D: Activate a mood or a playlist.
253 U: select specifier/name
254 H: The specifier is either 'm' or 'p' to indicate whether a playlist or
255 H: a mood should be activated. Example:
256 H:
257 H: select m/foo
258 H:
259 H: loads the mood named 'foo'.
260 ---
261 T: add
262 N: add@member@
263 O: int com_add@member@(struct rc4_context *rc4c, int argc, char * const * const argv);
265 D: Read data from stdin and add it as a blob to the @member@ table.
266 U: add@member@ @member@_name
267 H: Read arbitrary binary data from stdin and send that data to
268 H: the audio file selector process which creates a new blob for
269 H: the data in the corresponding osl table.
270 H:
271 H: The names of the blobs of a table are unique. If an entry with the
272 H: given name already exists, its contents are replaced by the new data.
273 ---
274 T: cat
275 N: cat@member@
276 O: int com_cat@member@(struct rc4_context *rc4c, int argc, char * const * const argv);
278 D: Dump the contents of a blob of type @member@ to stdout.
279 U: cat@member@ @member@_name
280 H: This command may be used to retrieve the blob identified by
281 H: the given name from the corresponding osl table to which
282 H: they were previously added.
283 ---
284 T: ls
285 N: ls@member@
286 O: int com_ls@member@(struct rc4_context *rc4c, int argc, char * const * const argv);
288 D: List blobs of type @member@ matching a pattern.
289 U: ls@member@ [-i] [-l] [-r] [pattern]
290 H: Print a list of the names of all blobs in the corresponding
291 H: osl table which match the given pattern. If no pattern is
292 H: given, the full list is printed.
293 H:
294 H: Options:
295 H:
296 H: -i Sort attributes by id. The default is to sort
297 H: alphabetically by name.
298 H:
299 H: -l Print a long listing containing both identifier and
300 H: attribute name. The default is to print only the name.
301 H:
302 H: -r Reverse sort order.
303 ---
304 T: rm
305 N: rm@member@
306 O: int com_rm@member@(struct rc4_context *rc4c, int argc, char * const * const argv);
308 D: Remove blob(s) of type @member@ from the @member@ table.
309 U: rm@member@ pattern...
310 H: Remove all blobs from the corresponding table which match
311 H: any given pattern.
312 ---
313 T: mv
314 N: mv@member@
315 O: int com_mv@member@(struct rc4_context *rc4c, int argc, char * const * const argv);
317 D: Rename a blob of type @member@.
318 U: mv@member@ old_@member@_name new_@member@_name
319 H: Rename the blob identified by the first name as the second name.