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