GobySoft / goby3

The Goby Underwater Autonomy Project Version 3
Other
27 stars 11 forks source link

Support for multiple input files with goby log convert #326

Open jason-jaia opened 3 months ago

jason-jaia commented 3 months ago

I would like to be able to run goby log tool like so: "goby log convert *.goby --format=HDF5"

tsaubergine commented 3 months ago

The second (optional) command line positional parameter is "outfile":

goby log convert <input_file> [<output_file>] [options]

so there's no way to know the difference between multiple infiles and a specified outfile. I guess we could check for the .goby extension, but it seems trivial to just use a loop

for file in *.goby; do goby log convert $file --format=HDF5; done
jason-jaia commented 3 months ago

I agree it's trivial to script, but I guess I'm lazy. I also see your point that it breaks the structure of the command, so it seems like the effort/reward balance probably doesn't make sense.

SBFRF commented 2 months ago

for clarity, this for loop is bash