Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mskian authored Sep 8, 2023
1 parent b3b8047 commit f13e4ec
Showing 1 changed file with 1 addition and 83 deletions.
84 changes: 1 addition & 83 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,85 +1,3 @@
# Strava CLI

[![bash-test](https://github.com/mskian/strava-bash-cli/actions/workflows/test.yml/badge.svg)](https://github.com/mskian/strava-bash-cli/actions/workflows/test.yml)

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

```sh
git clone https://github.com/mskian/strava-bash-cli.git
cd strava-bash-cli
```

- Update Permission

```sh
chmod +x strava.sh
chmod +x token.sh
```

- Execute the Script

```sh
./strava.sh
```

- Generate New API Key

```sh
./token.sh
```

## How to use

- Display a Help Message

- `./strava.sh -h`

```sh
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

- OpenTracks GPX File - <https://github.com/OpenTracksApp/OpenTracks>
- MI band GPX File - Export via Zepp Life App
- you can use this CLI on your Android Device by using Termux - <https://github.com/termux/termux-app>

## Reference

- Strava Upload GPX File via cURL - <https://gist.github.com/michaellihs/bb262e2c6ee93093485361de282c242d>
- Getting Started with the Strava API - <https://developers.strava.com/docs/getting-started/>
- Generate NEW API - <https://developers.strava.com/docs/authentication/#refreshingexpiredaccesstokens>

## LICENSE

MIT
This repo was Moved to - <https://github.com/sanwebinfo/strava-bash-cli>

0 comments on commit f13e4ec

Please sign in to comment.