Skip to content

Add formatted workout steps to Garmin activities #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PabiGamito
Copy link
Contributor

@PabiGamito PabiGamito commented Sep 28, 2024

This adds formatted workout steps like the following:

🟢 Warmup: 15min @ 5:00/km-5:42/km
🔄 Repeat 8x:
   - 🚀 Interval: 10s @ 2:24/km-2:46/km
   - 🌿 Rest: 3min
🟡 Cooldown: 10min @ 5:00/km-5:42/km

This is something I currently do manually for all my workout activities and so it would love for this to be automated through Strautomator.

@PabiGamito PabiGamito changed the title Add interval intensity type to fit file parsing Add formatted workout steps to Garmin activities Sep 28, 2024
@@ -307,6 +312,88 @@ export class FitParser {
logger.info("FitParser.parse", logHelper.user(user), logHelper.fitFileActivity(fitFileActivity), `Data: ${logFields.join(", ")}`)
}

private intensity_prefixes = {
"warmup": "🟢 Warmup: ",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we probably want to do something with localization of the text here

switch (step.target_type) {
case "speed":
if (step.target_value) {
line += ` @ ${this.formatSpeedAsPace(step.target_value)}`
Copy link
Contributor Author

@PabiGamito PabiGamito Sep 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is specific to running. We probably want to format this for cycling activities in a way that makes sense for cycling workouts. Plus we should add support for power and heart rate target types as well.

Copy link
Contributor Author

@PabiGamito PabiGamito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR still needs some work but I wanted to get some preliminary thoughts about this idea to see if it makes sense and get some initial feedback on the code.

@DasGreff
Copy link

DasGreff commented Feb 5, 2025

I would love that, even better if we could add the execution score

@igoramadas
Copy link

@PabiGamito thanks a lot for the PR. I won't have much time to work on this in the next 2 to 3 weeks, so it would be great if you could update the PR with the workout steps formatted for cycling as well. I will merge as soon as it's good enough for at least running and cycling.

The other targets (power, HR) can come later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants