diff --git a/parseFitFiles.py b/parseFitFiles.py index 173c01d..ec24e81 100644 --- a/parseFitFiles.py +++ b/parseFitFiles.py @@ -41,7 +41,7 @@ def processFIT(filename): file = FitFile(path+filename) for record in file.get_messages("session"): ## nur wenn Radfahren - if record.get_value("sport") == "cycling": + if record.get_value("sport") == "cycling" or record.get_value("sport") == "e_biking": ## Verarbeitung starten doAll(file) @@ -61,6 +61,7 @@ def doAll(file): fitData["total_distance"] = round(record.get_value("total_distance") / 1000, 1) #fitData["date"] = record.get_value("start_time").strftime("%d.%m.%Y") fitData["date"] = record.get_value("start_time") + fitData["total_calories"] = record.get_value("total_calories") if record.get_value("max_altitude"): fitData["max_altitude"] = round(float(record.get_value("max_altitude")), 1) @@ -141,4 +142,4 @@ def deleteFiles(filename): if __name__ == '__main__': main() - \ No newline at end of file +