jovandeginste / workout-tracker

A workout tracking web application for personal use (or family, friends), geared towards running and other GPX-based activities
Other
945 stars 31 forks source link

feat: support skiing, snowboarding, kayaking, swimming workouts #27

Closed pixelspark closed 6 months ago

pixelspark commented 6 months ago

This adds all the workout types that appear in my gpx (not sure if these are standardized, some apps appear to use their own type names...)

jovandeginste commented 6 months ago

Do you mean the type is stored as metadata in the gpx?

jovandeginste commented 6 months ago

Do you mean the type is stored as metadata in the gpx?

I've seen the code now; is it always in English? Or did you configure your account in English? I have Garmin tracks, which do contain something similar, but they are in Dutch...

pixelspark commented 6 months ago

Do you mean the type is stored as metadata in the gpx?

I've seen the code now; is it always in English? Or did you configure your account in English? I have Garmin tracks, which do contain something similar, but they are in Dutch...

My GPX'es are either from the Workoutdoors app or from Strava (old ones uploaded from the Strava app on iOS, newer ones from Workoutdoors). My phone and Strava account are set to Dutch but Workoutdoors only has English, but it doesn't appear to matter. These were all the unique codes I could find (the only thing that did differ was the casing, I saw both "Kayaking" and "running" from I believe Strava, so hence the ToLower).

pixelspark commented 6 months ago

Made a separate function but using the error pattern, since taking addresses from const values is apparently not allowed (so can't use *WorkoutType as return value). Could've used WorkoutTypeAutodetect as return value in case we don't recognize the GPX type, but better to be explicit I think.