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