https://github.com/sesh/intervals-now
Add an intervals.icu block to an omg.lol/now page
https://github.com/sesh/intervals-now
omgdotlol
Last synced: about 1 year ago
JSON representation
Add an intervals.icu block to an omg.lol/now page
- Host: GitHub
- URL: https://github.com/sesh/intervals-now
- Owner: sesh
- License: isc
- Created: 2023-03-06T06:29:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-17T22:37:46.000Z (over 2 years ago)
- Last Synced: 2025-04-06T23:25:21.904Z (over 1 year ago)
- Topics: omgdotlol
- Language: Python
- Homepage: https://brenton.omg.lol/now
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This script generates an [omg.lol](https://omg.lol) [/now](https://nownownow.com/about) block containing running stats from [Intervals.icu](https://intervals.icu).
It's possible that the Venn diagram of users this is useful for only contains me.
Currently only metric units are supported.
## Usage
There are four environment variables that need to be configured to run the sync:
- `INTERVALS_ATHLETE_ID` + `INTERVALS_API_KEY` are available in the "Developer Settings" section of the Intervals settings
- `OMGLOL_USERNAME`, `OMGLOL_API_KEY` are available in the Account section of the omg.lol dashboard
Optionally you can include `` and `` in your /now page's Markdown to specify when you want your Intervals stats to go.
If this doesn't exist the block will be added at the end of your page.
Once the environment variables are available, running the script is as simple as:
```
> python generate.py
```
Python versions >= 3.6 should be supported.
### Usage as a Github Action
Simply fork this repository and add the environment variables to update you page with Github Actions.
The simplest configuration involves settings up the four environment variables as Repository Secrets in the Github settings for your fork of this repository.
## Contributing
You are welcome to submit Pull Requests or raise issues.
All CI steps will need to be passing before PRs are merged.
You can run them locally with:
```
> isort . && black . && ruff . && bandit -r .
```