Skip to content

H37IX/wakapi-github

 
 

Repository files navigation

wakapi-github

Small Python service that reads your this-month coding time from Wakapi and updates your GitHub profile bio on a schedule (every 15 minutes).

The bio uses a short duration string plus the current calendar month, for example: ⚑2h 30m coding this March πŸš€ (exact format is defined in main.py).

This is a personal fork of wakapi-github for my own modifications.
Not intended for upstream PRs.

Requirements

  • Python or Docker
  • A Wakapi account (self-hosted or wakapi.dev) and API key
  • A GitHub personal access token with the **user** scope (to update your profile)

Environment variables

Create a .env file in the project root or export these in your shell:

Variable Description
WAKAPI_API_KEY Wakapi API key (sent as Basic auth)
GITHUB_API_KEY GitHub PAT with user scope
WAKAPI_URL Wakapi base URL, e.g. https://wakapi.dev β€” no trailing slash

The app uses python-dotenv to load .env when you run it locally.

Run locally

python -m venv .venv
# Windows:
.\.venv\Scripts\activate

# macOS/Linux:
# source .venv/bin/activate

pip install -r requirements.txt
python main.py

Run with Docker Compose

From the repo root (uses .env automatically):

docker compose up --build -d

docker-compose.yml builds the image from this directory and passes the three variables into the container.

More Docker-oriented notes: README.Docker.md.

VS Code (optional)

The .vscode folder is committed on purpose so you can debug in a container with a consistent setup:

File Purpose
launch.json Docker: Python β€” General β€” starts a debug session with debugpy inside the container
tasks.json Builds the image (docker-build) and runs the debug container (docker-run: debug) before launch
extensions.json Suggests the Docker extension (ms-azuretools.vscode-docker)
  1. Install Docker and the Docker VS Code extension.
  2. Open this folder in VS Code.
  3. Run and Debug β†’ choose Docker: Python β€” General β†’ F5.

Secrets: docker compose is the most straightforward way to run with a .env file. The stock Docker launch task builds from Dockerfile only; if variables are missing in the container, run via Compose or extend tasks.json / launch to pass the same env as docker-compose.yml.

About

Updates github bio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 66.3%
  • Dockerfile 33.7%