This changelog is inspired by Keep a Changelog.
- changed: allow session directory to work on first go (Pull Request #108 by @rjl6789)
- fixed: processing of old activities with missing activity name (#113) or elevation correction flag (#112)
- added: option
-ss
to store OAuth token between sessions (Pull Request #99 by @embear) - added: typeId filtering (option
-tf
) (Pull Request #72 by @joetimmerman)
- fixed: Use garth for OAuth to fix #95 Did not find the display name in the profile page (Pull Request #96 by @SimonBaars with @geraudloup and @app4g)
- added: date filter flags
--start_date
and--end_date
(Pull Request #73 by @bxsx)
- changed: updated the list of parent activities (
PARENT_TYPE_ID
) to the new set Garmin is now using - changed: minimum Python version is now 3.8 (as Python 3.7 had its end-of-life on 2023-06-27)
- added: new option
--logpath
(BREAKING change, you might need--logpath=.
for the old behaviour) (Pull Request #74 by @cristian5th and @bxsx) - removed: Python 2 leftovers (Pull Request #73 by @bxsx)
- added: configurations for flake8, pylint and black (including the needed improvements of the code for them)
- changed: GitHub Actions now execute also flake8, pylint and black tasks
- added: support for time spent in HR zones (feature request) (Issue #68
- fixed: adapt display name parsing because of changed Garmin Connect behaviour (Pull Request #69 by @hannesweisbach)
- added: GitHub Action to execute the tests automatically
- fixed: make the display name parsing work also for email addresses (Issue #65
- changed: Python 2.x is not supported anymore
- changed: the
--verbose
option now also saves some intermediate responses from Garmin - changed: Improve logging for HTTP connection requests
- fixed: handle the case where an original file has a different extension than
.fit
(Pull Request #61 by @cristian5th) - fixed: don't write a record to the CSV file for already downloaded activities (Issue #34, Pull Request #62 by @cristian5th)
- added: export of the parts of multi-sport activities
- added:
--exclude
option to exclude activities from the download (Pull Request #58 by @chs8691)
- fixed:
HTTP Error 402: Payment Required
(started appearing 2021-02-23) (Pull Request #55 by @reto) - changed: detached from kjkjava's repo
- fixed: unzipped filename was changed by Garmin, breaking redownload check (issue #48)
- fixed:
--subdir
was broken in 3.0.0 by the migration to Python 3 (reported by @jamorris, issue #37) - changed: moved unit tests for
resolve_path
from unittest framework to pytest
- added: support for Python 3, thanks to @telemaxx and @bartskowron
- added: file
CONTRIBUTING.md
and moved some parts ofREADME.md
into it - changed: with Windows the script now uses backslashes as path separator
- changed: default Git branch is now
master
(the olddevelop
branch is kept for the time being) - fixed:
-fp
option fororiginal
format
- fixed: skipping existing
.fit
files didn't work (reported by @fellrnr, issue #25)
- added: parent activity type "Winter Sports"
-
added: new command line switch
--subdir
/-s
(courtesy of Christian Schulzendorff @chs8691): Exported activity files now can be saved in subdirectories, optionally grouped by year (and/or month) of the activity start time. Usually this is used together with the parameterdirectory
, which is the root directory for DIR.--subdir
supports the two placeholders{YYYY}
and{MM}
which can be used within DIR. Examples:--directory downloads --subdir {YYYY} --> downloads/2019/ --directory downloads --subdir {YYYY}/{MM} --> downloads/2019/03/ --directory downloads --subdir myTcxFiles/{YYYY} -f tcx --> downloads/myTcxFiles/2019/ --directory downloads --subdir activities{YYYY}/GPX -f gpx --> downloads/activities2019/GPX/
Note that only the activity files go into the subdirectory, the CSV and other files remain in the main directory
-
added: new command line switch
--start_activity_no
/-sa
(courtesy of Josef K @jkall): This is a minor fix to allow user to restart downloading where it crashed. Example:First download:
$ python gcexport.py --count all ~/Downloads/garmin Garmin Connect activity (657/2098) [activity_id] ... ...some error...
Second run:
$ python gcexport.py --count all --start_activity_no 657 ~/Downloads/garmin ... Skipping Garmin Connect activity (656/2098) [activity_id] Garmin Connect activity (657/2098) [activity_id]
- changed: the HTTP request to login to Garmin Connect (the old one didn't work anymore)
- added: new command line switch
--fileprefix
/-fp
(courtesy of Christian Schulzendorff @chs8691): A downloaded activity file can now have a date/time prefix, e.g. "20190301-065831-activity_3424910202.tcx". This works for all export types (tcx, gpx, json and original). Existing downloaded files will not be touched. If downloaded twice, once with and once without the parameter, two files will be created.
- added: new exported fields
vo2max
the VO2 Max (maximum volume of oxygen, cardiovascular fitness indicator)aerobicEffect
aerobic training effect (value between 0 and 5)anaerobicEffect
anaerobic training effect (value between 0 and 5)averageRunCadence
average number of steps per minute. Excludes time spent standingmaxRunCadence
maximum number of steps per minutestrideLength
average length of the stride from one footfall to the next (in meters)steps
number of stepsprivacy
who can see your activityfileFormat
the format of the original upload (fit, gpx or tcx)locationName
location determined by Garmingear
the gear used (only tested for shoes); nickname if set, the brand/model otherwiseelevationCorrected
flag telling if the elevation correction is applied
- changed: new default CSV template with different CSV output;
to get the old CSV format use
-t csv_header_moderation.properties
- added: Python version to the log file
- changed: improved exception logging
- added: command line switches
-v
(verbosity) and--desc
(description)
- added: command line switches
-e
and-a
to pass the CSV output to an external programm (merged from @moderation's commit from 2018-09-09)
- added: CHANGELOG.md file
- changed: improved detection if device information is unknown or missing (i.e. they once were known, but the information got lost somehow)
- changed: the default CSV template (csv_header_default.properties) makes no difference anymore between corrected and uncorrected elevation
- changed: the URL_GC_ACTIVITY_DETAIL endpoint isn't called anymore when the chosen
CSV template doesn't contain the
sampleCount
column
- added: switch
-ot
to set file time to activity time (original Pull Request by @tobiaslj)
- added: Python module
logging
to write log files - changed: console output is less verbose
- changed: remove most Pylint warning
- added: CSV templates (csv_header_default.properties and csv_header_running.properties) to make the CSV output configurable
- changed: Fix regex for displayName to allow dots (original Pull Request by @chmoelders)
- changed: use the User Stats to discover the number of activities
(the old
activity-search-service-1.2
endpoint doesn't work anymore)
- added: first unit tests
- changed: refactor into a Python module having a
main
function and using theif __name__ == "__main__":
incantation - changed: fixed some Pylint issues
- changed: note about using the user name or email address for logging in
- changed: fixed user name prompt (reported by @TheKiteRunning)
- changed: aligned with the current state of the moderation fork, but still using Python 2 for now
- changed: fixed distance and elapsedDuration parsing (Pull Request by @lindback)
- changed: login ticket is now extracted from HTML response (the cookie doesn't contain the ticket anymore)
- changed: various tunings to the CSV output
- added: using
activitylist-service
to get the list of activities - changed: using moderation's master as base using newer Garmin endpoints
(
activity-search-service-1.2
)
- added: JSON export format (Pull Request by @yohcop)
- changed: use newer endpoints for GPX/TCX downloads (
modern/.../download-service
) (Pull Request by @julienr) - changed: don't abort for HTTP status 204 (empty GPX file)
- last commit in original repo of kjkjava
- using
activity-search-service-1.0
for the list andactivity-service-1.1
for GPX/TCX exports