From 78f327dbeb91381c2772c6f07e3751d6bc2a3146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Sat, 8 Jul 2023 20:48:38 +0200 Subject: [PATCH] docs: add instructions for using export script --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 3278be4..5cae5b4 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,28 @@ Preview:
+## 📦 Data Export +You can export your coding activity from Wakapi to CSV in the form of raw heartbeats. While there is no way to accomplish this directly through the web UI, we provide an easy-to-use Python [script](scripts/download_heartbeats.py) instead. + +```bash +$ pip install requests tqdm +$ python scripts/download_heartbeats.py --api_key API_KEY [--url URL] [--from FROM] [--to TO] [--output OUTPUT] +``` + +
+ +Example + +```bash +python scripts/download_heartbeats.py --api_key 04648d14-15c9-432b-b901-dbeec70d4eaf \ + --url https://wakapi.dev/api \ + --from 2023-01-01 \ + --to 2023-01-31 \ + --output wakapi_export.csv +``` + +
+ ## 👍 Best practices It is recommended to use wakapi behind a **reverse proxy**, like [Caddy](https://caddyserver.com) or [nginx](https://www.nginx.com/), to enable **TLS encryption** (HTTPS).