amiaopensource / astataudit

Summarizing audio metrics via ffmpeg and bwfmetaedit
MIT License
3 stars 1 forks source link

Error parsing the parameters #1

Closed retokromer closed 2 years ago

retokromer commented 3 years ago

The commands

astataudit -c test.wav
astataudit -f test.wav
astataudit -x test.wav
astataudit -g test.wav

do not give the expected error messages

Option -c requires an argument
Option -f requires an argument
Option -x requires an argument
Option -g requires an argument

because test.wav is considered the parameter.

dericed commented 3 years ago

The help doc suggests 'y' or 'n' as the parameter to these options, but each requires an argument and your example provides one for each, though it doesn't use the expected vocabulary.

https://github.com/amiaopensource/astataudit/blob/2b61e49cd4b9bf86139494ee96b16008a4bcbea2/astataudit#L31-L34

imho, the expectation Option -c requires an argument is unfair as your example does provide an argument for the option. Perhaps a function could validate the parameter.

retokromer commented 3 years ago

Perhaps a function could validate the parameter.

Indeed, that is what I tried to say.

retokromer commented 3 years ago

Perhaps a function could validate the parameter.

Indeed, that is what I tried to say.

retokromer commented 3 years ago

Another solution could be to add -i (aut similia) for the sound file.

retokromer commented 2 years ago

Closing as there is no interest.