{"id":23863133,"url":"https://github.com/cnuahs/strava-tools","last_synced_at":"2025-08-08T01:13:29.021Z","repository":{"id":84775120,"uuid":"98780222","full_name":"cnuahs/strava-tools","owner":"cnuahs","description":"Command line tools built on the Strava API (https://www.strava.com/).","archived":false,"fork":false,"pushed_at":"2019-03-16T06:00:09.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T07:48:50.005Z","etag":null,"topics":["command-line-tool","strava","strava-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cnuahs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-30T06:44:45.000Z","updated_at":"2019-03-18T06:03:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"0cd76493-6ef2-4377-af77-bc14238a5e79","html_url":"https://github.com/cnuahs/strava-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnuahs%2Fstrava-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnuahs%2Fstrava-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnuahs%2Fstrava-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnuahs%2Fstrava-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnuahs","download_url":"https://codeload.github.com/cnuahs/strava-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240173345,"owners_count":19759759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","strava","strava-api"],"created_at":"2025-01-03T07:47:35.279Z","updated_at":"2025-02-22T12:26:50.610Z","avatar_url":"https://github.com/cnuahs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# strava-tools\n\nA collection of simple command line tools for manipulating data on [Strava](http://strava.com/).\n\nThe tools make use of the [stravalib](https://github.com/hozn/stravalib.git/) and [Flask](http://flask.pocoo.org/) Python modules:\n\nTo setup your environment:\n\n```bash\n$ git clone https://github.com/hozn/stravalib.git\n$ python -m virtualenv --no-site-packages --distribute env\n$ source env/bin/activate\n(env) $ cd ./stravalib\n(env) $ python setup.py develop\n(env) $ pip install flask\n(env) $ pip install geographiclib\n```\n\nYou also need to create/register and authorize a Strava App to use the Strava API. To do so:\n\n1. Login to your Strava account.\n2. Point your browser at, https://www.strava.com/settings/api.\n3. Complete the required fields (Name, Website and Authorization Callback Domain) to register an app. The form is geared towards developers deploying web apps. We're not doing that. In the \"Website\" field, you can enter any web site you like (I use 'https://www.strava.com/'), and\nin the \"Authorization Callback Domain\", enter 'localhost'.\n4. Upload an icon image (this can be anything you like and will appear next to your \"app\" in the list of authorized apps for your Strava profile).\n5. Once your app is registered, take note of the \"Client ID\", \"Client Secret\" and \"Access Token\" that are generated.\n\nBefore you can use the command line tools you need to cache the credentials obtained above. To do so, create a file called config.py containing the following:\n\n```python\nCLIENT_ID = \u003cyour client_id\u003e;\nCLIENT_SECRET = \u003cyour client_secret\u003e;\n\nusers = {\n  \u003cname\u003e: \u003cyour access_token\u003e\n};\n```\n\nYou're now all set with read access to your profile and activities on Strava.\n\nTo obtain an access token with write permissions, call strava-tools.py as follows:\n\n```bash\n(env) $ ./strava-tools.py auth [--port \u003cport\u003e]\n```\n\nThis will open a browser window for you to enter your credentials at Strava.com, and will retrieve your access token. You need to add this token (copy and paste it from your browser) to config.py either in place of or in addition to the read only token you added above.\n\nIf you need to navigate a firewall or proxy, you can specify the local port to listen on using the --port option.\n\nYou can perform operation of your strava activities using strava-tools.py as follows:\n\n```bash\n(env) $ ./strava-tools.py action [--user \u003cname\u003e]\n```\n\nwhere `action` is the action to perform and the optional argument `\u003cname\u003e` is a key from the Python dictionary 'users' defined in config.py (see above; `\u003cname\u003e` defaults to the login name of the current user).\n\nFor help, including a list of available actions, type:\n\n```bash\n(env) $ ./strava-tools.py -h\n```\n\nFor action specific help, type:\n\n```bash\n(env) $ ./strava-tools.py action -h\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnuahs%2Fstrava-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnuahs%2Fstrava-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnuahs%2Fstrava-tools/lists"}