User:Erwin/CatCount
Erwin85Bot is able to count the number of pages in a category and putting that information on a page, example: Wikipedia:WikiProject Australia/BotStatistics/Sports. The bot uses the database to do this and runs daily at 12:00 (UTC) from the m:Toolserver. Pages linking to this page will be treated by my bot.
Use
[edit]To use this bot simply transclude this page, i.e. put {{User:Erwin85/CatCount}}, in the page you want treated. To let the bot know for what categories it should count the number of pages you can use the syntax below. The code can be generated using my catcount tool.
<!-- count:category name; ns:namespace -->0<!-- end -->
Where category name is simply the page title without namespace of the category and namespace is a comma seperated list of positive or negative namespace id's to include respectively exclude certain namespaces. To include all namespaces simply leave namespace blank. The id for a namespace can be found at http://en.wiki.x.io/w/query.php?what=namespaces. In example:
<!-- count:Unassessed Australian places articles; ns:1,14 -->0<!-- end -->
would count the number of talk pages and subcategories in Category:Unassessed Australian places articles. It would then replace the above text with an updated count, e.g.
<!-- count:Unassessed Australian places articles; ns:1,14 -->11<!-- end -->
To exclude certain namespaces you should use:
<!-- count:Unassessed Australian places articles; ns:-1,-14 -->0<!-- end -->
This would count the number of pages not in the talk or category namespace in Category:Unassessed Australian places articles.
To include all namespace you should use:
<!-- count:Unassessed Australian places articles; ns: -->0<!-- end -->
This would count the number of pages in all namespaces in Category:Unassessed Australian places articles.