kjkjava / garmin-connect-export

Download a copy of your Garmin Connect data, including stats and GPX tracks.
MIT License
314 stars 134 forks source link

suggestion for adding lib argparse and optional unzip #4

Closed lefty01 closed 8 years ago

lefty01 commented 8 years ago

using argparse which changes the existing interface. interface could be kept in place (i.e. requiring the 1, 2, or three arguments) but decided it might be better to have these switches so one could for example only specify a directory without need to to have a count and format. eg. ./gcexport.py -d MyActivities/ instead of ./gcexport.py 1 origin MyActivities/ as additional benefit help page (-h|--help) is automatically generated. in case of format origin one can use -u|--unzip to unzip the zip file and then the .zip will be removed (the check for existing file is extended for the unzipped .fit filename)

feel free to merge some stuff or ignore if you not like it ;)

kjkjava commented 8 years ago

Looks like a great change! I'll review this in detail in a little bit, but I like the idea of using argparse. Thank you!

yohcop commented 8 years ago

:+1: ! Much nicer interface, and nice to have --help as well.

kjkjava commented 8 years ago

Sorry I'm just now getting around to reviewing this. I've been busy working on my dissertation! In any case, I made a few minor changes, mainly just to be consistent with the rest of the code. Feel free to comment on any of my proposed changes. Likewise, I have a question or two I'll comment on in-line. Thanks again!

kjkjava commented 8 years ago

Merged. Thanks!