TachoFitConverter/convertAllFits.py

17 lines
431 B
Python
Raw Permalink Normal View History

2024-10-25 21:57:14 +02:00
from fit2gpx import Converter
from os import listdir
from os.path import isfile, join
mypath='/container/directory'
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
conv = Converter()
for f in onlyfiles:
if "activity_uncompleted" in f:
print(" Ignore" + f)
elif f.endswith(".fit"):
print(mypath+'/'+f)
gpx = conv.fit_to_gpx(f_in=mypath+'/'+f, f_out=mypath+'/'+f+'test.gpx')