Git Product home page Git Product logo

gcesync's Introduction

gcesync

This small script downloads gpx files from Garmin using garmin-connect-export, and saves them in a directory. When you run it again, it will only download new gpx files.

Directory structure of synced gpxfiles

/root
    |-/Walking
    |   |-/<yyyy-mm-dd>_<activity name>.gpx
    |   |-/<yyyy-mm-dd>_<activity name>.gpx
    |   |-/<yyyy-mm-dd>_<activity name>.gpx
    |
    |-/Cycling
    |   |-/<yyyy-mm-dd>_<activity name>.gpx
    |   |-/etc...
    |
    |-/etc...

<activity name> is whatever the activity is called in the Garmin cloud, typically the location and activity, e.g. amsterdam-walking.

Typical use

Run this script every week using cron to keep an offline copy of the gpx files.

How to use

First, download garmin-connect-export. Then, make a settings.json file, following the example given in settings.json.example:

  • The gce_location option needs the path to the directory you downloaded garmin-connect-export to, either relative to your working directory or absolute.
  • username and password are your credentials for Garmin.
  • maxdownloads is the maximum number of activities garmin-connect-export can download, you can probably just set this to a very high number, but it may be good to first test your settings with a small number.
  • gpxtrack_folder is the directory your gpx files will be synced to.
  • By default, this script will scan the existing files to get the Garmin ID of each gpx file. This ID is used to determine whether a file should be downloaded. By setting use_persistent_garminidlist to True, you can change the behaviour and make use of the list of ids (location set by persistent_garminids option) this script outputs after every run. This is faster because we don't scan all files every run, but it requires you to keep this list of ids around, which can be annoying.

Next, just run python gcesync (with settings in the working directory) to sync giles.

gcesync's People

Contributors

wetenschaap avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.