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.
6 IN: para afh server list user_list
7 SN: list of afs commands
11 P: AFS_READ | AFS_WRITE
12 D: Add new audio files to the database.
13 U: add [-l] [-f] [-v] path1 ...
14 H: Each given path may be either the full path to an audio file, or the full path
15 H: of a directory. In case of a directory, all audio files in that directory
16 H: are added recursively.
20 H: -l Add files lazily. If a file already exists in the database, skip this file.
21 H: This operation is really cheap. Use it when adding large directories if only a
22 H: few files where added.
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.
27 H: -v Verbose mode. Print what is being done.
30 P: AFS_READ | AFS_WRITE
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.
39 U: ls [-l[s|l|v|m]] -p -a -r -s{p|s|l|n|f|c|i|y|b|d|a} [pattern...]
40 H: Print a list of all audio files matching pattern.
44 H: -l Change listing mode. Defaults to short listing if not given.
45 H: -ls: short listing mode
46 H: -ll: long listing mode (equivalent to -l)
47 H: -lv: verbose listing mode
48 H: -lm: mbox listing mode
50 H: -p List full path of audio file. If not specified, only the basename
51 H: of each file is printed.
53 H: -a List only file that are admissible with respect to the current mood or
56 H: -r Reverse sort order.
58 H: -s Change sort order. Defaults to alphabetical path sort if not given.
62 H: -sl: sort by last played time.
64 H: -ss: sort by score (implies -a).
66 H: -sn: sort by num played count.
68 H: -sf: sort by frequency.
70 H: -sc: sort by number of channels.
72 H: -si: sort by image id.
74 H: -sy: sort by lyrics id.
76 H: -sb: sort by bitrate.
78 H: -sd: sort by duration.
80 H: -sa: sort by audio format.
87 H: Print the list of all defined attributes.
91 H: -a Sort attributes alphabetically by name. The default is to sort by
94 H: -l Print a long listing containing both identifier and attribute name. The
95 H: default is to print only the name.
98 P: AFS_READ | AFS_WRITE
99 D: Set attribute(s) for all files matching a pattern.
100 U: setatt attribute{+|-}... pattern
101 H: Set ('+') or unset ('-') the given attributes for all audio files matching
104 H: sa rock+ punk+ classic- '*foo.mp3'
106 H: sets the 'rock' and the 'punk' attribute but unsets the 'classic'
107 H: attribute of all files ending with 'foo.mp3'.
110 P: AFS_READ | AFS_WRITE
111 D: Add new attribute(s).
112 U: addatt attribute1 [attribute2 ...]
113 H: This adds new attributes to the attribute table. At most 64 attributes
118 D: Run integrity checks against osl tables.
119 U: check [-a] [-m] [-p]
120 H: This command checks the audio file table, the mood definitions and all
121 H: defined playlists and reports any inconsistencies found.
125 H: -a Run audio file table checks. Checks for entries in the audio file
126 H: table which are not present in the filesystem. Moreover, it checks
127 H: whether the lyrics id and all entries in the audio file table are
130 H: -m Run syntax checks on all defined moods in the mood table.
132 H: -p Check all playlists for lines that correspond to files not contained
133 H: in the audio file table.
135 H: If called without arguments, all three checks are run.
138 P: AFS_READ | AFS_WRITE
139 D: Remove attribute(s).
141 H: Remove all attributes matching any given pattern. All information
142 H: about this attribute in the audio file table is lost.
145 P: AFS_READ | AFS_WRITE
146 D: Remove entries from the audio file table.
148 H: Delete all entries in the audio file table that match any given pattern.
149 H: Note that affects the table entries only; paraslash won't touch your
150 H: audio files in any way.
153 P: AFS_READ | AFS_WRITE
154 D: Manupulate the afs data for all audio files matching a pattern.
155 U: touch [-n numplayed] [-l lastplayed] [-y lyrics_id] [-i image_id] pattern
156 H: If no option is given, lastplayed is set to the current time and numplayed is
157 H: increased by one. Otherwise, only the given options are taken into account.
161 H: -n Set numplayed count. The number of times afs has selected this
162 H: audio file for streaming.
164 H: -l Set lastplayed time. The last time this audio file was selected.
165 H: Must be given as the number of sectonds since the epoch. Example:
167 H: touch -l $(date +%s) file
169 H: sets the lastplayed time of 'file' to the current time.
171 H: -y Set the lyrics id. Specify the lyrics data file associated with
174 H: -i Set the image id. Same as -y, but sets the image.
178 O: int com_add@member@(int fd, int argc, char * const * const argv);
179 P: AFS_READ | AFS_WRITE
180 D: Read data from stdin and add it as a blob to an osl table.
181 U: add@member@ @member@_name
182 H: Each command of this family reads arbitrary binary data from stdin and sends
183 H: that data to the audio file selector process. The afs process then creates a
184 H: new blob for the data in the corresponding osl table. Example:
186 H: addimg foo.jpg < bar.jpg
188 H: adds the contents of the file 'bar.jpg' as a blob named 'foo.jpg' to the image
189 H: table. The names of the blobs of a table must be unique, i.e. it is an error
190 H: if an entry named 'foo.jpg' already exists.
194 O: int com_cat@member@(int fd, int argc, char * const * const argv);
196 D: Dump the contents of a blob to stdout.
197 U: cat@member@ @member@_name
198 H: These commands may be used to retrieve the blob identified by the given name from
199 H: the corresponding osl table to which they were previously added.
203 O: int com_ls@member@(int fd, int argc, char * const * const argv);
205 D: List blobs of an osl table matching a pattern.
206 U: ls@member@ [-v] [pattern]
207 H: Print a list of the names of all blobs in the corresponding osl table which
208 H: match the given pattern. If no pattern is given, the full list is printed. If
209 H: the optional -v pattern is given, the blob id is printed as well.
213 O: int com_rm@member@(int fd, int argc, char * const * const argv);
214 P: AFS_READ | AFS_WRITE
215 D: Remove blob(s) from an osl table.
216 U: rm@member@ pattern...
217 H: Remove all blobs from the corresponding table which match any given pattern.
221 O: int com_mv@member@(int fd, int argc, char * const * const argv);
222 P: AFS_READ | AFS_WRITE
224 U: mv@member@ old_@member@_name new_@member@_name
225 H: Rename the blob identified by the first name as the second name.