Skip to content

Commit

Permalink
Updated --help output and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisn committed Sep 30, 2023
1 parent a6392d7 commit 617de51
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ Disable status messages.
#### `--input-filename`, `-i <filename>`

Input filename, which should be a MP3, WAV, FLAC, Ogg Vorbis, or Opus audio file, or a
binary waveform data file. By default, audiowaveform uses the file
binary or JSON format waveform data file. By default, audiowaveform uses the file
extension to decide how to read the input file (either .mp3, .wav, .flac, .ogg,
.oga, .opus, or .dat, as appropriate), but this can be overridden by the
.oga, .opus, .dat, or .json as appropriate), but this can be overridden by the
`--input-format` option. If the `--input-filename` option is `-` or
is omitted, audiowaveform reads from standard input, and the
`--input-format` option must be used to specify the data format.
Expand All @@ -313,7 +313,7 @@ by the `--output-format` option. If the `--output-filename` option is

#### `--input-format <format>`

Input data format, either `wav`, `mp3`, `flac`, `ogg`, `opus`, or `dat`.
Input data format, either `wav`, `mp3`, `flac`, `ogg`, `opus`, `dat`, or `json`.
This option must be used when reading from standard input. It may also be used to set
the input file format, instead of it being determined from the file extension
from the `--input-filename` option.
Expand Down
21 changes: 11 additions & 10 deletions doc/audiowaveform.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH audiowaveform 1 "9 August 2023"
.TH audiowaveform 1 "30 September 2023"

.SH NAME

Expand Down Expand Up @@ -56,12 +56,12 @@ Disable status messages.
.TP
.B --input-filename\fR, \fB-i\fR <filename>
Input filename, which should be a MP3, WAV, FLAC, Ogg Vorbis, or Opus audio file,
or a binary waveform data file. By default, \fBaudiowaveform\fR uses the file
extension to decide how to read the input file (either .mp3, .wav, .flac, .ogg,
\&.oga, .opus, or .dat, as appropriate), but this can be overridden by the
\fB--input-format\fR option. If the \fB--input-filename\fR option is \fB-\fR or
is omitted, \fBaudiowaveform\fR reads from standard input, and the
\fB--input-format\fR option must be used to specify the data format.
or a binary or JSON format waveform data file. By default, \fBaudiowaveform\fR
uses the file extension to decide how to read the input file (either .mp3, .wav,
\&.flac, .ogg, .oga, .opus, .dat, or .json as appropriate), but this can be
overridden by the \fB--input-format\fR option. If the \fB--input-filename\fR
option is \fB-\fR or is omitted, \fBaudiowaveform\fR reads from standard input,
and the \fB--input-format\fR option must be used to specify the data format.

Note that Opus support requires libsndfile 1.0.29 or later, so may not be
available on all systems.
Expand All @@ -79,9 +79,10 @@ by the \fB--output-format\fR option. If the \fB--output-filename\fR option is
.TP
.B --input-format\fR <format>
Input data format, either \fBwav\fR, \fBmp3\fR, \fBflac\fR, \fBogg\fR,
\fBopus\fR, or \fBdat\fR. This option must be used when reading from standard
input. It may also be used to set the input file format, instead of it being
determined from the file extension from the \fB--input-filename\fR option.
\fBopus\fR, \fBdat\fR, or \fBjson\fR. This option must be used when reading
from standard input. It may also be used to set the input file format, instead
of it being determined from the file extension from the \fB--input-filename\fR
option.

.TP
.B --output-format\fR <format>
Expand Down
8 changes: 4 additions & 4 deletions src/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ bool Options::parseCommandLine(int argc, const char* const* argv)
"input-filename,i",
po::value<std::string>(&input_filename_),
FileFormat::isSupported(FileFormat::Opus) ?
"input file name (.mp3, .wav, .flac, .ogg, .oga, .opus, .dat)" :
"input file name (.mp3, .wav, .flac, .ogg, .oga, .dat)"
"input file name (.mp3, .wav, .flac, .ogg, .oga, .opus, .dat, .json)" :
"input file name (.mp3, .wav, .flac, .ogg, .oga, .dat, .json)"
)(
"output-filename,o",
po::value<std::string>(&output_filename_),
Expand All @@ -139,8 +139,8 @@ bool Options::parseCommandLine(int argc, const char* const* argv)
"input-format",
po::value<std::string>(&input_format_),
FileFormat::isSupported(FileFormat::Opus) ?
"input file format (mp3, wav, flac, ogg, opus, dat)" :
"input file format (mp3, wav, flac, ogg, dat)"
"input file format (mp3, wav, flac, ogg, opus, dat, json)" :
"input file format (mp3, wav, flac, ogg, dat, json)"
)(
"output-format",
po::value<std::string>(&output_format_),
Expand Down

0 comments on commit 617de51

Please sign in to comment.