Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
e6e0284
Initial work on adding power-based steps
jpickup Jul 15, 2025
0812b5b
Missing interface file
jpickup Jul 15, 2025
518b6de
More missing files!
jpickup Jul 15, 2025
c9503bf
Wire in power parser output into garmin conversions
jpickup Jul 15, 2025
7dc17a1
Add some basic power samples
jpickup Jul 15, 2025
775a795
Add a few more sport types
jpickup Jul 16, 2025
68bfd4e
First attempt at a Debian package
jpickup Jul 19, 2025
b18f785
A debian package that works
jpickup Jul 19, 2025
c8e455f
Upload Mac installer
jpickup Jul 19, 2025
f47748b
Add debug logging
jpickup Jul 20, 2025
7f32b0b
Add more debug logging
jpickup Jul 20, 2025
6ff8f17
Add uncaught exception handler
jpickup Jul 21, 2025
819d798
Bump logback version due to vulnerabilities picked up by scanner
jpickup Jul 21, 2025
21c3eb7
Comment out debian installer for now
jpickup Jul 21, 2025
6a9255e
Add power zones 6 & 7
jpickup Jul 21, 2025
13b6a44
Minor doc updates
jpickup Jul 21, 2025
605c583
get AppImage working
jpickup Jul 21, 2025
7061bc3
Upload MacOS installer
jpickup Aug 7, 2025
af05f87
Merge remote-tracking branch 'origin/feature/power' into feature/power
jpickup Aug 7, 2025
df97674
Upload Windows installer (7Zip)
jpickup Aug 7, 2025
c41ace3
Copy installers to https://maven.pkg.github.com/ instead of code repo
jpickup Aug 8, 2025
bae2fae
New way of bundling the app
jpickup Aug 9, 2025
4a75e11
Create maven-publish.yml (#20)
jpickup Aug 9, 2025
ec599b2
different trigger
jpickup Aug 9, 2025
ea535c6
newer JDK
jpickup Aug 9, 2025
fb33fc5
fix dir
jpickup Aug 9, 2025
ff92c53
try Windows too
jpickup Aug 9, 2025
4fc9243
try without the settings file on mvn cmd line
jpickup Aug 9, 2025
6d78677
backslash for Windows settings file?
jpickup Aug 9, 2025
e8c66ae
different env var?
jpickup Aug 9, 2025
fcdd24b
typo
jpickup Aug 9, 2025
1da9b2e
Windows packaging
jpickup Aug 9, 2025
28c5bc3
Windows packaging
jpickup Aug 9, 2025
096d2bc
Another go at Windows packaging
jpickup Aug 16, 2025
2d63afd
Another go at Windows packaging (more output)
jpickup Aug 16, 2025
bd3c1c8
Another go at Windows packaging
jpickup Aug 16, 2025
ef4ec9b
Update readme and bump version
jpickup Aug 16, 2025
280ff2d
Try skipping POM generation
jpickup Aug 16, 2025
065447d
Try ignoring the result of the mvn deploy command
jpickup Aug 16, 2025
1084302
Try ignoring the result of the mvn deploy command
jpickup Aug 16, 2025
8d9d713
Try to force a zero result
jpickup Aug 16, 2025
35ea395
Try to ignore non-zero result
jpickup Aug 16, 2025
938b399
Try to ignore non-zero result
jpickup Aug 16, 2025
795da64
Try to ignore non-zero result
jpickup Aug 16, 2025
dea0ea5
Try to ignore non-zero result
jpickup Aug 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/maven-publish-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Maven Package for Linux

#on:
# release:
# types: [created]
on: [push]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 23
uses: actions/setup-java@v4
with:
java-version: '23'
distribution: 'oracle'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn install -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}

# this is nasty! the publish fails as the pom already exists but we only really want to artefact published, so we try to ignore the error
# this is also why the full build is performed in the previous step as we do want that to fail if there are other errors in the build
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml || echo "Ignoring non-zero result"
env:
GITHUB_TOKEN: ${{ github.token }}
34 changes: 34 additions & 0 deletions .github/workflows/maven-publish-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Maven Package for Windows

#on:
# release:
# types: [created]
on: [push]

jobs:
build:
runs-on: windows-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 23
uses: actions/setup-java@v4
with:
java-version: '23'
distribution: 'oracle'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn install -s ${{ github.workspace }}\settings.xml --file pom.xml

# this is nasty! the publish fails as the pom already exists but we only really want to artefact published, so we try to ignore the error
# this is also why the full build is performed in the previous step as we do want that to fail if there are other errors in the build
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s ${{ github.workspace }}\settings.xml --file pom.xml || echo "Ignoring non-zero result" & exit 0
env:
GITHUB_TOKEN: ${{ github.token }}

1 change: 1 addition & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 26 additions & 11 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added PowerWorkoutSchedule.xls
Binary file not shown.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ A suite of tools for creating Garmin FIT files for workouts, schedules and cours
[Routes](./ROUTES.md)

## Building
The application is a multi-module Maven project. It uses jlink and jpackage to produce installers for Windows and MacOS.
The application is a multi-module Maven project. It uses jlink and jpackage to produce installers for Windows, MacOS and Linux.

The resulting installer files can be found in `app/target/installer` after the maven build has completed on the target platform.

Alternatively the installers are checked into GitHub here: https://github.com/jpickup/GarminTools/tree/master/installer
The main class is `app/src/main/java/com/johnpickup/app/javafx/AppLauncher.java` if you want to run this from an IDE.

NOTE: for Windows the most recent version is available in a ZIP file as I've been unable to get compatible versions of
the various tools required to build an MSI. Hopefully this will be fixed in the near future.
## Installers
The project now uses GitHub actions to build Windows and Linux installations. These can be found in the project's packages,
here: https://github.com/jpickup/GarminTools/packages/
Click on `com.johnpickup.garmin.bundle` and search for "windows.zip", "linux.zip" or "macos.zip", download and unpack.
I need to figure out a better way to link to these.

Previously the were installers are checked directly into GitHub but once the size exceeded the limit this was no longer
suitable.

NOTE:
For Windows the most recent version is available in a ZIP file as I've been unable to get compatible versions of
the various tools required to build an MSI.
78 changes: 45 additions & 33 deletions WORKOUTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ Workouts are defined as a series of steps, where a step is either a period of ti
that the step end when the lap button is pressed. For example 10 minutes or 400 metres. A step can also have a target
such as a pace or a heart rate. Steps are written as text, for example:

| Workout | Description |
|--------------------|-------------------------------------------------------------------------------|
| `1mi` | A step of 1 mile |
| `400m` | A step of 400 metres |
| `Open` | An open step - ends when lap button pressed |
| Workout | Description |
|---------------------|-------------------------------------------------------------------------------|
| `1mi` | A step of 1 mile |
| `400m` | A step of 400 metres |
| `Open` | An open step - ends when lap button pressed |
| `100m@4:00-5:00/km` | A step of 100 metres with a target pace between 4 and 5 minutes per kilometre |
| `1mi>6mph` | 1 mile at a pace faster than 6 miles per hour |
| `1mi>6mph` | 1 mile at a pace faster than 6 miles per hour |
| `Open@8:00-9:00/mi` | An open step with a pace target |
| `800m@Z3` | 800 metres in heart rate Zone 3 |
| `400m@160-180bpm` | 400 metres wth a heart rate between 160 and 180 beats per minute |
| `800m@Z3` | 800 metres in heart rate Zone 3 |
| `400m@160-180bpm` | 400 metres wth a heart rate between 160 and 180 beats per minute |
| `30:00@PZ4` | 30 minutes at power zone 4 |
| '20km@300-400W` | 20km at a power between 300 and 400 watts |

### Sequences of Steps
Steps can also be strung together with a `+` character, repeated using `*n` and grouped using brackets, for example:
Expand All @@ -59,10 +61,10 @@ More examples can be found in `ExampleWorkoutSchedule.xls`
## Units
### Distance
| Unit | Description | Example |
| ---- | ----------- |---------|
| m | Metre | 400m |
| km | Kilometre | 5km |
| mi | Mile | 26.2mi |
|------|-------------|---------|
| m | Metre | 400m |
| km | Kilometre | 5km |
| mi | Mile | 26.2mi |

### Intensity
Valid values for the intensity are:
Expand Down Expand Up @@ -97,6 +99,17 @@ Examples:
| 120-130bpm | between 120 and 130 beats per minute |
| Z3 | Zone 3 |

### Power ranges
These are similar to heart rate ranges where the units are watts (W) and the zones use a "PZ" prefix and a
number between 1 and 7.

Examples:

| Power range | Description |
|-------------|---------------------------|
| 300-400W | between 300 and 400 watts |
| PZ4 | Power zone 4 |

## Excel workbook
The app expects the input workbook to have specific named sheets and specific column headers within these. Any additional
sheets or columns are ignored.
Expand All @@ -107,32 +120,31 @@ sheets or columns are ignored.
| Workout | Named workouts in the workout language described above |
| Schedule | A schedule for workouts for specific dates |

| Sheet | Column | Description |
| ---- |-------------|-------------------------------------------------------------------------------------------|
| Pace | Name | The name for a pace |
| Pace | Value | The pace defined in workout language |
| Workout | Name | The name for a workout |
| Workout | Description | The workout language definition, may include named paces defined in the pace sheet |
| Workout | Sport | The sport that this workout is for (if not present running is the default) |
| Schedule | Date | The date for a specific workout |
| Schedule | Workout | Either defined in the workout language or the name a named workout from the Workout sheet |
| Schedule | Sport | The sport that this workout is for (if not present running is the default) |
| Sheet | Column | Description |
|----------|-------------|--------------------------------------------------------------------------------------------|
| Pace | Name | The name for a pace |
| Pace | Value | The pace defined in workout language |
| Workout | Name | The name for a workout |
| Workout | Description | The workout language definition, may include named paces defined in the pace sheet |
| Workout | Sport | The sport that this workout is for (if not present running is the default) |
| Schedule | Date | The date for a specific workout |
| Schedule | Workout | Either defined in the workout language or the name a named workout from the Workout sheet |
| Schedule | Sport | The sport that this workout is for (if not present running is the default) |

## Sport types
The sport type case be specified as a value in the spreadsheet under the Sport heading. The values supported are:

| Sport | Description |
| ----- | ----------------------------- |
| Running | Running of any type |
| Road running | Road running |
| Trail running | Trail running |
| Cycling | Cycling of any type |
| Road cycling | Road cycling |
| MTB | Mountain biking |
| Swimming | Pool swimming |
| Open water | Open water swimming |
| Sport | Description |
|---------------|-------------------------------|
| Running | Running of any type |
| Road running | Road running |
| Trail running | Trail running |
| Cycling | Cycling of any type |
| Road cycling | Road cycling |
| MTB | Mountain biking |
| Swimming | Pool swimming |
| Open water | Open water swimming |

## ANTLR4 Grammar
The grammar for the language is defined in `grammar/Workout.g4`, which is an ANTLR4 grammar that is used to generate
Java code.

Loading
Loading