No description
Find a file
2025-11-04 23:08:19 +01:00
example update example picture 2024-06-18 21:14:48 +02:00
tmpl add chart.umd.js.map 2024-10-30 21:45:13 +01:00
.gitignore git ignore scripts except startup.sh 2025-10-06 21:53:16 +02:00
.goreleaser.yaml add example docker-compose.yml 2025-10-22 16:50:15 +02:00
article-stats.go improve log messages 2025-11-04 23:07:52 +01:00
chart-png.go interface{} → any 2025-11-04 20:40:08 +01:00
constants.go reduce number of articles per page to get a faster abort when fetching reading stats 2025-11-04 22:59:09 +01:00
data-checks.go change for loops to range 2025-11-04 20:41:33 +01:00
data-checks_test.go add test if data set is valid 2019-12-15 22:44:44 +01:00
docker-compose.yml add example docker-compose.yml 2025-10-22 16:50:15 +02:00
Dockerfile update Dockerfile to version v2.1.0 2025-11-04 23:08:19 +01:00
flags.go improve log messages 2025-11-04 23:07:52 +01:00
go.mod update dependencies 2025-10-15 15:31:22 +02:00
go.sum update dependencies 2025-10-15 15:31:22 +02:00
helper.go Make data and output directories customizable 2025-10-06 22:48:56 +02:00
html.go Make data and output directories customizable 2025-10-06 22:48:56 +02:00
io.go interface{} → any 2025-11-04 20:40:08 +01:00
LICENSE add LICENSE 2016-09-28 17:38:10 +02:00
main.go improve log messages 2025-11-04 23:07:52 +01:00
output.go change for loops to range 2025-11-04 20:41:33 +01:00
README.md prepare new major release v2 2025-10-07 17:01:23 +02:00
startup.sh Make data and output directories customizable 2025-10-06 22:48:56 +02:00
types.go update dependencies 2025-04-09 20:42:26 +02:00

wallabag-stats

Draws a chart for unread and total articles in your wallabag instance.

Chart is only created when there at least two data sets, in which unread and total are both different compared with their previous value. Otherwise, if the delta is zero, the go-chart lib does not print a chart.

Example

Example chart

Install

Copy example/config.json along with your wallabag-stats binary and change it according to your wallabag instance.

Updates via Cron

You can install a cronjob to fetch the stats data from your wallabag and let the graph being printed on changes. E.g. a user cronjob line by editing your cronjob file via cronjob -e:

* * * * * cd /home/$USER/opt/wallabag-stats/ && ./wallabag-stats && cp -r output/ /var/www

wallabag-stats -h

Usage of ./wallabag-stats:
  -article-stats-start-date string
    	date when the article stats shall start, it has to be provided as string with the RFC3339 format 2006-01-02T15:04:05Z07:00 (default "2020-12-10T21:00:00+01:00")
  -config string
    	file name of config JSON file (default "config.json")
  -d	debug mode
  -data-dir string
    	directory name of data directory (default "data")
  -data-only
    	collect data only, do not generate any charts
  -dd
    	more debug mode
  -ddd
    	even more debug mode
  -f	force regeneration of charts and html even if no new data is present
  -output-dir string
    	target directory for the generated stats (default "output")
  -v	print version
  -validate
    	get through every data item and sort invalid data entries out

Docker and Docker Compose

You can run the wallabag-stats within a Docker container. For that, use the provided Dockerfile. If you deployed your wallabag instance with Docker Compose, you can integrate the wallabag-stats in your compose.yaml file. Adjust the environment variables accordingly:

services:
  ...
  stats:
    build: .
    ports:
      - 8000:80
    environment:
      - UPDATE_INTERVAL=30 # Update interval in minutes
      - WALLABAG_URL=https://CHANGE_ME
      - WALLABAG_CLIENT_ID=CHANGE_ME
      - WALLABAG_CLIENT_SECRET=CHANGE_ME
      - WALLABAG_USER_NAME=CHANGE_ME
      - WALLABAG_USER_PASSWORD=CHANGE_ME
    volumes:
      - ./data:/app/data
      - ./output:/app/html

Go Report Card

Go Report Card