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