Upload Garmin .FIT data to Garmin Connect
git clone "https://github.com/briancxx/gols.git"
pip install bs4
- Replace "username" and "password" values with credentials for Garmin Connect.
- Add directories to check when script executed by adding each absolute path as a string to the "directories" array.
python gols/gols.sh
Automatically running gols.py when watch is mounted requires using fstab and systemd.
sudo blkid
sudo nano /etc/fstab
LABEL="GARMIN" /media/garmin vfat auto,nofail,rw,user,uid=1000 0 2
Use the UUID or LABEL that sudo blkid
found.
sudo nano /etc/systemd/system/gols.service
[Unit]
Description=Run gols.py on watch mount
Requires=media-garmin.mount
After=media-garmin.mount
[Service]
ExecStart=/home/user/gols/gols.py
[Install]
WantedBy=media-garmin.mount
sudo systemctl daemon-reload
sudo systemctl start gols.service
sudo systemctl enable gols.service
Note: Make sure to update the header in gols.py to match the correct location of Python