by User:GreenC (en.wikipedia.org)
June 2020
MIT License
Numberof is a Wikipedia bot that creates and maintains these files:
- Commons:Data:Wikipedia_statistics/data.tab
- Commons:Data:Wikipedia_statistics/rank/*.tab
- Commons:Data:Wikipedia_statistics/meta.tab
..which are pages used by {{Wikipedia rank by size}}, {{NUMBEROF}} and Module:NUMBEROF across many wiki languages and projects.
In addition, the bot creates .tab pages for Module:NumberOf hosted on Ruwiki and a few others. NumberOf is a peer of NUMBEROF, with its own features and requirements. The files are:
Finally, the bot creates forks of the ranking files which are sorted with ties showing equal rank (eg. two wikis can both be ranked #42 if they are tied for that spot). Equal ranking is not supported by Module:NUMBEROF but the data is made available for use such as other templates:
- GNU Awk 4.1+
- BotWikiAwk (version December 2023 or later)
- A bot User account with bot permissions on Commons
-
Install BotWikiAwk following setup instructions.
-
Add OAuth credentials to wikiget (installed with BotWikiAwk), which is the utility that uploads pages to Commons. See EDITSETUP.
-
Clone Numberof. For example: git clone https://github.com/greencardamom/Numberof
-
Set ~/Numberof/numberof.awk to mode 750, and change the first shebang line to the location of awk.
-
In numberof.awk in the "BEGIN {" section is a place for an email address for error reports.
- See the file toolforge.txt for how to run on Toolforge.
- If not on Toolforge simply run it from cron every x hours like every 4 hours