1
0
Fork
You've already forked cusul
0
stats about your Wikimedia Commons images
  • Go 80.5%
  • Go Template 19.1%
  • Dockerfile 0.3%
2026年06月15日 21:51:39 +02:00
static fix OSM connection scripts 2026年01月25日 20:24:30 +01:00
tmpl allow to reset OSM connection type 2026年03月29日 22:39:13 +02:00
.gitignore ignore md files 2026年04月14日 21:31:59 +02:00
.goreleaser.yaml fix go releaser 2025年06月27日 21:23:16 +02:00
api.go increase pageids parameter limit to maximum value 2026年05月27日 23:46:16 +02:00
collect.go implement OAuth2 for thumb download, move all credentials into a json config file 2026年04月10日 01:01:43 +02:00
collect_test.go write test for file usages 2025年05月28日 21:02:53 +02:00
constants.go increase cache times for revisions and categories 2026年05月27日 23:47:51 +02:00
credentials.go update readme 2026年05月01日 22:53:33 +02:00
docker-compose.yml serve application below the env dir SERVE_DIR 2026年01月22日 22:47:30 +01:00
docker-start.sh update docker start script to be able to run v4 2026年04月10日 17:31:42 +02:00
Dockerfile update go version in Dockerfile 2026年04月09日 22:12:12 +02:00
flags.go implement OAuth2 for thumb download, move all credentials into a json config file 2026年04月10日 01:01:43 +02:00
go.mod update dependencies 2026年06月15日 21:51:39 +02:00
go.sum update dependencies 2026年06月15日 21:51:39 +02:00
helper.go add log message in case outdated cache file is found 2025年08月04日 17:20:06 +02:00
helper_test.go fix log messages 2025年06月27日 14:17:51 +02:00
http-rate-limit.go implement rate limit of 200/min for all MW API calls 2026年05月27日 23:27:39 +02:00
issues.go Retro Digitalica category special handling 2026年05月16日 00:24:45 +02:00
LICENSE Initial commit 2023年01月28日 21:00:03 +00:00
main.go implement OAuth2 for thumb download, move all credentials into a json config file 2026年04月10日 01:01:43 +02:00
oauth2.go implement OAuth2 for thumb download, move all credentials into a json config file 2026年04月10日 01:01:43 +02:00
parse.go allow OSM links with map params to be added 2026年01月25日 21:20:04 +01:00
parse_test.go allow OSM links with map params to be added 2026年01月25日 21:20:04 +01:00
persistence.go implement OAuth2 for thumb download, move all credentials into a json config file 2026年04月10日 01:01:43 +02:00
README.md update readme 2026年05月01日 22:53:33 +02:00
score.go improve link to user pages in any wiki to get better score 2026年01月21日 16:24:09 +01:00
server.go serve application below the env dir SERVE_DIR 2026年01月22日 22:47:30 +01:00
types.go improve diff output 2025年07月02日 00:24:50 +02:00
wikipedia-languages.go update wikipedia-languages.go 2025年03月24日 00:04:15 +01:00

Cusul

Commons User Stats & Upload Linter

Stats about your Wikimedia Commons images

https://codeberg.org/strubbl/cusul

Credentials for Authentification

File

A credenitals file will be generated on the first launch of this application. You need to fill this with your bot password and oauth2 parameters. See the following chapters how to get these.

Bot password

A bot password is needed to make calls against the MediaWiki JSON API with the help of the go-mwclient library. A password can be generated here: https://commons.wikimedia.org/w/index.php?title=Special:BotPasswords

OAuth2

OAuth2 is used to make authenticated download requests for thumbnails, which are going to be cached to disk. An OAuth2 consumer can be registered here: https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose/oauth2

Example .env file for Docker

For the Docker container, you can create an environment file like the following:

APP_USER_UID=1000
APP_GROUP_GID=1000
TARGET_USER=Strubbl
PORT=3131
SERVE_DIR=/

The environment file is only used in the Docker container to prefill the command line parameters for the cusul executable. If you are running cusul without docker, you have to use the cli parameters of the application.

Command-line parameters

$ ./cusul -h
Usage of ./cusul:
 -c string
 	cache directory path (default "cache")
 -cred string
 	path to the credentials JSON file (default "credentials.json")
 -d	print debug output
 -dd
 	like parameter -d, but print more debug output
 -ddd
 	like parameter -dd, but print even more debug output
 -no-server
 	do not start a webserver after fetching data
 -no-thumbs
 	do not cache any thumbnails
 -no-update
 	do not update data and use the already fetched one
 -o string
 	output path for the collected stats data JSON file (default "data.json")
 -port int
 	change the port number to bind to (default 3131)
 -u string
 	Wikimedia Commons user to be linted
 -v	print the program's version