Raistlfiren / garmin-csv-plan

A quick n' dirty way of "automating" training plans into Garmin Connect.
https://raistlfiren.github.io/garmin-csv-plan/
36 stars 6 forks source link

Empty weeks ignored #23

Closed fhuonder closed 3 years ago

fhuonder commented 3 years ago

When planning I want to leave some weeks empty. Like:

WEEK,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
1,,,,"running: W4 - Recovery Run (3.8k)
- run: 3800m @ z2
- cooldown: lap-button",,"running: W4 - Long Run (5k)
- run: 5000m @ z2
- cooldown: lap-button",
2,,,,,,,
3,,,,,,,
4,,"running: W5 - Short Intervals (6.5k)
- warmup: lap-button
- repeat: 8
  - run: 400m @ 4:10-3:50
  - recover: 1:30 @ z2
- cooldown: lap-button",,"running: W5 - Recovery Run (6.5k)
- run: 6500m @ z2
- cooldown: lap-button",,"running: W5 - Long Run (7.2k)
- run: 7200m @ z2
- cooldown: lap-button",

Then I schedule this plan and define a starting date (-s). The empty weeks (2 und 3) are ignored, means week 4 is scheduled directly after week 1.

Would be great if this is possible.

Raistlfiren commented 3 years ago

@fhuonder - Can you please provide the command that you used to create the workout, and a little bit more context about how you are running the command like operating system and whether it is through Docker or not?

I ran the command and it skipped the weeks. docker-compose exec garmin-dev bin/console garmin:workout tests/Resource/empty-weeks.csv schedule -n -s '2021-08-01' -x

fhuonder commented 3 years ago

I run it through docker like this docker-compose run --rm garmin ./bin/console garmin:workout myplan.csv schedule -s '2021-06-07' -m garmin@user -p mypassword

Operating system is Windows 10, but I run the docker command in my WSL 2 - Ubuntu instance.

Raistlfiren commented 3 years ago

Thanks @fhuonder - I will try to look into this some more tonight.

Raistlfiren commented 3 years ago

@fhuonder - I ran the program on a Windows 10 machine with WSL2, and it still seems to work okay. I am receiving the following output:

Scheduling workouts
-------------------

 * Workout - W4 - Recovery Run (3.8k) with id 368355905 was scheduled on the Garmin website for 2021-06-10
 * Workout - W4 - Long Run (5k) with id 368355906 was scheduled on the Garmin website for 2021-06-12
 * Workout - W5 - Short Intervals (6.5k) with id 368355907 was scheduled on the Garmin website for 2021-06-29
 * Workout - W5 - Recovery Run (6.5k) with id 368355908 was scheduled on the Garmin website for 2021-07-01
 * Workout - W5 - Long Run (7.2k) with id 368355909 was scheduled on the Garmin website for 2021-07-03
fhuonder commented 3 years ago

Ok sorry, was my fault. The imaged still contained an old version of the CSV.

Raistlfiren commented 3 years ago

Thanks for the update @fhuonder! :)