项目作者: flopp

项目描述 :
Your self-hosted activities overview (running, cycling, ...). Synced with Strava.
高级语言: JavaScript
项目地址: git://github.com/flopp/activities.git
创建时间: 2020-06-14T12:46:56Z
项目社区:https://github.com/flopp/activities

开源协议:MIT License

下载


Activities

Any color you like
Continuous Integration

Your self-hosted activities overview (running, cycling, …). Synced with Strava.

https://activities.flopp.net

Screenshot

Features

  • Built-in http server to authenticate with Strava.
  • Fetching of Strava activities.
  • Visited POI (predefined point-of-interest) matching.
  • Filtering by activity name, activity type, min/max distance, visited POI.
  • Running streak computation.
  • Heatmaps.

Usage

Installation

  1. git clone https://github.com/flopp/activities.git
  2. cd activities
  3. python3 -m venv .env
  4. .env/bin/pip install --upgrade pip
  5. .env/bin/pip install .

Fetch API Config from Strava (once!)

  1. Create an “Application” on https://www.strava.com/settings/api; for “Authorization Callback Domain” use localhost, for all other properties you can basically use whatever you want ;)
  2. Copy config-example.json to config.json and fill in the “Client ID” and the “Client Secret” from the “My API Application” section on https://www.strava.com/settings/api.

Authenticate with Strava (once!)

  1. .env/bin/activities \
  2. --auth

Now a web browser window should open with an “Authenticate with Strava” button. If not, manually open localhost:5000 in a web browser of your choice. Click “Authenticate with Strava”. Allow access for the app.
The authentication data is now saved in data.db for later use.

Sync

  1. .env/bin/activities \
  2. --sync \
  3. --browser

This fetches your Strava data, creates a static website, and opens a browser to view the website.
You can also manually point a web browser of your choice to file:///INSTALLATION_PATH/web/index.html

Visited POI Computation

If you want to know which points-of-interest (POI), e.g. peaks of mountains, you have visited on each activity, create a JSON file containing the names and lat/lon pairs of your POI, e.g.

  1. {
  2. "Belchen": {"lat": 47.822496, "lon": 7.833198},
  3. "Feldberg": {"lat": 47.873986, "lon": 8.004683},
  4. "Hinterwaldkopf": {"lat": 47.918979, "lon": 8.016681},
  5. "Kandel": {"lat": 48.062517, "lon": 8.011391},
  6. "Kybfelsen": {"lat": 47.960851, "lon": 7.885071},
  7. "Rosskopf": {"lat": 48.010010, "lon": 7.901702},
  8. "Schauinsland": {"lat": 47.911940, "lon": 7.898506},
  9. "Schönberg": {"lat": 47.954722, "lon": 7.805504}
  10. }

Then just add the option --poi mypoi.json to your .env/bin/activities command.

Made with

License

  1. MIT License
  2. Copyright (c) 2020 Florian Pigorsch