Skip to content

Bash Shell Script to Upload GPX file on your Strava Profile Activity

License

Notifications You must be signed in to change notification settings

sanwebinfo/strava-bash-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strava CLI

bash-test

Bash Shell Script to Upload GPX file on your Strava Profile Activity

Requirements

  • cURL
  • jq
  • Strava API

Create API

  • Create an Application from your Strava Account - https://developers.strava.com/docs/getting-started/#account
  • After creating your App you can get your Client, Client Secret, Access Token, and Refresh Token
  • Access Token is your API key it will expire in 6 Hours once you Generate
  • For that we have Sperate file token.sh to Refresh the Expired API Key - Just add your Client ID, Secret, Refresh Token, and GPX File location
  • it will autogenerate the .env file with New API and GPX File location

Setup

  • Use git to clone or download this Repo
git clone https://github.com/sanwebinfo/strava-bash-cli.git
cd strava-bash-cli
  • Update Permission
chmod +x strava.sh
chmod +x token.sh
  • Execute the Script
./strava.sh
  • Generate New API Key
./token.sh

How to use

  • Display a Help Message

  • ./strava.sh -h

strava.sh [options]
        
           Example:
           strava.sh -l

          Options:
          -l   Get Upload Status
          -s   Upload GPX File to Strava
          -h   Display Help Message
          -v   Check CLI Version
  • ./strava.sh -s - Upload your GPX File
  • ./strava.sh -l- Check the Upload Status using Activity ID that you Got while Uploading GPX File

Tested Apps

Reference

LICENSE

MIT

About

Bash Shell Script to Upload GPX file on your Strava Profile Activity

Topics

Resources

License

Stars

Watchers

Forks

Languages