From 1446f99e3adc59d868726382a2ac7cec105372a7 Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 28 Jan 2007 22:27:46 +0100 Subject: [PATCH] rename "synopsis" to "usage". --- audiod.cmd | 20 ++++++------ audiod.h | 2 +- audiod_command.c | 2 +- command.c | 2 +- command_util.sh | 18 +++++----- mysql_selector.cmd | 76 +++++++++++++++++++++---------------------- playlist_selector.cmd | 4 +-- random_selector.cmd | 2 +- server.cmd | 34 +++++++++---------- server.h | 2 +- 10 files changed, 81 insertions(+), 81 deletions(-) diff --git a/audiod.cmd b/audiod.cmd index 61143a04..8300e441 100644 --- a/audiod.cmd +++ b/audiod.cmd @@ -7,13 +7,13 @@ SN: list of audiod commands --- N: cycle D: switch to next mode -S: cycle +U: cycle H: on -> standby -> off -> on --- N: grab D: grab the audio stream L: -S: -- grab [grab_options] +U: -- grab [grab_options] H: grab ('splice') the audio stream at any position in the filter H: chain and send that data back to the client. Try H: para_audioc -- grab -h @@ -21,7 +21,7 @@ H: for the list of available options. --- N: help D: display command list or help for given command -S: help [command] +U: help [command] H: When I was younger, so much younger than today, I never needed anybody's help H: in any way. But now these days are gone, I'm not so self assured. Now I find H: I've changed my mind and opened up the doors. @@ -29,36 +29,36 @@ H: -- Beatles: Help --- N: kill D: kill an active audiod task -S: kill task_id [task_id ...] +U: kill task_id [task_id ...] H: call sched_unregister() and the event_handler of the given task(s) --- N: off D: deactivate para_audiod -S: off +U: off H: Close connection to para_server and stop all decoders. --- N: on D: activate para_audiod -S: on +U: on H: Establish connection to para_server, retrieve para_server's current status. If H: playing, start corresponding decoder. Otherwise stop all decoders. --- N: sb D: enter standby mode -S: sb +U: sb H: Stop all decoders but leave connection to para_server open. --- N: stat D: print status information -S: stat [item1 ...] +U: stat [item1 ...] H: Dump given status items (all if none given) to stdout. --- N: tasks D: list current tasks -S: tasks +U: tasks H: print the list of task ids together with the status of each task --- N: term D: terminate audiod -S: term +U: term H: Stop all decoders, shut down connection to para_server and exit. diff --git a/audiod.h b/audiod.h index ec8290b0..8ead3344 100644 --- a/audiod.h +++ b/audiod.h @@ -55,7 +55,7 @@ struct audiod_command { /** one-line description of the command */ const char *description; /** summary of the command line options */ - const char *synopsis; + const char *usage; /** the long help text */ const char *help; }; diff --git a/audiod_command.c b/audiod_command.c index 5d401251..2fa7eb14 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -176,7 +176,7 @@ int com_help(int fd, int argc, char **argv) "DESCRIPTION\n%s\n", argv[1], audiod_cmds[i].description, - audiod_cmds[i].synopsis, + audiod_cmds[i].usage, audiod_cmds[i].help ); ret = client_write(fd, buf); diff --git a/command.c b/command.c index 93e664e6..928990e6 100644 --- a/command.c +++ b/command.c @@ -519,7 +519,7 @@ int com_help(int fd, int argc, char **argv) cmd->description, handler, perms, - cmd->synopsis, + cmd->usage, cmd->help ); free(perms); diff --git a/command_util.sh b/command_util.sh index 5119f58b..326bb032 100755 --- a/command_util.sh +++ b/command_util.sh @@ -15,7 +15,7 @@ dump_array_member() echo ".perms = $perms_txt," fi echo ".description = \"$desc_txt\"," - echo ".synopsis = \"$syn_txt\"," + echo ".usage = \"$usage_txt\"," echo ".help = " echo "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g' echo '},' @@ -68,7 +68,7 @@ read_one_command() name_txt="" desc_txt="" - syn_txt="" + usage_txt="" help_txt="" perms_txt="" line_handler=0 @@ -90,8 +90,8 @@ read_one_command() L:) line_handler=1 ;; - S:) - syn_txt="$value" + U:) + usage_txt="$value" ;; H:) help_txt="${value}" @@ -107,12 +107,12 @@ ${line# }" ;; esac done - if test -n "$name_txt" -a -n "$desc_txt" -a -n "$syn_txt" \ + if test -n "$name_txt" -a -n "$desc_txt" -a -n "$usage_txt" \ -a -n "$help_txt"; then ret=1 return fi - if test -z "$name_txt" -a -z "$desc_txt" -a -z "$syn_txt" \ + if test -z "$name_txt" -a -z "$desc_txt" -a -z "$usage_txt" \ -a -z "$help_txt"; then ret=0 return @@ -122,7 +122,7 @@ ${line# }" echo "!ERROR!" echo "N: $name_txt" echo "D: $desc_txt" - echo "S: $syn_txt" + echo "S: $usage_txt" echo "P: $perms_txt" echo "H: $help_txt" } @@ -132,7 +132,7 @@ dump_man() echo ".SS \"$name_txt\"" echo "$desc_txt" echo - echo "\\fBusage: \\fP$syn_txt" + echo "\\fBusage: \\fP$usage_txt" echo echo "$help_txt" echo @@ -195,7 +195,7 @@ dump_proto() echo ' * \param cmdline the full command line' fi echo ' * ' - echo " * synopsis: $syn_txt" + echo " * usage: $usage_txt" echo ' * ' echo "$help_txt" | sed -e 's/^/ * /g' echo ' */' diff --git a/mysql_selector.cmd b/mysql_selector.cmd index e1ea3f76..df88a220 100644 --- a/mysql_selector.cmd +++ b/mysql_selector.cmd @@ -8,14 +8,14 @@ SN: list of mysql selector commands N: cam P: DB_READ | DB_WRITE D: copy all metadata -S: cam source dest1 [dest2 ...] +U: cam source dest1 [dest2 ...] H: Copy attributes and other meta data from source file to destination H: file(s). Useful for files that have been renamed. --- N: cdb P: DB_READ | DB_WRITE D: create database -S: cdb [name] +U: cdb [name] H: H: Create database name containing the initial columns for basic H: interoperation with server. This command has to be used only once @@ -26,7 +26,7 @@ H: The optional name defaults to 'paraslash' if not given. N: clean P: DB_READ | DB_WRITE D: nuke invalid entries in database -S: clean +U: clean H: If the vrfy command shows you any invalid entries in your database, H: you can get rid of them with clean. Always run 'upd' and 'vrfy' H: before running this command. Use with caution! @@ -34,59 +34,59 @@ H: before running this command. Use with caution! N: cs P: VSS_WRITE | DB_READ | DB_WRITE D: change stream -S: cs [s] +U: cs [s] H: Selects stream s or prints current stream when s was not given. --- N: csp P: VSS_WRITE | DB_READ D: change stream and play -S: csp s +U: csp s H: Select stream s and start playing. If this results in a H: stream-change, skip rest of current audio file. --- N: da P: DB_READ | DB_WRITE D: drop attribute from database -S: da att +U: da att H: Use with caution. All info on attribute att will be lost. --- N: hist P: DB_READ D: print history -S: hist +U: hist H: Print list of all audio files together with number of days since H: each file was last played. --- N: info P: DB_READ D: print database info -S: info [af] +U: info [af] H: print database informations for audio file af. Current audio file H: is used if af is not given. --- N: la P: DB_READ D: list attributes -S: la [af] +U: la [af] H: List attributes of audio file af or of current audio file when H: invoked without arguments. --- N: laa P: DB_READ D: list available attributes -S: laa +U: laa H: print list of all attributes defined in the database --- N: last P: DB_READ D: print list of audio files, ordered by lastplayed time -S: last [n] +U: last [n] H: The optional number n defaults to 10 if not specified. --- N: ls P: DB_READ D: list all audio files that match a LIKE pattern -S: ls [pattern] +U: ls [pattern] H: If pattern was not given, print list of all audio files known H: to the mysql selector. See the documentation of mysql H: for the definition of LIKE patterns. @@ -94,7 +94,7 @@ H: for the definition of LIKE patterns. N: mbox P: DB_READ D: dump audio file list in mbox format -S: mbox [p] +U: mbox [p] H: Dump list of audio files in mbox format (email) to stdout. If H: the optional pattern p is given, only those audio files, H: whose basename match p are going to be included. Otherwise, @@ -122,7 +122,7 @@ H: these files are admissable or does whatever thou wilt. N: mv P: DB_READ | DB_WRITE D: rename entry in database -S: mv oldname newname +U: mv oldname newname H: Rename oldname to newname. This updates the data table to reflect H: the new name. All internal data (numplayed, lastplayed, picid,..) H: is kept. If newname is a full path, the dir table is updated as @@ -131,7 +131,7 @@ H: well. N: na P: DB_READ | DB_WRITE D: add new attribute to database -S: na att +U: na att H: This adds a column named att to your mysql database. att should H: only contain letters and numbers, in paricular, '+' and '-' are H: not allowed. @@ -139,7 +139,7 @@ H: not allowed. N: ne P: DB_READ | DB_WRITE D: add new database entries -S: ne file1 [file2 [...]] +U: ne file1 [file2 [...]] H: Add the given filename(s) to the database, where file1,... must H: be full path names. This command might be much faster than 'upd' H: if the number of given files is small. @@ -147,13 +147,13 @@ H: if the number of given files is small. N: ns P: VSS_WRITE | DB_READ | DB_WRITE D: change to next stream -S: ns +U: ns H: Cycle forwards through stream list. --- N: pic P: DB_READ D: get picture by name or by identifier -S: pic [name] +U: pic [name] H: Dump jpg image that is associated to given audio file (current H: audio file if not specified) to stdout. If name starts with H: '#' it is interpreted as an identifier instead and the picture @@ -166,7 +166,7 @@ H: para_client pic '#123' > pic123.jpg N: picadd P: DB_READ | DB_WRITE D: add picture to database -S: picadd [picname] +U: picadd [picname] H: Read jpeg file from stdin and store it as picname in database. H: H: EXAMPLE @@ -176,44 +176,44 @@ H: para_client picadd foo.jpg < foo.jpg N: picass P: DB_READ | DB_WRITE D: associate a picture to file(s) -S: picass pic_id file1 [file2...] +U: picass pic_id file1 [file2...] H: Associate the picture given by pic_id to all given files. --- N: picch P: DB_READ | DB_WRITE D: change name of picture -S: picch id new_name +U: picch id new_name H: Asign new_name to picture with identifier id. --- N: picdel P: DB_READ | DB_WRITE D: delete picture from database -S: picdel id1 [id2...] +U: picdel id1 [id2...] H: Delete each given picture from database. --- N: piclist P: DB_READ D: print list of pictures -S: piclist +U: piclist H: Print id, name and length of each picture contained in the H: database. --- N: ps P: VSS_WRITE | DB_READ | DB_WRITE D: change to previous stream -S: ps +U: ps H: Cycle backwards through stream list. --- N: rm P: DB_READ | DB_WRITE D: remove entries from database -S: rm name1 [name2 [...]] +U: rm name1 [name2 [...]] H: Remove name1, name2, ... from the data table. Use with caution. --- N: sa P: DB_READ | DB_WRITE D: set/unset attributes -S: sa at1<'+' | '-'> [at2<'+' | '-'> ] [af1 ...] +U: sa at1<'+' | '-'> [at2<'+' | '-'> ] [af1 ...] H: Set ('+') or unset ('-') attribute at1, at2 etc. for given list of H: audio files. If no audio files were given the current audio file is H: used. Example: @@ -226,7 +226,7 @@ H: attribute. N: skip P: DB_READ | DB_WRITE D: skip subsequent audio files(s) -S: skip n [s] +U: skip n [s] H: Skip the next n audio files of stream s. This is equivalent to the H: command 'sl n s', followed by 'us name' for each name the output of H: sl. @@ -234,7 +234,7 @@ H: sl. N: sl P: DB_READ D: print score list -S: sl n [s] +U: sl n [s] H: Print sorted list of maximal n lines. Each line is an admissible H: entry with respect to stream s. The list is sorted by score-value H: which is given by the definition of s. If s is not given, the @@ -247,14 +247,14 @@ H: shows you the audio file the server would select right now. N: snp P: DB_READ | DB_WRITE D: set numplayed -S: snp number af1 [af2 ...] +U: snp number af1 [af2 ...] H: Update the numplayed field in the data table for all given audio H: files. --- N: stradd P: DB_READ | DB_WRITE D: add stream -S: stradd s +U: stradd s H: Add stream s to the list of available streams. The stream H: definition for s is read from stdin and is then sent to H: para_server. Example: @@ -268,34 +268,34 @@ H: does not contain the string 'Madonna'. N: strdel P: DB_READ | DB_WRITE D: delete stream -S: strdel s +U: strdel s H: Remove stream s from database. --- N: streams P: DB_READ D: list streams -S: streams +U: streams H: Print list of available streams. Use 'cs' to switch to any of H: these. --- N: strq P: DB_READ D: query stream definition -S: strq [s] +U: strq [s] H: Print definition of stream s to stdout. Use current stream if s was H: not given. --- N: summary P: DB_READ D: list attributes -S: summary +U: summary H: Print a list of attributes together with number of audio H: files having that attribute set. --- N: upd P: DB_READ | DB_WRITE D: update database -S: upd +U: upd H: This command uses the --audio_file_dir option of para_server to H: locate your audio files. New files are then added to the mysql H: database. Use this command if you got new files or if you have @@ -304,20 +304,20 @@ H: moved some files around. N: us P: DB_READ | DB_WRITE D: update lastplayed time -S: us name +U: us name H: Update lastplayed time without actually playing the thing. --- N: verb P: DB_READ | DB_WRITE D: send verbatim sql query -S: verb cmd +U: verb cmd H: Send cmd to mysql server. For expert/debugging only. Note that cmd H: usually must be escaped. Use only if you know what you are doing! --- N: vrfy P: DB_READ D: list invalid entries in database -S: vrfy +U: vrfy H: Show what clean would delete. Run 'upd' before this command to make H: sure your database is up to date. --- diff --git a/playlist_selector.cmd b/playlist_selector.cmd index d57e2d0b..f829028a 100644 --- a/playlist_selector.cmd +++ b/playlist_selector.cmd @@ -8,13 +8,13 @@ SN: list of playlist selector commands N: ppl P: DB_READ D: print playlist -S: ppl +U: ppl H: Print out the current playlist --- N: lpl P: DB_WRITE D: load playlist -S: lpl +U: lpl H: Read a new playlist from stdin. Example: H: find /audio -name '*.mp3' | para_client lpl --- diff --git a/random_selector.cmd b/random_selector.cmd index 592a0d59..fe3ef724 100644 --- a/random_selector.cmd +++ b/random_selector.cmd @@ -8,5 +8,5 @@ SN: list of random selector commands N: random_info P: 0 D: about the random audio file selector -S: random_info +U: random_info H: The random selector chooses files randomly out of the given directory. diff --git a/server.cmd b/server.cmd index a1569579..71ed6d9e 100644 --- a/server.cmd +++ b/server.cmd @@ -8,14 +8,14 @@ SN: list of server commands N: chs P: DB_READ | DB_WRITE D: change the current audio file selector -S: chs [new_selector] +U: chs [new_selector] H: Shutdown the current selector and activate new_selector. If no H: argument was given, print the name of the current selector. --- N: ff P: VSS_READ | VSS_WRITE D: jump amount of time forwards or backwards in current audio file -S: ff n[-] +U: ff n[-] H: Set the 'R' (reposition request) bit of the vss status flags H: and enqueue a request to jump n seconds forwards or backwards H: in the current audio file. @@ -29,7 +29,7 @@ H: jumps 30 seconds backwards. N: help P: 0 D: print help text -S: help [command] +U: help [command] H: Without any arguments, help prints a list of availible commands. When H: issued with a command name as first argument, print out a description H: for that command. @@ -37,14 +37,14 @@ H: for that command. N: hup P: VSS_WRITE D: force reload of config file, log file and user list -S: hup +U: hup H: Reread the config file and the user list file, close and reopen the log H: file, and tell all children to do the same. --- N: jmp P: VSS_READ | VSS_WRITE D: jump to given position in current audio file -S: jmp [n] +U: jmp [n] H: Set the 'R' (reposition request) bit of the vss status flags H: and enqueue a request to jump to n% of the current audio file, H: where 0 <= n <= 100. @@ -52,7 +52,7 @@ H: where 0 <= n <= 100. N: next P: VSS_READ | VSS_WRITE D: skip rest of current audio file -S: next +U: next H: Set the 'N' (next audio file) bit of the vss status flags. When H: playing, change audio file immediately. Equivalent to stop H: if paused, NOP if stopped. @@ -60,7 +60,7 @@ H: if paused, NOP if stopped. N: nomore P: VSS_READ | VSS_WRITE D: stop playing after current audio file -S: nomore +U: nomore H: Set the 'O' (no more) bit of the vss status flags. This instructs H: para_server to clear the 'P' (playing) bit as soon as it encounters H: the 'N' (next audio file) bit being set. @@ -70,20 +70,20 @@ H: sudden endings. N: pause P: VSS_READ | VSS_WRITE D: pause current audio file -S: pause +U: pause H: Clear the 'P' (playing) bit of the vss status flags. --- N: play P: VSS_READ | VSS_WRITE D: start playing or resume playing when paused -S: play +U: play H: Set the 'P' (playing) bit of the vss status flags. This H: results in starting/continuing to stream. --- N: sb P: VSS_READ D: print status bar for current audio file -S: sb [n] +U: sb [n] H: Without any arguments, sb continuously prints a status bar of the H: form H: @@ -96,7 +96,7 @@ H: after having displayed the status bar n times. N: sc P: VSS_READ D: print name of audio file whenever it changes -S: sc [n] +U: sc [n] H: sc prints exactly one line (the filename of the audio file H: being played) whenever the audio file changes. Stops after H: n iterations, or never if n is not specified. @@ -104,7 +104,7 @@ H: n iterations, or never if n is not specified. N: sender P: VSS_READ | VSS_WRITE D: control paraslash internal senders -S: sender [s cmd [arguments]] +U: sender [s cmd [arguments]] H: send command cmd to sender s. cmd may be one of the following: H: help, on, off, add, delete, allow, or deny. Note that not all senders H: support each command. Try e.g. 'para_client sender http help' for @@ -114,13 +114,13 @@ H: print out a list of all senders that are compiled in. N: si P: 0 D: print server info -S: si +U: si H: Print server uptime and other information. --- N: stat P: VSS_READ D: print status info for current audio file -S: stat [n] +U: stat [n] H: Without any arguments, stat continuously prints status messages H: about the audio file being streamed. Use the optional number n H: to let stat exit after having displayed status n times. @@ -128,19 +128,19 @@ H: to let stat exit after having displayed status n times. N: stop P: VSS_READ | VSS_WRITE D: stop playing -S: stop +U: stop H: Clear the 'P' (play) bit and set the 'N' bit of the vss status H: flags. --- N: term P: VSS_READ | VSS_WRITE D: terminate para_server -S: term +U: term H: Shuts down the server. Instead of this command, you can also send H: SIGINT or SIGTERM. It should never be necessary to send SIGKILL. --- N: version P: 0 D: print server's version -S: version +U: version H: Show version and other info diff --git a/server.h b/server.h index bd2b0500..dd5184f4 100644 --- a/server.h +++ b/server.h @@ -37,7 +37,7 @@ struct server_command { /** one-line description of the command */ const char *description; /** summary of the command line options */ - const char *synopsis; + const char *usage; /** the long help text */ const char *help; }; -- 2.39.2