python-fitparse icon indicating copy to clipboard operation
python-fitparse copied to clipboard

CSV output support

Open buma opened this issue 7 years ago • 2 comments

I added simple CSV output support with python csv library. It is in my branch. If this would be something you would like I'll clean it up and add it properly.

Currently messages are read and saved in list. Then if csv output is requested message list is lopped over and field names are saved of all fields that have non None value. Then message list is read again and DictWriter is used with previously saved fields list to save fields as dictionaries with only keys that were previously found.

If verbose is used. Message list is read again and printed.

I'm not sure if it is better to save messages to list or read whole FIT file 3 times and if this is the best way to choose which field types do we want to save to CSV. This could also be configurable since I found that out of 10+ fields only 4 make sense in my monitor fit files.

buma avatar Dec 01 '17 15:12 buma

I would definitely be interested!

BerenV avatar Nov 07 '18 21:11 BerenV

Hello, I am looking for a program that converts a Garmin .fit file to .CSV. This program should be portable (without installation in Windows) and could be run from a command line type FitToCsv.exe, file.fit, file.csv. The information I need in this csv file is:

  • the date of the activity
  • the duration (HH: MM)
  • the distance in km
  • the elevation gain
  • Calories
  • average heart rate
  • maximum heart rate Thank you to inform me if a solution exists and or to develop. I was inspired by the GPXsee software. Cordially. Jean Marie

jmmid avatar Oct 31 '19 14:10 jmmid