项目作者: yuu-eguci

项目描述 :
📊 Update a pinned gist to contain your weekly WakaTime stats by Python
高级语言: Python
项目地址: git://github.com/yuu-eguci/waka-box.git
创建时间: 2020-03-14T11:18:52Z
项目社区:https://github.com/yuu-eguci/waka-box

开源协议:MIT License

下载




waka-box


📊 Update a pinned gist to contain your weekly WakaTime stats


Actions Status
GitHub

Description

  • Python script
  • Converts WakaTime stats to bar charts and publishes on specified gist
  • Intended to run by GitHub Actions

Use on your own GitHub overview

  1. Register WakaTime account at https://wakatime.com/.
  2. Install WakaTime plugins into your editors following plugin install instructions.
  3. 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.
  4. 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
  5. Pin the gist on your GitHub overview.
  6. 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.
  7. After that, the jobs automatically run by every 12 hours.

Installation

On local

Create .env and run.

  1. WAKATIME_SECRET_API_KEY=***
  2. GIST_ID=***
  3. GITHUB_ACCESS_TOKEN=***
  1. pipenv install
  2. pipenv run python main.py

On GitHub Actions

Register env variables and run by GitHub Actions.

secrets

Gist

https://gist.github.com/yuu-eguci/10a7031088fb0e783dc92e721c6443c3

What I learned this time

what-i-learned