Upload media files to Wikimedia Commons.
Tip: Create a bot password instead of using your main Wikimedia password!
$ go-to-commons -username $MEDIAWIKI_USERNAME -password $MEDIAWIKI_PASSWORD -file go-to-commons.png -filename go-to-commons.png -text "=={{int:filedesc}}==\n..."
$ ./go-to-commons -help
Usage of ./go-to-commons:
-api string
MediaWiki API URL (default "https://commons.wikimedia.org/w/api.php")
-comment string
Upload comment (default "Uploaded with go-to-commons")
-file string
Media file to upload
-filename string
Filename on Wikimedia Commons
-overwrite
Overwrite existing file on Wikimedia Commons
-password string
Wikimedia password (default "$MEDIAWIKI_PASSWORD")
-text string
Wikitext of media file on Wikimedia Commons or (if specified as @file.txt, the text is read from file.txt)
-username string
Wikimedia username (default "$MEDIAWIKI_USERNAME")
-version
Display version information
- https://github.com/cgt/go-mwclient (CC0 licensed)
- https://github.com/antonholmquist/jason (MIT licensed)
- https://github.com/mrjones/oauth (MIT licensed)
- Author: Simon Legner (simon04)
- License: GNU General Public License v3.0