User:Kingbotk/Plugin/Generic WikiProject templates

From Wikipedia, the free encyclopedia

Kingbotk Plugin for AWB

Home

General information about the Kingbotk Plugin and directions for installation.

Discussion

Discuss the application and ask questions.

User guide

How to use the plugin.

How it works

What the plugin does, how it works, and why you should use it.

AutoWikiBrowser

The plugin works inside AWB and is shipped with that tool.

Generic WikiProject templates · WikiFunctions2.dll · AWB Plugins · AWB Sandbox

The Kingbotk Plugin now supports "Generic WikiProject templates".

Contents

[edit] What is a Generic WikiProject template?

A generic WikiProject template is a talk page template used by a WikiProject which contains only certain common parameters and which can be supported by the plugin without any further programming work.

To qualify as a "Generic WikiProject template" the template must meet the following criteria:

  • It must have a standard class= parameter, with values for all of the Wikipedia 1.0 assessment grades and a "NA" value for non-article pages. Optionally it may have other values, but of those the plugin will support only class=Cat (for categories) and class=Template (for templates)
  • It must have an attention= parameter (Why? - One of the options provided to a reviewer using the Wikipedia Assessments feature of the plugin is to mark the article as needing attention. Thus, all templates need to support this parameter if the plugin is to support them without any further programmatic change).
  • It must have a needs-infobox= parameter, for the same reason as above.
    • Strictly speaking, it will work without these 2 parameters, because Mediawiki ignores unimplemented parameters.
  • It must not need any fancy template replacement, such as replacing {{blp}} with the living=yes parameter for {{WPBiography}}.
  • Optionally the template may have an importance= or priority= parameter.
  • Optionally the template may have an auto=yes parameter, for automated classification of Stub articles.
  • You don't have multiple project banners doing different jobs. It needs to be one banner per WikiProject, otherwise we might get talk pages doubled tagged.

[edit] My WikiProject's template doesn't count as "generic" according to the above criteria, what can I do?

  • If your template isn't "generic" because some of the above parameters are missing (probably attention and needs-infobox) by far the best thing to do is add those parameters to the template. See {{WPBiography}} for example code.
  • If it isn't generic because you have some requirements for additional regular expressions (like the {{Blp}} example given above) or because you have extra parameters which you will need to use in the AWB run (such as parameters for workgroups) then your only option is to ask me to provide support for your template programatically. Because of the time factor I will only do this if your Project has at least 5,000 talk pages waiting to be tagged.

[edit] My WikiProject's template is generic, how do I configure the plugin?

Configuring {{film}} for WikiProject Films.
  • Install the Kingbotk plugin
  • In the Plugins menu of AWB, click "Add Generic Template". Enter a descriptive name, it doesn't matter what the name is. A new tab with this name will open in AWB. From now on we'll call this the "generic plugin tab".
  • Open your template on Wikipedia in a web browser.
  • In the generic plugin tab, enter the name of your template. Note this should be the name of the template after following any redirects. If for example you browsed to {{WikiProjectSongs}} you would have been taken to {{Songs}}. Enter Songs into the template name textbox.
  • In the web browser click "what links here". Click 500. If there is more than one page it will be faster now to change the 500 to 5000 in the browser's address bar. Example: http://en.wikipedia.org/w/index.php?title=Special:Whatlinkshere/Template:WPBiography&limit=500&from=0 Change this to http://en.wikipedia.org/w/index.php?title=Special:Whatlinkshere/Template:WPBiography&limit=5000&from=0 and hit enter or Go.

    Search for the word "redirect" in the list (CTRL-F in Firefox and probably other browsers too). AWB can now build a list of "what redirects here". I recommend using that instead, it's easier!. Make a note of any redirects to your template. Repeat for each subsequent listing page. (Why? The plugin needs to know alternate names for your template, otherwise it may very well find a valid instance of your template on a talk page but, not knowing that it's your template, it will add another new instance. Unfortunately the plugin is simply code, it has no human powers :))

    • If you found no redirects, move to the next step.
    • If you found one or more redirects, click "Template has alternate names (redirects)" in the generic plugin tab. This will enable the "alternate names" textbox.
    • If you found exactly one redirect, enter the name of that redirect in the alternate names textbox. For example, enter WikiProjectSongs
    • If you found more than one redirect, enter the names seperated by a vertical bar. For example, enter OurTemplateRedirect1|OurTemplateRedirect2|OurTemplateRedirect3
  • If your template has an importance= parameter check importance. If it has the alternative priority= parameter click priority. If it has neither click None. (No template should have both, and if yours does you're out of luck!)
  • If your template supports class=Cat click Cat. Otherwise click NA.
  • If your template supports class=Template click Template. Otherwise click NA.
  • If your template supports auto=yes click Auto-Stub, otherwise leave that box unchecked.
  • If you want the plugin to not tag talk pages which contain a certain text, click Skip RE and enter a regular expression in the text box. In most cases you won't need to do this. However, some templates are mutually exclusive - {{WPBiography}} skips pages which contain {{WPBeatles}} or {{KLF}} because those 2 templates contain the same functionality.
  • You're all done. Click Properties to see what regular expressions and other settings the plugin has generated for your template.
  • Save your settings so that you don't have to go through this procedure again next time!

[edit] Using the plugin

  • To tag talk pages, build your list in AWB and convert to talk pages. In the configuration box on the generic plugin tab, click Auto-Stub if you're adding stub-class assessments automatically; click Stub-Class if you're adding stub class assessments manually; click neither if you're just adding your Project's banner to talk pages.
  • To assess articles, build your list in AWB and convert to articles (no talk pages, no non mainspace pages). On the main plugin tab click Manually Assess and optionally check Cleanup too.
  • Off you go!

[edit] Why would I want to do this?

  • The plugin generates advanced regular expressions which have proven themselves in over 100,000 edits by Kingbotk.
  • In vanilla AWB, the prepend text feature has no conditional statements. You either tag a page or skip it(unless you delve into the advanced find/replace feature). The plugin will add a banner if one's not there already. It will change the parameters of existing templates if they need to be changed, otherwise it will skip the page. It will skip if the attached article has been deleted. It notices and logs badly formatted tags. It's not fooled by alternate names for templates and will rename existing instances to the preferred name.
  • The manual assessments plugin allows WikiProject to assess their articles quickly and efficiently. AWB loads the article and applies any cleanup changes. The reviewer then previews the article to assess it, and clicks save or ignore. The plugin tells AWB to load the talk page, and then pops up an assessment form. The reviewer clicks checkboxes to select the grade and identify any problems with the articles, and optionally can leave a comment too.

[edit] List of supported generic templates

I'm thinking of creating a category to contain these.

[edit] XML settings supplied with the plugin

XML settings files, with the generic template plugin already configured, are supplied along with the plugin for the following templates:

If you want me to ship a settings file for your Project's template just send me the file!

[edit] Templates supported by the plugin programatically