nuke the AN (array name) header field
[paraslash.git] / mysql_selector.cmd
1 FN: mysql_selector_command_list
2 HC: prototypes for the commands of the mysql audio file selector
3 CC: array of commands for the mysql audio file selector
4 AT: server_command
5 IN: server user_list
6 ---
7 N: cam
8 P: DB_READ | DB_WRITE
9 D: copy all metadata
10 S: cam source dest1 [dest2 ...]
11 H: Copy attributes and other meta data from source file to destination
12 H: file(s). Useful for files that have been renamed.
13 ---
14 N: cdb
15 P: DB_READ | DB_WRITE
16 D: create database
17 S: cdb [name]
18 H:
19 H: Create database name containing the initial columns for basic
20 H: interoperation with server. This command has to be used only once
21 H: when you use the mysql audio file selector for the very first time.
22 H:
23 H: The optional name defaults to 'paraslash' if not given.
24 ---
25 N: clean
26 P: DB_READ | DB_WRITE
27 D: nuke invalid entries in database
28 S: clean
29 H: If the vrfy command shows you any invalid entries in your database,
30 H: you can get rid of them with clean. Always run 'upd' and 'vrfy'
31 H: before running this command. Use with caution!
32 ---
33 N: cs
34 P: VSS_WRITE | DB_READ | DB_WRITE
35 D: change stream
36 S: cs [s]
37 H: Selects stream s or prints current stream when s was not given.
38 ---
39 N: csp
40 P: VSS_WRITE | DB_READ
41 D: change stream and play
42 S: csp s
43 H: Select stream s and start playing. If this results in a
44 H: stream-change, skip rest of current audio file.
45 ---
46 N: da
47 P: DB_READ | DB_WRITE
48 D: drop attribute from database
49 S: da att
50 H: Use with caution. All info on attribute att will be lost.
51 ---
52 N: hist
53 P: DB_READ
54 D: print history
55 S: hist
56 H: Print list of all audio files together with number of days since
57 H: each file was last played.
58 ---
59 N: info
60 P: DB_READ
61 D: print database info
62 S: info [af]
63 H: print database informations for audio file af. Current audio file
64 H: is used if af is not given.
65 ---
66 N: la
67 P: DB_READ
68 D: list attributes
69 S: la [af]
70 H: List attributes of audio file af or of current audio file when
71 H: invoked without arguments.
72 ---
73 N: laa
74 P: DB_READ
75 D: list available attributes
76 S: laa
77 H: print list of all attributes defined in the database
78 ---
79 N: last
80 P: DB_READ
81 D: print list of audio files, ordered by lastplayed time
82 S: last [n]
83 H: The optional number n defaults to 10 if not specified.
84 ---
85 N: ls
86 P: DB_READ
87 D: list all audio files that match a LIKE pattern
88 S: ls [pattern]
89 H: If pattern was not given, print list of all audio files known
90 H: to the mysql selector. See the documentation of mysql
91 H: for the definition of LIKE patterns.
92 ---
93 N: mbox
94 P: DB_READ
95 D: dump audio file list in mbox format
96 S: mbox [p]
97 H: Dump list of audio files in mbox format (email) to stdout. If
98 H: the optional pattern p is given, only those audio files,
99 H: whose basename match p are going to be included. Otherwise,
100 H: all files are selected.
101 H:
102 H: EXAMPLE
103 H: The mbox command can be used together with your favorite
104 H: mailer (this example uses mutt) for browsing the audio file
105 H: collection:
106 H:
107 H:      para_client mbox > ~/para_mbox
108 H:
109 H:      mutt -F ~/.muttrc.para -f ~/para_mbox
110 H:
111 H: For playlists, you can use mutt's powerful pattern matching
112 H: language to select files. If you like to tag all files
113 H: containing the pattern 'foo', type 'T', then '~s foo'.
114 H:
115 H: When ready with the list, type ';|' (i.e., hit the semicolon
116 H: key to apply the next mutt command to all tagged messages,
117 H: then the pipe key) to pipe the selected mails to a
118 H: suitable script which adds a paraslash stream where exactly
119 H: these files are admissable or does whatever thou wilt.
120 ---
121 N: mv
122 P: DB_READ | DB_WRITE
123 D: rename entry in database
124 S: mv oldname newname
125 H: Rename oldname to newname. This updates the data table to reflect
126 H: the new name. All internal data (numplayed, lastplayed, picid,..)
127 H: is kept.  If newname is a full path, the dir table is updated as
128 H: well.
129 ---
130 N: na
131 P: DB_READ | DB_WRITE
132 D: add new attribute to database
133 S: na att
134 H: This adds a column named att to your mysql database. att should
135 H: only contain letters and numbers, in paricular, '+' and '-' are
136 H: not allowed.
137 ---
138 N: ne
139 P: DB_READ | DB_WRITE
140 D: add new database entries
141 S: ne file1 [file2 [...]]
142 H: Add the given filename(s) to the database, where file1,... must
143 H: be full path names. This command might be much faster than 'upd'
144 H: if the number of given files is small.
145 ---
146 N: ns
147 P: VSS_WRITE | DB_READ | DB_WRITE
148 D: change to next stream
149 S: ns
150 H: Cycle forwards through stream list.
151 ---
152 N: pic
153 P: DB_READ
154 D: get picture by name or by identifier
155 S: pic [name]
156 H: Dump jpg image that is associated to given audio file (current
157 H: audio file if not specified) to stdout. If name starts with
158 H: '#' it is interpreted as an identifier instead and the picture
159 H: having that identifier is dumped to stdout.
160 H:
161 H: EXAMPLE
162 H:
163 H:      para_client pic '#123' > pic123.jpg
164 ---
165 N: picadd
166 P: DB_READ | DB_WRITE
167 D: add picture to database
168 S: picadd [picname]
169 H: Read jpeg file from stdin and store it as picname in database.
170 H:
171 H: EXAMPLE
172 H:
173 H:      para_client picadd foo.jpg < foo.jpg
174 ---
175 N: picass
176 P: DB_READ | DB_WRITE
177 D: associate a picture to file(s)
178 S: picass pic_id file1 [file2...]
179 H: Associate the picture given by pic_id to all given files.
180 ---
181 N: picch
182 P: DB_READ | DB_WRITE
183 D: change name of picture
184 S: picch id new_name
185 H: Asign new_name to picture with identifier id.
186 ---
187 N: picdel
188 P: DB_READ | DB_WRITE
189 D: delete picture from database
190 S: picdel id1 [id2...]
191 H: Delete each given picture from database.
192 ---
193 N: piclist
194 P: DB_READ
195 D: print list of pictures
196 S: piclist
197 H: Print id, name and length of each picture contained in the
198 H: database.
199 ---
200 N: ps
201 P: VSS_WRITE | DB_READ | DB_WRITE
202 D: change to previous stream
203 S: ps
204 H: Cycle backwards through stream list.
205 ---
206 N: rm
207 P: DB_READ | DB_WRITE
208 D: remove entries from database
209 S: rm name1 [name2 [...]]
210 H: Remove name1, name2, ... from the data table. Use with caution.
211 ---
212 N: sa
213 P: DB_READ | DB_WRITE
214 D: set/unset attributes
215 S: sa at1<'+' | '-'> [at2<'+' | '-'> ] [af1 ...]
216 H: Set ('+') or unset ('-') attribute at1, at2 etc. for given list of
217 H: audio files. If no audio files were given the current audio file is
218 H: used. Example:
219 H:
220 H:      sa rock+ punk+ classic- LZ__Waldsterben.mp3
221 H:
222 H: sets the 'rock' and the 'punk' attribute but unsets the 'classic'
223 H: attribute.
224 ---
225 N: skip
226 P: DB_READ | DB_WRITE
227 D: skip subsequent audio files(s)
228 S: skip n [s]
229 H: Skip the next n audio files of stream s. This is equivalent to the
230 H: command 'sl n s', followed by 'us name' for each name the output of
231 H: sl.
232 ---
233 N: sl
234 P: DB_READ
235 D: print score list
236 S: sl n [s]
237 H: Print sorted list of maximal n lines. Each line is an admissible
238 H: entry with respect to stream s. The list is sorted by score-value
239 H: which is given by the definition of s. If s is not given, the
240 H: current stream is used. Example:
241 H:
242 H:      sl 1
243 H:
244 H: shows you the audio file the server would select right now.
245 ---
246 N: snp
247 P: DB_READ | DB_WRITE
248 D: set numplayed
249 S: snp number af1 [af2 ...]
250 H: Update the numplayed field in the data table for all given audio
251 H: files.
252 ---
253 N: stradd
254 P: DB_READ | DB_WRITE
255 D: add stream
256 S: stradd s
257 H: Add stream s to the list of available streams. The stream
258 H: definition for s is read from stdin and is then sent to
259 H: para_server. Example:
260 H:
261 H:      echo 'deny: NAME_LIKE(%Madonna%)' | para_client stradd no_madonna
262 H:
263 H: adds the new stream 'no_madonna' to the list of available streams.
264 H: A given audio file is admissible for this stream iff its basename
265 H: does not contain the string 'Madonna'.
266 ---
267 N: strdel
268 P: DB_READ | DB_WRITE
269 D: delete stream
270 S: strdel s
271 H: Remove stream s from database.
272 ---
273 N: streams
274 P: DB_READ
275 D: list streams
276 S: streams
277 H: Print list of available streams. Use 'cs' to switch to any of
278 H: these.
279 ---
280 N: strq
281 P: DB_READ
282 D: query stream definition
283 S: strq [s]
284 H: Print definition of stream s to stdout. Use current stream if s was
285 H: not given.
286 ---
287 N: summary
288 P: DB_READ
289 D: list attributes
290 S: summary
291 H: Print a list of attributes together with number of audio
292 H: files having that attribute set.
293 ---
294 N: upd
295 P: DB_READ | DB_WRITE
296 D: update database
297 S: upd
298 H: This command uses the --audio_file_dir option of para_server to
299 H: locate your audio files. New files are then added to the mysql
300 H: database. Use this command if you got new files or if you have
301 H: moved some files around.
302 ---
303 N: us
304 P: DB_READ | DB_WRITE
305 D: update lastplayed time
306 S: us name
307 H: Update lastplayed time without actually playing the thing.
308 ---
309 N: verb
310 P: DB_READ | DB_WRITE
311 D: send verbatim sql query
312 S: verb cmd
313 H: Send cmd to mysql server. For expert/debugging only. Note that cmd
314 H: usually must be escaped. Use only if you know what you are doing!
315 ---
316 N: vrfy
317 P: DB_READ
318 D: list invalid entries in database
319 S: vrfy
320 H: Show what clean would delete. Run 'upd' before this command to make
321 H: sure your database is up to date.
322 ---