1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Update ezstream-file(1) for new command line arguments

This commit is contained in:
Moritz Grimm 2015-05-15 22:47:19 +02:00
parent e529726e50
commit 1d02b841f0
2 changed files with 18 additions and 25 deletions

View File

@ -21,7 +21,7 @@
.Sh SYNOPSIS
.Nm
.Bk -words
.Op Fl hmnqVv
.Op Fl hqrVv
.Op Fl T Ar cfg_template
.Op Ar
.Ek
@ -42,7 +42,7 @@ command line argument, or the
environment variable.
.Pp
The configuration template must be a valid playlist configuration, and contain
the follwing configuration statement:
the follwing configuration statement inside the \&<media\ /\&> block:
.Bd -literal -offset indent
\&<filename\&>%FILENAME%\&</filename\&>
.Ed
@ -60,18 +60,6 @@ binary.
.It Fl h
Print a summary of available command line parameters with short descriptions
and exit.
.It Fl m
.Po
Passed to
.Nm ezstream .
.Pc
Disable all metadata updates and keep existing metadata in streams untouched.
.It Fl n
.Po
Passed to
.Nm ezstream .
.Pc
Normalize metadata strings by removing excess whitespaces.
.It Fl q
.Po
Passed to
@ -79,6 +67,14 @@ Passed to
.Pc
Be more quiet.
Suppress the output that external programs send to standard error.
.It Fl r
.Po
Passed to
.Nm ezstream .
.Pc
Show a real-time stream status information line on standard output.
Implies
.Fl q .
.It Fl T Ar cfg_template
Use the configuration in
.Ar cfg_template ,

View File

@ -21,10 +21,10 @@
_myname="$(basename $0)"
_filename_placeholder="%FILENAME%"
_opt_string="hmnqT:Vv"
_opt_string="hqrT:Vv"
print_usage()
{
echo "usage: ${_myname} [-hmnqVv] [-T cfg_template] [file ...]" >&2
echo "usage: ${_myname} [-hqrVv] [-T cfg_template] [file ...]" >&2
}
print_usage_help()
@ -32,23 +32,22 @@ print_usage_help()
cat << __EOT >&2
-h print this help and exit
-m [ezstream] disable metadata updates
-n [ezstream] normalize metadata strings
-q [ezstream] suppress STDERR output from external en-/decoders
-r [ezstream] show real-time stream information on stdout
-T template run ezstream using template for configuration
-V print the version number and exit
-v [ezstream] verbose output (use twice for more effect)
The configuration template must contain the configuration statement
<filename>${_filename_placeholder}</filename>
inside the <media /> block.
See the ezstream-file.sh(1) manual for detailed information.
__EOT
}
_metadisable=""
_normalize=""
_quiet=""
_rtstatus=""
_verbose=""
_cfg_template="${EZSTREAM_TEMPLATE}"
@ -66,12 +65,10 @@ do
print_usage_help
exit 0
;;
-m)
_metadisable="-m"; shift ;;
-n)
_normalize="-n"; shift ;;
-q)
_quiet="-q"; shift ;;
-r)
_rtstatus="-r"; shift ;;
-T)
_cfg_template="$2"; shift; shift ;;
-V)
@ -144,6 +141,6 @@ else
done
fi
${EZSTREAM} ${_metadisable} ${_normalize} ${_quiet} ${_verbose} -c "${_cfg}"
${EZSTREAM} ${_quiet} ${_rtstatus} ${_verbose} -c "${_cfg}"
exit $?