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