Default output filename
scls19fr opened this issue · 3 comments
Hi Tom,
when no output file is given by default filename should have same name (without extension) than input
python bin/igc2kmz.py -i examples/MyTrack.igc
should output MyTrack.kmz (instead of igc2kmz.kmz)
fileName, fileExtension = os.path.splitext('/path/to/somefile.ext')
could help
I also wonder why using this -i flag (option and not 1 positional argument).
A flag could be use to define if this positional argument is a IGC filename, an URL ...
You might have a look at click http://click.pocoo.org/
it's a very convenient package for CLI parsing.
Sébastien
The -i
flag is there so that multiple IGC input files can be specified and have their tracks in the same file. When there are multiple input files, igc2kmz
computes the ranges of various parameters (e.g. speed, climb rate, altitude) across all input files, so that they are directly comparable.
If you want to use click, please submit a pull request. Note that igc2kmz
is very old code (written in 2008, based on igc2kmz.rb, written even earlier).
Thanks Tom for this enhancement