mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Merge pull request #869 from JasonLG1979/clarify-arg-descriptions
Improve command line option description grammar
This commit is contained in:
commit
f21c25a257
1 changed files with 18 additions and 18 deletions
36
src/main.rs
36
src/main.rs
|
@ -248,7 +248,7 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
).optopt(
|
).optopt(
|
||||||
"",
|
"",
|
||||||
SYSTEM_CACHE,
|
SYSTEM_CACHE,
|
||||||
"Path to a directory where system files (credentials, volume) will be cached. Can be different from cache option value.",
|
"Path to a directory where system files (credentials, volume) will be cached. May be different from the cache option value.",
|
||||||
"PATH",
|
"PATH",
|
||||||
).optopt(
|
).optopt(
|
||||||
"",
|
"",
|
||||||
|
@ -257,7 +257,7 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
"SIZE"
|
"SIZE"
|
||||||
).optflag("", DISABLE_AUDIO_CACHE, "Disable caching of the audio data.")
|
).optflag("", DISABLE_AUDIO_CACHE, "Disable caching of the audio data.")
|
||||||
.optopt("n", NAME, "Device name.", "NAME")
|
.optopt("n", NAME, "Device name.", "NAME")
|
||||||
.optopt("", DEVICE_TYPE, "Displayed device type.", "TYPE")
|
.optopt("", DEVICE_TYPE, "Displayed device type. Defaults to 'Speaker'.", "TYPE")
|
||||||
.optopt(
|
.optopt(
|
||||||
BITRATE,
|
BITRATE,
|
||||||
"bitrate",
|
"bitrate",
|
||||||
|
@ -270,14 +270,14 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
"Run PROGRAM when a playback event occurs.",
|
"Run PROGRAM when a playback event occurs.",
|
||||||
"PROGRAM",
|
"PROGRAM",
|
||||||
)
|
)
|
||||||
.optflag("", EMIT_SINK_EVENTS, "Run program set by --onevent before sink is opened and after it is closed.")
|
.optflag("", EMIT_SINK_EVENTS, "Run PROGRAM set by --onevent before sink is opened and after it is closed.")
|
||||||
.optflag("v", VERBOSE, "Enable verbose output.")
|
.optflag("v", VERBOSE, "Enable verbose output.")
|
||||||
.optflag("V", VERSION, "Display librespot version string.")
|
.optflag("V", VERSION, "Display librespot version string.")
|
||||||
.optopt("u", USERNAME, "Username to sign in with.", "USERNAME")
|
.optopt("u", USERNAME, "Username used to sign in with.", "USERNAME")
|
||||||
.optopt("p", PASSWORD, "Password", "PASSWORD")
|
.optopt("p", PASSWORD, "Password used to sign in with.", "PASSWORD")
|
||||||
.optopt("", PROXY, "HTTP proxy to use when connecting.", "URL")
|
.optopt("", PROXY, "HTTP proxy to use when connecting.", "URL")
|
||||||
.optopt("", AP_PORT, "Connect to AP with specified port. If no AP with that port are present fallback AP will be used. Available ports are usually 80, 443 and 4070.", "PORT")
|
.optopt("", AP_PORT, "Connect to an AP with a specified port. If no AP with that port is present a fallback AP will be used. Available ports are usually 80, 443 and 4070.", "PORT")
|
||||||
.optflag("", DISABLE_DISCOVERY, "Disable discovery mode.")
|
.optflag("", DISABLE_DISCOVERY, "Disable zeroconf discovery mode.")
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
BACKEND,
|
BACKEND,
|
||||||
|
@ -287,7 +287,7 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
DEVICE,
|
DEVICE,
|
||||||
"Audio device to use. Use '?' to list options if using alsa, portaudio or rodio.",
|
"Audio device to use. Use '?' to list options if using alsa, portaudio or rodio. Defaults to the backend's default.",
|
||||||
"NAME",
|
"NAME",
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
|
@ -299,10 +299,10 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
DITHER,
|
DITHER,
|
||||||
"Specify the dither algorithm to use - [none, gpdf, tpdf, tpdf_hp]. Defaults to 'tpdf' for formats S16, S24, S24_3 and 'none' for other formats.",
|
"Specify the dither algorithm to use {none|gpdf|tpdf|tpdf_hp}. Defaults to 'tpdf' for formats S16, S24, S24_3 and 'none' for other formats.",
|
||||||
"DITHER",
|
"DITHER",
|
||||||
)
|
)
|
||||||
.optopt("m", MIXER_TYPE, "Mixer to use {alsa|softvol}.", "MIXER")
|
.optopt("m", MIXER_TYPE, "Mixer to use {alsa|softvol}. Defaults to softvol", "MIXER")
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
"mixer-name", // deprecated
|
"mixer-name", // deprecated
|
||||||
|
@ -312,7 +312,7 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
ALSA_MIXER_CONTROL,
|
ALSA_MIXER_CONTROL,
|
||||||
"Alsa mixer control, e.g. 'PCM' or 'Master'. Defaults to 'PCM'.",
|
"Alsa mixer control, e.g. 'PCM', 'Master' or similar. Defaults to 'PCM'.",
|
||||||
"NAME",
|
"NAME",
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
|
@ -348,13 +348,13 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
ZEROCONF_PORT,
|
ZEROCONF_PORT,
|
||||||
"The port the internal server advertised over zeroconf uses.",
|
"The port the internal server advertises over zeroconf.",
|
||||||
"PORT",
|
"PORT",
|
||||||
)
|
)
|
||||||
.optflag(
|
.optflag(
|
||||||
"",
|
"",
|
||||||
ENABLE_VOLUME_NORMALISATION,
|
ENABLE_VOLUME_NORMALISATION,
|
||||||
"Play all tracks at the same volume.",
|
"Play all tracks at approximately the same apparent volume.",
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
|
@ -377,19 +377,19 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
NORMALISATION_THRESHOLD,
|
NORMALISATION_THRESHOLD,
|
||||||
"Threshold (dBFS) to prevent clipping. Defaults to -2.0.",
|
"Threshold (dBFS) at which the dynamic limiter engages to prevent clipping. Defaults to -2.0.",
|
||||||
"THRESHOLD",
|
"THRESHOLD",
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
NORMALISATION_ATTACK,
|
NORMALISATION_ATTACK,
|
||||||
"Attack time (ms) in which the dynamic limiter is reducing gain. Defaults to 5.",
|
"Attack time (ms) in which the dynamic limiter reduces gain. Defaults to 5.",
|
||||||
"TIME",
|
"TIME",
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
NORMALISATION_RELEASE,
|
NORMALISATION_RELEASE,
|
||||||
"Release or decay time (ms) in which the dynamic limiter is restoring gain. Defaults to 100.",
|
"Release or decay time (ms) in which the dynamic limiter restores gain. Defaults to 100.",
|
||||||
"TIME",
|
"TIME",
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
|
@ -401,7 +401,7 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
.optopt(
|
.optopt(
|
||||||
"",
|
"",
|
||||||
VOLUME_CTRL,
|
VOLUME_CTRL,
|
||||||
"Volume control type {cubic|fixed|linear|log}. Defaults to log.",
|
"Volume control scale type {cubic|fixed|linear|log}. Defaults to log.",
|
||||||
"VOLUME_CTRL"
|
"VOLUME_CTRL"
|
||||||
)
|
)
|
||||||
.optopt(
|
.optopt(
|
||||||
|
@ -423,7 +423,7 @@ fn get_setup(args: &[String]) -> Setup {
|
||||||
.optflag(
|
.optflag(
|
||||||
"",
|
"",
|
||||||
PASSTHROUGH,
|
PASSTHROUGH,
|
||||||
"Pass raw stream to output, only works for pipe and subprocess.",
|
"Pass a raw stream to the output. Only works with the pipe and subprocess backends.",
|
||||||
);
|
);
|
||||||
|
|
||||||
let matches = match opts.parse(&args[1..]) {
|
let matches = match opts.parse(&args[1..]) {
|
||||||
|
|
Loading…
Reference in a new issue