if (!f->help.short_help)
continue;
- printf_or_die("\nOptions for %s:", f->name);
+ printf_or_die("\nOptions for %s (%s):", f->name,
+ f->help.purpose);
ggo_print_help(&f->help, flags);
}
}
if (flags & GPH_PRINT_NAME_VERSION)
printf_or_die("%s\n", version_single_line(help->prefix));
+ if (help->purpose && (flags & GPH_PRINT_PURPOSE))
+ printf_or_die("\n%s\n", help->purpose);
if (help->usage && (flags & GPH_PRINT_USAGE))
printf_or_die("\n%s\n", help->usage);
if (help->description && (flags & GPH_PRINT_DESCRIPTION))
const char **short_help;
/** Like \a short_help, plus the \a details section. */
const char **detailed_help;
+ /** The purpose text as specified in the ggo file. */
+ const char *purpose;
/** Generated by gengetopt and exported via the *.cmdline.h file. */
const char *usage;
/** The description text given in the .ggo file. */
GPH_PRINT_USAGE = 1 << 2,
/** Print the description text. */
GPH_PRINT_DESCRIPTION = 1 << 3,
+ /** Print the purpose text. */
+ GPH_PRINT_PURPOSE = 1 << 4,
};
/** Used to print the normal help of programs (--help) */
#define GPH_STANDARD_FLAGS \
- (GPH_PRINT_NAME_VERSION | GPH_PRINT_USAGE)
+ (GPH_PRINT_NAME_VERSION | GPH_PRINT_PURPOSE | GPH_PRINT_USAGE)
/** Additional information for --detailed-help. */
#define GPH_STANDARD_FLAGS_DETAILED \
.prefix = #_prefix, \
.short_help = _prefix ## _args_info_help, \
.detailed_help = _prefix ## _args_info_detailed_help, \
+ .purpose = _prefix ## _args_info_purpose, \
.usage = _prefix ## _args_info_usage, \
.description = _prefix ## _args_info_description, \
}
args "--unamed-opts=audio_file --no-handle-version"
-include(header.m4)
-<qu>
-text "
-para_afh, the audio format handler tool, is a simple program for analyzing
-audio files. It prints technical information about the given audio file to
-stdout.
-"
-</qu>
+purpose "Print information about audio file(s)."
+include(header.m4)
include(loglevel.m4)
<qu>
args "--no-version --no-help"
+purpose "Make an audio stream from a local file."
+
description "
The afh (audio format handler) receiver can be used to write
selected parts of the given audio file without decoding
args "--no-version --no-help"
+purpose "Native ALSA output plugin."
+
include(header.m4)
<qu>
args "--no-version --no-help"
+purpose "Amplify the decoded audio stream."
+
option "amp" a
#~~~~~~~~~~~~~
"amplification value"
args "--no-version --no-help"
+purpose "Output plugin for libao."
+
include(header.m4)
<qu>
args "--unamed-opts=command --conf-parser --no-handle-version"
+purpose "Communicate with para_audiod through a local socket."
+
include(header.m4)
<qu>
option "socket" s
args "--no-handle-help --no-handle-version --conf-parser"
+purpose "Connect to para_server, receive, decode and play audio streams."
+
include(header.m4)
define(CURRENT_PROGRAM,para_audiod)
define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf)
args "--unamed-opts=command --no-handle-error --conf-parser --no-handle-version"
+purpose "Communicate with para_server through the paraslash control port."
+
include(header.m4)
define(CURRENT_PROGRAM,para_client)
define(DEFAULT_CONFIG_FILE,~/.paraslash/client.conf)
args "--no-version --no-help"
+purpose "Dynamically adjust the volume of an audio stream."
+
option "blocksize" b
#~~~~~~~~~~~~~~~~~~~
"adjust block size"
args "--no-version --no-help"
+purpose "Receive a DCCP audio stream."
+
option "host" i
"ip or host"
string default="localhost"
args "--conf-parser --no-handle-version"
+purpose "An alarm clock and volume-fader for OSS and ALSA."
+
include(header.m4)
define(CURRENT_PROGRAM,para_fade)
define(DEFAULT_CONFIG_FILE,~/.paraslash/fade.conf)
args "--no-version --no-help"
+purpose "Output plugin that writes to a local file."
+
option "filename" f
#~~~~~~~~~~~~~~~~~~
"specify output file name"
args "--no-handle-help --no-handle-version --conf-parser"
+purpose "Decode or process audio data from STDIN to STDOUT."
+
include(header.m4)
include(loglevel.m4)
<qu>
args "--conf-parser --no-handle-version"
+purpose "Show para_audiod status in a curses window."
+
include(header.m4)
define(CURRENT_PROGRAM,para_gui)
define(DEFAULT_CONFIG_FILE,~/.paraslash/gui.conf)
args "--no-version --no-help"
+purpose "Receive an HTTP audio stream."
+
include(header.m4)
<qu>
args "--no-version --no-help"
+purpose "Decode an mp3 stream."
+
include(header.m4)
<qu>
args "--no-version --no-help"
+purpose "Output plugin for the Open Sound System."
+
option "device" d
#~~~~~~~~~~~~~~~~
"set PCM device"
args "--no-version --no-help"
+purpose "Output plugin for Mac OS coreaudio."
+
section "osx options"
#####################
args "--unamed-opts=audio_file --no-handle-version --conf-parser --no-handle-help"
+purpose "Command line audio player."
+
description "para_play operates either in command mode or in insert
mode. In insert mode it presents a prompt and allows to enter commands
like stop, play, pause etc. In command mode the current audio file
args "--no-version --no-help"
+purpose "Delay processing of an audio stream."
+
option "duration" d
#~~~~~~~~~~~~~~~~~~
"prebuffer time"
args "--no-handle-help --no-handle-version"
+purpose "A command line HTTP/DCCP/UDP stream grabber."
+
include(header.m4)
include(loglevel.m4)
args "--no-version --no-help"
+purpose "Transform raw audio to a different sample rate."
+
include(header.m4)
option "converter" C
args "--conf-parser --no-handle-version"
+purpose "Manage and stream audio files."
+
include(header.m4)
define(CURRENT_PROGRAM,para_server)
define(DEFAULT_CONFIG_FILE,~/.paraslash/server.conf)
args "--no-version --no-help"
+purpose "Receive an UDP audio stream."
+
option "host" i
"ip or host to receive udp packets from"
string default="224.0.1.38"
args "--no-handle-help --no-handle-version"
+purpose "Play wav or raw audio."
+
include(header.m4)
include(loglevel.m4)
struct receiver *r = receivers + i;
if (!r->help.short_help)
continue;
- printf_or_die("\nOptions for %s:", r->name);
+ printf_or_die("\n%s: %s", r->name,
+ r->help.purpose);
ggo_print_help(&r->help, flags);
}
}
if (!w->help.short_help)
continue;
- printf_or_die("\nOptions for %s:", writer_names[i]);
+ printf_or_die("\n%s: %s", writer_names[i],
+ w->help.purpose);
ggo_print_help(&w->help, flags);
}
}