Jump to content

User:StubSyncBot

From Wikipedia, the free encyclopedia
The Request for Approval page for this bot.

Purpose

[edit]

A WikiProject tag in an article's Talk page may not provide an up-to-date quality classification of the article. For example, it could state that the article is a stub, when in fact the article has been expanded and is no longer a stub, or more commonly the tag may not provide a classification at all. An article is either a stub or it isn't, so this bot serves to synchronize the two tags.

Functionality and implementation

[edit]

This bot aims to insert the stub classification into a supported WikiProject tag on the Talk page if and only if the article is currently a stub. It does this using the following procedure:

  • First, AWB assembles a list of stub articles. Articles are removed from the list if its Talk page doesn't exist, its WikiProject tag already contains a stub classification, (match for the regular expression "(class\s*=)\s*[Ss]tub", must not have a match for "(Wiki[Pp]roject)") or if any of its WikiProject tags are not whitelisted. This step takes a very long time to complete, but when it does finish, what's left is a list of Talk pages which need assistance.
  • The bot will change the WikiProject tag based off of the following four possibilities:
  • 1) The tag provides both the "|class=" and the "|importance=" parameters. "[|](\s)*class(\s)*=(\s)*" and "[|](\s)*importance(\s)*=(\s)*" define matches for "|class=" and "|importance=" respectively.
The bot will automatically replace "|class=" with "|class=Stub".
  • 2) The tag provides the "|class=" parameter, but not "|importance=".
The bot will automatically replace "|class=" with "|class=Stub", (see exception above) and I will manually insert "|importance= ".
  • 3) The tag provides the "|importance=" parameter, but not "|class=".
I will manually insert "|importance= ".
  • 4) The template just defines the WikiProject and does not provide either "|class=" nor the "|importance=" parameter. This is defined by "{{[Ww]iki[Pp]roject(\s[a-zA-Z_/]*)*}}".
I will manually insert "|class=Stub|importance= ".

In conclusion

[edit]

Thus in some cases this bot will be fully automated, while in others it will be manually assisted in it's high-speed editing unless I can figure out how to automate the text insertion. I have used regexpal.com to test my regular expressions, and they appear reliable. Tens of thousands of Talk pages need the above changes, and this bot should serious reduce the number of unassessed articles on approved WikiProjects. In order to keep updating the WikiProject tag of new stubs, I would like to repeat the bot's run every several months or so, but I expect that significantly less Talk pages will be affect on these subsequent scans. Currently the bot does not remove the Stub classification from the Talk page if the article is no longer a stub, but that may be on my to-do list eventually after approval of course.

Note: This bot will only affect whitelisted WikiProjects, since each WikiProject may uniquely handle quality assessments, so I can't assume that |class=Stub means the same thing for all of them, even if they use Wikipedia:Version 1.0 Editorial Team/Assessment#Quality_scale. Only WikiProject Computing will be affected for the bot's trial.

Shutoff

[edit]