server: Deprecate ls -p.
[paraslash.git] / afs.cmd
1 BN: afs
2 SF: afs.c aft.c attribute.c
3 SN: list of afs commands
4 TM: mood lyr img pl
5 ---
6 N: add
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.
13 H:
14 H: Options:
15 H:
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.
18 H:
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
22 H: deleted.
23 H:
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.
26 H:
27 H: -v Verbose mode. Print what is being done.
28 ---
29 N: init
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.
35 ---
36 N: ls
38 D: List audio files.
39 U: ls [-l=mode] [-p] [-a] [-r] [-d] [-s=order] [pattern...]
40 H: Print a list of all audio files matching pattern.
41 H:
42 H: Options:
43 H:
44 H: -l=mode Change listing mode. Defaults to short listing if not given.
45 H:
46 H: Available modes:
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
53 H:
54 H: -F List full paths. If this option is not specified, only the basename
55 H: of each file is printed.
56 H: -p Synonym for -F. Deprecated.
57 H:
58 H: -b Print only the basename of each matching file. This is the default, so
59 H: the option is currently a no-op. It is recommended to specify this option,
60 H: though, as the default might change in a future release.
61 H:
62 H: -a List only files that are admissible with respect to the current mood or
63 H: playlist.
64 H:
65 H: -r Reverse sort order.
66 H:
67 H: -d Print dates as seconds after the epoch.
68 H:
69 H: -s=order
70 H: Change sort order. Defaults to alphabetical path sort if not given.
71 H:
72 H: Possible values for order:
73 H: p: by path
74 H: l: by last played time
75 H: s: by score (implies -a)
76 H: n: by num played count
77 H: f: by frequency
78 H: c: by number of channels
79 H: i: by image id
80 H: y: by lyrics id
81 H: b: by bit rate
82 H: d: by duration
83 H: a: by audio format
84 ---
85 N: lsatt
87 D: List attributes.
88 U: lsatt [-i] [-l] [-r] [pattern]
89 H: Print the list of all defined attributes which match the given
90 H: pattern. If no pattern is given, the full list is printed.
91 H:
92 H: Options:
93 H:
94 H: -i Sort attributes by id. The default is to sort alphabetically by name.
95 H:
96 H: -l Print a long listing containing both identifier and attribute name. The
97 H: default is to print only the name.
98 H:
99 H: -r Reverse sort order.
100 ---
101 N: setatt
103 D: Set attribute(s) for all files matching a pattern.
104 U: setatt attribute{+|-}... pattern
105 H: Set ('+') or unset ('-') the given attributes for all audio files matching
106 H: pattern. Example:
107 H:
108 H: setatt rock+ punk+ pop- '*foo.mp3'
109 H:
110 H: sets the 'rock' and the 'punk' attribute and unsets the 'pop'
111 H: attribute of all files ending with 'foo.mp3'.
112 ---
113 N: addatt
115 D: Add new attribute(s).
116 U: addatt attribute1...
117 H: This adds new attributes to the attribute table. At most 64
118 H: attributes may be defined.
119 ---
120 N: mvatt
122 D: Rename an attribute.
123 U: mvatt old new
124 H: Rename attribute old to new.
125 ---
126 N: check
128 D: Run integrity checks against osl tables.
129 U: check [-a] [-A] [-m] [-p]
130 H: Check the audio file table, the attribute table, the mood definitions
131 H: and all defined playlists. Report any inconsistencies.
132 H:
133 H: Options:
134 H:
135 H: -a Run audio file table checks. Checks for entries in the audio file
136 H: table which are not present in the file system. Moreover, it checks
137 H: whether the lyrics id and all entries in the audio file table are
138 H: valid.
139 H:
140 H: -A Check the attribute table against the afs attribute bitmask of
141 H: each audio file in the audio file table. Reports audio files
142 H: whose attribute bitmask is invalid, i.e., has a bit set which
143 H: does not correspond to any attribute of the attribute table.
144 H:
145 H: -m Run syntax checks on all defined moods in the mood table.
146 H:
147 H: -p Check all playlists for lines that correspond to files not contained
148 H: in the audio file table.
149 H:
150 H: If called without arguments, all checks are run.
151 ---
152 N: rmatt
154 D: Remove attribute(s).
155 U: rmatt pattern...
156 H: Remove all attributes matching any given pattern. All information
157 H: about this attribute in the audio file table is lost.
158 ---
159 N: rm
161 D: Remove entries from the audio file table.
162 U: rm [-v] [-f] [-p] pattern...
163 H: Delete all entries in the audio file table that match any given pattern. Note
164 H: that this affects the table entries only; the command won't touch your audio
165 H: files on disk.
166 H:
167 H: Options:
168 H:
169 H: -v Verbose mode. Explain what is being done.
170 H:
171 H: -f Force mode. Ignore nonexistent files. Don't complain if nothing
172 H: was removed.
173 H:
174 H: -p Pathname match. Match a slash in the path only with a slash
175 H: in pattern and not by an asterisk (*) or a question mark
176 H: (?) metacharacter, nor by a bracket expression ([]) containing
177 H: a slash (see fnmatch(3)).
178 ---
179 N: touch
181 D: Manipulate the afs entry of audio files.
182 U: touch [-n=numplayed] [-l=lastplayed] [-y=lyrics_id] [-i=image_id] [-a=amp] [-v] [-p] pattern
183 H: If no option is given, the lastplayed field is set to the current time
184 H: and the value of the numplayed field is increased by one. Otherwise,
185 H: only the given options are taken into account.
186 H:
187 H: Options:
188 H:
189 H: -n Set the numplayed count, i.e. the number of times this audio
190 H: file was selected for streaming so far.
191 H:
192 H: -l Set the lastplayed time, i.e. the last time this audio file was
193 H: selected for streaming. The argument must be a number of seconds
194 H: since the epoch. Example:
195 H:
196 H: touch -l=$(date +%s) file
197 H:
198 H: sets the lastplayed time of 'file' to the current time.
199 H:
200 H: -y Set the lyrics ID which specifies the lyrics data file associated
201 H: with the audio file.
202 H:
203 H: -i Like -y, but sets the image ID.
204 H:
205 H: -a Set the amplification value (0-255). This determines a scaling
206 H: factor by which the amplitude should be multiplied in order to
207 H: normalize the volume of the audio file. A value of zero means
208 H: no amplification, 64 means the amplitude should be multiplied
209 H: by a factor of two, 128 by three and so on.
210 H:
211 H: This value is used by the amp filter.
212 H:
213 H: -v Verbose mode. Explain what is being done.
214 H:
215 H: -p Pathname match. Match a slash in the path only with a slash
216 H: in pattern and not by an asterisk (*) or a question mark
217 H: (?) metacharacter, nor by a bracket expression ([]) containing
218 H: a slash (see fnmatch(3)).
219 ---
220 N: cpsi
222 D: Copy audio file selector info.
223 U: cpsi [-a] [-y] [-i] [-l] [-n] [-v] source pattern...
224 H: If no option, or only the -v option is given, all fields of the
225 H: audio file selector info are copied to all files matching pattern.
226 H: Otherwise, only the given options are taken into account.
227 H:
228 H: Options:
229 H:
230 H: -a Copy attributes.
231 H:
232 H: -y Copy the lyrics id.
233 H:
234 H: -i Copy the image id.
235 H:
236 H: -l Copy the lastplayed time.
237 H:
238 H: -n Copy the numplayed count.
239 H:
240 H: -v Verbose mode.
241 ---
242 N: select
244 D: Activate a mood or a playlist.
245 U: select specifier/name
246 H: The specifier is either 'm' or 'p' to indicate whether a playlist or
247 H: a mood should be activated. Example:
248 H:
249 H: select m/foo
250 H:
251 H: loads the mood named 'foo'.
252 ---
253 T: add
254 N: add@member@
255 O: int com_add@member@(struct command_context *cc);
257 D: Add stdin as a blob to the @member@ table.
258 U: add@member@ @member@_name
259 H: Read from stdin and ask the audio file selector to create a blob in the
260 H: corresponding osl table. If the named blob already exists, it gets replaced
261 H: with the new data.
262 ---
263 T: cat
264 N: cat@member@
265 O: int com_cat@member@(struct command_context *cc);
267 D: Dump the contents of a blob of type @member@ to stdout.
268 U: cat@member@ @member@_name
269 H: Retrieve the named blob and write it to stdout.
270 ---
271 T: ls
272 N: ls@member@
273 O: int com_ls@member@(struct command_context *cc);
275 D: List blobs of type @member@ which match a pattern.
276 U: ls@member@ [-i] [-l] [-r] [pattern]
277 H: Print the list of all blobs which match the given pattern. If no
278 H: pattern is given, the full list is printed.
279 H:
280 H: Options:
281 H:
282 H: -i Sort by identifier. The default is to sort alphabetically by name.
283 H:
284 H: -l Print identifier and name. The default is to print only the name.
285 H:
286 H: -r Reverse sort order.
287 ---
288 T: rm
289 N: rm@member@
290 O: int com_rm@member@(struct command_context *cc);
292 D: Remove blob(s) of type @member@ from the @member@ table.
293 U: rm@member@ pattern...
294 H: Remove all blobs whose name matches any of the given patterns.
295 ---
296 T: mv
297 N: mv@member@
298 O: int com_mv@member@(struct command_context *cc);
300 D: Rename a blob of type @member@.
301 U: mv@member@ source_@member@_name dest_@member@_name
302 H: Rename the blob identified by the source blob name to the destination blob
303 H: name. The command fails if the source does not exist, or if the destination
304 H: already exists.