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