๐ Update a pinned gist to contain your weekly WakaTime stats
- Python script
- Converts WakaTime stats to bar charts and publishes on specified gist
- Intended to run by GitHub Actions
- Register WakaTime account at https://wakatime.com/.
- Install WakaTime plugins into your editors following plugin install instructions.
- Create your own waka-box repository by pushing Use this template button at waka-box top page.
- GitHub Actions workflow automatically runs and it shows
EnvNotFoundError
this time.
- GitHub Actions workflow automatically runs and it shows
- Register three env variables as repository secrets.
- WAKATIME_SECRET_API_KEY: Get your WakaTime Secret API Key from your account page.
- GIST_ID: Create a public gist with a file named
file
and get the gist id.https://gist.github.com/username/[gist id]
- GITHUB_ACCESS_TOKEN: Create a token from GitHub Settings > Developer settings > Personal access tokens > Generate new token > Check gist and generate
- Set them as repository secrets - Repository settings > Secrets
- Pin the gist on your GitHub overview.
- Open Actions tab > Open your workflow result > build > Re-run jobs
- It is possible that it shows
EmptyWakaTimeDataError
because WakaTime API data can be empty for a while after registration.
- It is possible that it shows
- After that, the jobs automatically run by every 12 hours.
Create .env and run.
WAKATIME_SECRET_API_KEY=***
GIST_ID=***
GITHUB_ACCESS_TOKEN=***
pipenv install
pipenv run python main.py
Register env variables and run by GitHub Actions.
https://gist.github.com/yuu-eguci/10a7031088fb0e783dc92e721c6443c3