- sources/labs.py reads .xlsx/.csv sheets with a Date column; columns are recognised by header (ferritin, Hb, serum iron, transferrin saturation), with the lab's reference range and the user's Min/Max target. Formula cells are skipped. - Importing a sheet from disk remembers it in settings "lab_files"; every dashboard build reads it again. Editable in the app's settings. - Dashboard: ferritin chart (log scale, main lab as a line, a second lab as points, target range dashed), results table and a finding. - openpyxl added as a dependency and to the installer bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.4 KiB
myGarmin
A local-first logbook for your activity and health history. It collects data from Garmin (watch over USB, Connect account export, Connect API), Strava (account export) and AlpineQuest (.trk), keeps the original files in one library folder, and builds a self-contained HTML dashboard plus GPX and AlpineQuest exports.
Everything stays on your PC: there is no server and no account, and nothing is uploaded anywhere.
Status: early (phase 0/1 of docs/PLAN.md), command line only. A desktop window and installer come next.
Install
Windows: download myGarmin-setup-<version>.exe from the releases page and run it. No admin rights or Python needed;
it installs for your user only and adds myGarmin to the Start menu. The app window needs Microsoft Edge WebView2,
which Windows 11 includes (setup checks and points you to Microsoft's download if it is missing).
Uninstalling removes the program only; your library folder stays where you put it.
From source (any OS with Python 3.12 or newer; the app window and watch-over-USB are Windows-first):
pip install -e . # from a checkout of this repo
pip install -e ".[api]" # also the Garmin Connect API (optional)
Use
mygarmin init D:\myGarmin --name Sam --birth-year 1985 --sex F --tz Europe/London
mygarmin import D:\myGarmin <garmin_export.zip> <strava_export.zip> <folder of .fit/.tcx/.gpx/.trk>
mygarmin build D:\myGarmin # -> D:\myGarmin\dashboard.html and all_activities.csv
mygarmin export D:\myGarmin # -> exports\tracks_gpx.zip and tracks_trk.zip (one track per outing, by year)
Keeping it up to date:
mygarmin watch D:\myGarmin # Windows: read a Garmin watch connected by USB
mygarmin login D:\myGarmin # once: log in to Garmin Connect (password + MFA code)
mygarmin sync D:\myGarmin # new activities and daily health from Garmin Connect
mygarmin update D:\myGarmin # all of the above + build + export
Where to get your data
| Source | How |
|---|---|
| Garmin Connect | garmin.com → Account → Data Management → Export Your Data. Arrives by e-mail as a zip; import the zip as is. |
| Strava | strava.com → Settings → My Account → Download or Delete Your Account → Request your archive. Import the zip as is. |
| AlpineQuest | Copy the .trk files from the phone (AlpineQuest folder, Landmarks/Tracks). |
| Garmin watch | Connect by USB and run mygarmin watch, or copy the watch's GARMIN folder and import it. |
| Races | Optional races.csv in the library: date,event,time[,km,age_grade,position,pb] (km defaults to 5). |
| Blood tests | A spreadsheet (.xlsx or .csv) with a Date column and columns such as Ferritin [ug/L] (30-400), Hb; optional Min/Max target columns. Import it once; it is read again at every update. |
How it works
The full picture (data flows, database, de-duplication, dashboard, exports) is in docs/ARCHITECTURE.md. In short:
- Originals are copied unchanged into
<library>/originals/; the SQLite databasemyGarmin.dband everything else can be rebuilt from them. Importing the same file twice does nothing. - One outing recorded by several sources (watch, phone, Strava) is kept once, preferring the watch. Car/plane/train/boat trips and very short tracks are flagged and left out of the dashboard.
- Local times come from the file itself or the GPS position (offline time zone lookup).
- The Garmin Connect API is unofficial (python-garminconnect). Garmin has no personal API; this logs in the way the Connect app does and can break when Garmin changes its login. Your login token is stored on your PC only. The export zip and the watch over USB always work.
Privacy
This repository never contains personal data. Your library folder holds your health data: keep it private.
Development
pip install -e ".[dev,app]", then pytest (tests use synthetic files only) and mygarmin-app for the window.
Build the Windows installer (needs pip install pyinstaller and Inno Setup 6):
powershell -ExecutionPolicy Bypass -File packaging\build.ps1 # -> build\installer\myGarmin-setup-<version>.exe
The bundled myGarmin.exe also runs the command line (myGarmin.exe status <library>); as it has no console, output
goes to %LOCALAPPDATA%\myGarmin\cli.log. MYGARMIN_SELFTEST=<file> makes the window write what it shows and close.
Licence
MIT, see LICENSE.