fishion / StravaImporter

script to import tcx files (as exported by Endomondo) into Strava
24 stars 8 forks source link

Additional fix activities types #1

Closed slithy closed 3 years ago

slithy commented 3 years ago

Hi, this is a great utility, thank you!

I had to add a few extra activities to import all my data:

+  SKIING_CROSS_COUNTRY: "NordicSki",
+  SNOWSHOEING: "Snowshoe",
+  CROSSFIT: "Workout"

Cross country ski could also be back-country ski in Strava; Endomondo does not discriminate between different types of cross-country skiing.

I was using CROSSFIT in Endomondo for HIIT HIRT training at home, which I put as Workout in Strava.

Thanks again!

fishion commented 3 years ago

Thanks for feedback. Glad it was useful for you. Have added your suggestions to the mapping, though looks like there is a 'Crossfit' activity in strava so mapped CROSSFIT to that instead of 'Workout'

chadlwilson commented 3 years ago

I also have these additional ones at the moment, but not sure what sure what to map to - any suggestions to improve on the below?

  FITNESS_WALKING: "Walk",
  TREADMILL_WALKING: "Walk",
  STAIR_CLIMBING: "StairStepper",

Technically my stair climbing was on "real" stairs, however the main intent was for it to be a non-GPS activity so StairStepper is probably the closest....

Also not sure on TREADMILL_WALKING. There is VirtualRide but not VirtualWalk assuming https://developers.strava.com/docs/reference/#api-models-ActivityType is a complete enumeration....

slithy commented 3 years ago

Another candidate for TREADMILL_WALKING could be VirtualRun.

fishion commented 3 years ago

Thanks both. Have added these suggested mappings too

chadlwilson commented 3 years ago

Have a few more suggestions. Will submit a PR to make it easier if you'd like - just a bit busy to do so right this second.

 const SPORTMAP = {
+  AEROBICS: "Workout",
   BIKING: "Ride",
   CROSSFIT: "Crossfit",
   CYCLING_SPORT: "Ride",
   CYCLING_TRANSPORTATION: "Ride",
   FITNESS_WALKING: "Walk",
   HIKING: "Hike",
   MOUNTAIN_BIKING: "Ride",
+  OTHER: "Workout",
   RUNNING: "Run",
   SKIING_CROSS_COUNTRY: "NordicSki",
   SKIING_DOWNHILL: "AlpineSki",
   SNOWSHOEING: "Snowshoe",
   SPINNING: "VirtualRide",
   STAIR_CLIMBING: "StairStepper",
+  STEP_COUNTER: "Workout",
+  SURFING: "Surfing",
   SWIMMING: "Swim",
   TREADMILL_RUNNING: "VirtualRun",
   TREADMILL_WALKING: "VirtualRun",
-  WALKING: "Walk"
+  WALKING: "Walk",
+  WEIGHT_TRAINING: "Workout",
 }

STEP_COUNTER and OTHER might be a bit controversial to map to the generic Workout since they possibly don't have any useful data mapped in Strava anyway. Most of my STEP_COUNTER ones were Endomondo imports from Fitbit and have no data in the TCX files so fail to upload anyway. Was just trying to get rid of the error noise from fix-activities :-/