$ show pe-st/garmin-connect-export
This is a Python CLI tool for exporting fitness data from Garmin Connect. It authenticates via OAuth (using the garth library), retrieves activity lists, downloads activity files (GPX, TCX, original FIT, JSON), and writes a configurable CSV summary. The architecture is a single monolithic script (gcexport.py) with a small helper module (filtering.py) for tracking downloaded IDs and excluding activities. It supports session persistence, date filtering, activity type filtering, and subdirectory organization. The code is well-structured with unit tests, CI/CD (GitHub Actions), linting (flake8, pylint, black), and a Dockerfile. However, the project is effectively broken due to Garmin's TLS fingerprinting introduced in March 2026, and the maintainer has indicated they will not work on it further. The codebase itself is clean and demonstrates good Python practices, but its utility is currently zero unless Garmin changes its stance.
The LLM identified 2 files worth highlighting for reuse:
Provides functions to read an exclude list from a JSON file and to maintain a persistent record of downloaded activity IDs in a JSON file. The `update_download_stats` function is idempotent and handles file creation, corruption, and sorting. This module is self-contained and could be extracted for any project needing to track processed items across runs.
Contains the `CsvFilter` class and `load_properties` function. `CsvFilter` encapsulates CSV writing with a configurable column set defined by a properties file, allowing users to customize the output. `load_properties` is a generic parser for Java-style properties files. While `CsvFilter` is somewhat coupled to the script's column names, the pattern of using a properties file to define CSV columns is reusable.