You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+88-1Lines changed: 88 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,16 @@ If there is no GPS track data (e.g., due to an indoor treadmill workout), a data
34
34
35
35
If you have many activities, you may find that this script crashes with an "Operation timed out" message. Just run the script again and it will pick up where it left off.
36
36
37
-
## Installation
37
+
## Running the script
38
+
39
+
To run the script, you can either:
40
+
41
+
- Run the script using the Docker CLI using the pre-built Docker image. See [Docker Usage](#docker-usage) for details.
42
+
- Install the dependencies locally and run the script using the Python CLI. See [Local Installation](#local-installation) and [Usage](#usage) for details.
43
+
44
+
## Local Installation
45
+
46
+
If you are **not** using Docker, install the dependencies locally:
38
47
39
48
- If you're comfortable using Git, just clone the repo from github
40
49
- Otherwise get the latest `zip` (or `tar.gz`) from the [releases page](https://github.com/pe-st/garmin-connect-export/releases)
@@ -95,6 +104,84 @@ optional arguments:
95
104
enable loading and storing SSO information from/to given directory
96
105
```
97
106
107
+
### Docker Usage
108
+
109
+
This section contains some tips and tricks to run the script using Docker. See the [Usage](#usage) section above for general script usage.
110
+
111
+
#### Create working directory
112
+
113
+
Create a directory where you want to store the garmin export data and session data:
114
+
115
+
```shell
116
+
mkdir -p ~/Documents/garmin_export
117
+
cd~/Documents/garmin_export
118
+
```
119
+
120
+
#### Set environment variables
121
+
122
+
Export your username and password as environment variables:
123
+
124
+
```shell
125
+
export GARMIN_USERNAME=abc
126
+
export GARMIN_PASSWORD=xyz
127
+
```
128
+
129
+
#### Run the docker container
130
+
131
+
When running the docker container, make sure to:
132
+
133
+
1. Override the `--directory` and `--session` command line arguments with static directories in the container.
134
+
2. Mount the static `export_data` and `session_data` directories in the container to your local directories.
135
+
136
+
This results in garmin export data being outputted to the local `./my_garmin_data` directory.
137
+
138
+
```shell
139
+
docker run -it --rm \
140
+
-v "$(pwd)/my_garmin_data:/export_data" \
141
+
-v "$(pwd)/my_garmin_session:/session_data" \
142
+
garmin-connect-exporter \
143
+
--directory /export_data \
144
+
--subdir '{YYYY}/{MM}/' \
145
+
--logpath /export_data/logs \
146
+
--session /session_data \
147
+
--username ${GARMIN_USERNAME} \
148
+
--password ${GARMIN_PASSWORD}
149
+
```
150
+
151
+
Optionally, follow the same process for the `--template` argument:
0 commit comments