Wikimedia-contrib is a collection of user scripts and Toolforge tools intended for users of Wikimedia Foundation wikis.
Toolforge is part of the Wikimedia Cloud infrastructure hosted by the Wikimedia Foundation for community-developed tools and bots. These tools provide analysis and data to support wiki editors and functionaries.
Pathoschild
), an IPv4 address (like 127.0.0.1
), an IPv6 address (like 2001:db8:1234::
), or a CIDR block (like 212.75.0.1/16
or 2600:3C00::/48
).These user scripts extend the wiki interface seen by a user, and they're sometimes available to all users as gadgets (particularly TemplateScript). See _Gadget kitchen_ for an introduction to user scripts & gadgets.
&usejs=MediaWiki:Common.js
. It only accepts scripts in the protected MediaWiki:
namespace.This repo uses three Toolforge accounts by default:
account | tools |
---|---|
meta |
most tools |
meta2 |
crossactivity |
meta3 |
stalktoy |
They redirect as needed, so all tools can be accessed through eitherhostname. To use different
accounts, edit the tool-labs/backend/modules/__config__.php
and tool-labs/.lighttpd*
files
accordingly.
To deploy from scratch:
Run this script:
##########
## Set up meta
##########
# switch to the meta project
become meta
## set up tool files
git clone https://github.com/Pathoschild/Wikimedia-contrib.git git/wikimedia-contrib
mkdir cache
mkdir public_html
ln -s git/wikimedia-contrib/tool-labs/.lighttpd.meta.conf .lighttpd.conf
cd public_html
for TARGET in backend content 'toolinfo.json' accounteligibility catanalysis globalgroups gusersearch iso639db magicredirect pgkbot regextoy stewardry userpages
do
ln -s "../git/wikimedia-contrib/tool-labs/$TARGET"
done
# set up script CDN (accessed via https://tools-static.wmflabs.org/meta/scripts/*.js).
mkdir ~/www
mkdir ~/www/static
cd ~/www/static
ln -s ~/git/wikimedia-contrib/user-scripts scripts
## launch server
webservice --backend=kubernetes start
##########
## Set up meta2
##########
## switch to the meta2 project
exit
become meta2
## set up files
git clone https://github.com/Pathoschild/Wikimedia-contrib.git git/wikimedia-contrib
mkdir cache
mkdir public_html
ln -s git/wikimedia-contrib/tool-labs/.lighttpd.meta2.conf .lighttpd.conf
cd public_html
for TARGET in backend content crossactivity
do
ln -s "../git/wikimedia-contrib/tool-labs/$TARGET"
done
## launch server
webservice --backend=kubernetes start
##########
## Set up meta3
##########
## switch to the meta3 project
exit
become meta3
## set up files
git clone https://github.com/Pathoschild/Wikimedia-contrib.git git/wikimedia-contrib
mkdir cache
mkdir public_html
ln -s git/wikimedia-contrib/tool-labs/.lighttpd.meta3.conf .lighttpd.conf
cd public_html
for TARGET in backend content stalktoy
do
ln -s "../git/wikimedia-contrib/tool-labs/$TARGET"
done
## launch server
webservice --backend=kubernetes start
That's it! The new tools should now be running at https://meta.toolforge.org. To update an account later, just login and run these commands:
git -C git/wikimedia-contrib pull
webservice restart