Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .env-temmplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# .env-template

STRAVA_CLIENT_ID="12345"
STRAVA_CLIENT_SECRET="<your_strava_client_secret>"
STRAVA_ACCESS_TOKEN="<your_strava_access_token>"
STRAVA_EXPIRES_AT="<your_strava_expires_at>"
STRAVA_EXPIRES_IN="<your_strava_expires_in>"
STRAVA_REFRESH_TOKEN="<your_strava_refresh_token>"
GARMIN_TOKENS="<your_garmin_tokens>"
50 changes: 50 additions & 0 deletions .github/workflows/self-hosted-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Self-hosted runner — Run MyWhoosh2Garmin

on:
workflow_dispatch: {}

jobs:
run-on-self-hosted:
name: Run on self-hosted runner
runs-on: [self-hosted]
steps:
- name: Checkout repository
uses: actions/checkout@v4


- name: Ensure `uv` CLI available (or install fallback)
shell: bash
run: |
set -euo pipefail
if command -v uv >/dev/null 2>&1; then
uv --version
echo "uv found: $(command -v uv)"
else
echo "uv not found; installing via curl"
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

- name: Create virtual environment
shell: bash
run: |
uv venv --python 3.13

- name: Install project (from pyproject.toml)
shell: bash
run: |
uv pip install -r pyproject.toml

- name: Run myWhoosh2Garmin.py
shell: bash
env:
STRAVA_CLIENT_ID: ${{ secrets.STRAVA_CLIENT_ID }}
STRAVA_CLIENT_SECRET: ${{ secrets.STRAVA_CLIENT_SECRET }}
STRAVA_ACCESS_TOKEN: ${{ secrets.STRAVA_ACCESS_TOKEN }}
STRAVA_EXPIRES_AT: ${{ secrets.STRAVA_EXPIRES_AT }}
STRAVA_EXPIRES_IN: ${{ secrets.STRAVA_EXPIRES_IN }}
STRAVA_REFRESH_TOKEN: ${{ secrets.STRAVA_REFRESH_TOKEN }}
GARMIN_TOKENS: ${{ secrets.GARMIN_TOKENS }}
run: |
set -euo pipefail
source .venv/bin/activate
python myWhoosh2Garmin.py
66 changes: 63 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,64 @@
.garth/*
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual environments
.venv/
venv/
ENV/
env/
.python-version

# UV
.uv/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# Logs
*.log
*.json
*.lock

# Project specific
.garth/
installed_packages.json
backup_path.json
*.fit

# Lock files (exclude Pipfile.lock if migrating)
Pipfile.lock

# OS
.DS_Store
Thumbs.db

data/
.env
**token**
strava.db

.terraform/
.terraform.lock.hcl
terraform.tfstate
terraform.tfstate.backup
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-json
- id: check-toml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.5
hooks:
# Run the linter
- id: ruff
args: [--fix]
# Run the formatter
- id: ruff-format
44 changes: 0 additions & 44 deletions MyWhooshMonitor.ps1

This file was deleted.

11 changes: 0 additions & 11 deletions Pipfile

This file was deleted.

Loading