MediaArea / BWFMetaEdit

WAV/BWF metadata editor
https://MediaArea.net/BWFMetaEdit
Other
51 stars 19 forks source link

support method to report xml to stdout #238

Closed dericed closed 2 years ago

dericed commented 2 years ago

Currently bwfmetaedit --out-core-xml file.wav writes a sidecar file. bwfmetaedit --out-core-xml=file.xml file.wav writes to a specified file, but there's no way to get the xml without a temp file. Could we support --out-core-xml=- or something similar when wishing to avoid a temp file.

MarcosSueiro commented 2 years ago

I believe the new --out-xml outputs to stdout?

JeromeMartinez commented 2 years ago

with current PR version --out-xml outputs to stdout but older --out-core-xml outputs to sidecar file, so it is incoherent.

For avoiding a regression and be coherent it may be better that --out-xml outputs to sidecar file and --out-xml=- outputs to stdout.

Unfortunate but I am reluctant to break the compatibility and also reluctant to have something incoherent.

g-maxime commented 2 years ago

In --out-core-xml "core" is the output name and "xml" the format.

Maybe adding a name to the xml output, e.g.: --out-unified for stdout --out-unified-xml for sidecar XML file --out-unified-xml= for named XML file

or --out-xml --out-xml-xml --out-xml-xml=

MarcosSueiro commented 2 years ago

I like the idea of adding an "-" to signify stdout, it could then be applied to other outputs such as --out-core=- or --out-tech=-. Is this kind of grammar common to other CLIs?

dericed commented 2 years ago

I support --out-xml to stdout, rather than repeat the behavior of --out-core-xml. Possibly we can say in the next release that --out-core-xml is deprecated in favor of --out-xml.

JeromeMartinez commented 2 years ago

Possibly we can say in the next release that --out-core-xml is deprecated in favor of --out-xml.

That would be a smooth transition to something more classic, so fine for me.

And it does not prevent to support --out-core-xml=- for the legacy options.