*Could you have the plugin remove the "auto=yes" parameter from the WPBiography tag, if it exists, when assessing such an article for another WikiProject? [[User:Jwillbur|jwillbur]]<sup>[[User talk:Jwillbur|talk]]</sup> 02:45, 24 April 2007 (UTC)
*Could you have the plugin remove the "auto=yes" parameter from the WPBiography tag, if it exists, when assessing such an article for another WikiProject? [[User:Jwillbur|jwillbur]]<sup>[[User talk:Jwillbur|talk]]</sup> 02:45, 24 April 2007 (UTC)
*See if there's any reasonable way of adding a "photo/image needed" tag in assessments mode, when user is adding a WP template which doesn't have a needs photo parameter. (Per a post by [[User:JodyB]]). --[[User:Kingboyk|kingboyk]] 15:17, 28 April 2007 (UTC)
*See if there's any reasonable way of adding a "photo/image needed" tag in assessments mode, when user is adding a WP template which doesn't have a needs photo parameter. (Per a post by [[User:JodyB]]). --[[User:Kingboyk|kingboyk]] 15:17, 28 April 2007 (UTC)
*Australia plugin option needs an option for "music=yes" ([[WP:AUSMUS]]) [[User:Giggy|<font color="green">Giggy</font>]] <sup>[[User talk:Giggy|Talk]]</sup> 06:52, 23 August 2007 (UTC)
{{/Users}}
==Technologies used==
==Technologies used==
Revision as of 20:30, 26 August 2007
User:Kingbotk/Plugin/Template
The Kingbotk plugin is a set of AWB plugins written by Kingboyk in VB.NET and used by various automated bot accounts including Kingbotk. The plugin also provides features to assist article reviewers, and ships with a reusable library of functions and objects for use by programmers.
News
26 February 2007
It would probably be wise to have AWB skip pages which contain {{WikiProjectBanners}} or {{WikiProjectBannerShell}} for now as the plugin might move templates from out of that container, or place new banners at the top of the page. If you have any ideas about how to proceed please place them on the talk page. --kingboyk 20:06, 26 February 2007 (UTC) Edited --kingboyk15:28, 2 March 2007 (UTC)[reply]
This tool is released as is and without warranty. You are RESPONSIBLE FOR YOUR OWN EDITS.
AWB and this plugin are both very powerful tools. You should familiarise yourself fully with the guidelines, instructions and operation of both tools before using them.
Ensure you have the latest version, or that any upgrades/changes in newer versions don't apply to you.
Instructions for automated use with a bot account:
The above guidelines doubly apply when doing automated edits, particularly making sure you understand what the plugin does and doesn't do.
The template tagging feature is extremely well tested, but sometimes new internal changes introduce the risk of something breaking or a new bug. Always run a manual test if a version's release notes says it includes such changes. The author runs tests too but can't test for every eventuality and relies to an extent on the users to test.
Before using a new template plugin do a few manual edits first. Some template plugins (WPBio, WPMilHist, WPAustralia, Generic) are very well tested; others might never have been used.
If you've run successful tests on a new version or found a bug please post on the talk page asap.
Specification
This plugin comes with several WikiProject-specific tools:
Templating plugins
Wikipedia Assessments within AWB. Click on the image to see it in better resolution
All templating plugins:
Work together. Multiple plugins can be active at the same time to allow tagging for more than one project.
Have optional user configurable parameters
Use safe, well tested regular expressions to avoid double tagging, recognise badly formatted tags, and safely integrate new parameters into existing templates
{{BioCOTWs}} is replaced with collaboration-candidate=yes
listas= is calculated and added if no DEFAULTSORT key is present (manual mode only; there are too many variations in human naming for this to be done by bots)
listas= is removed if a valid DEFAULTSORT key is present
the template call is reformatted and (if living=yes) moved to the top of the talk page, so that the living persons bio warning gets its proper placement
marks parameter and template renaming as minor edits, parameter value changes as major
Replace the {{DEFAULTSORT}} template with the same magic word
Move the DEFAULTSORT magic word to the top
Generic templates plugin
If your WikiProject's template is "generic" (you have a class= parameter and no workgroups, and no need for other customised programatic logic) the plugin now supports your template! Simply enter the name of the template, any alternate names (redirects), and click a few boxes to configure the plugin. See Generic WikiProject templates for more information. Note that even if your Project's template has workgroups, you can use the plugin on talk pages/categories which don't need a new workgroup parameter to be added. The plugin doesn't remove parameters it has no knowledge of; rather, if your Project doesn't have a specific plugin you simply won't be able to add such parameters.
Wikipedia Assessments plugin
Loads and optionally cleans articles, then prompts user to (p)review the article
Presents reviewer with an assessment form, with checkbox options for class, importance, etc
Allows reviewer to leave a /Comment
Diffs
File:Kingbotk plugin manager tab.jpgThe plugin manager's tab (v0.3) in AWB. The other tabs owned by the plugin and AWB have been hidden at user request.
WPBiography plugin
[1], [2] (marked as minor), [3], [4] (no changes made by bot - page skipped), [5], [6], [7] (a bit more going on here), [8] (blank page)
Given the rate of change of WikiProject templates, I think we need to consider extending the "generic template" functionality to include adding/changing/removing user-configurable template parameters. Instead of developing plugins for each template, WikiProjects would be encouraged to build and share their own XML settings files. Possibly some WikiProjects will need programatic support still, if the plugin needs to apply more advanced logic to their templating, but I think most won't.
{{WikiProjectBanners}}/{{WikiProjectBannerShell}} needs to be supported but I'm not sure yet how. Do we place {{WPBiography}} with living=yes inside or out? Do we create {{WikiProjectBanners}} instances or just recognise their presence? Current code which puts any {{talkheader}} present to the top, and any WPBio with living=yes as second in priority, would need to be amended too.
Do we want to have the plugin (via AWB?) load the article and look for stub and infobox templates?
Manual assessment
Look at whether it would be practical/desirable to have extra params/templates on the manual assessments popup form (per Talk)
Other planned changes
The todo comments in code
Consider controlling length of edit summaries by using a generic collection of important/unimportant edit summary items, and deciding on which to use at the end of processing the article (currently large category names, more than one template at a time, or multiple parameters are causing the edit summary to get chopped).
Sanity-check parameter values and (in bot mode) log any which need manual inspection. Currently the plugin just ignores parms and values it doesn't know about, and only logs badly misformed tags (those which break it's main regular expression).
Bot
Rather than just working through Category:Living people and tagging with living=yes, the bot could check any biography and apply AWB's living people check to add it to the category, then tag the talk page with living=yes. This would require a new permission for my bot as I'm currently permitted to do talk-page tagging only. At the present time it's not a necessary change as I have enough to do tagging the living people and then the people by occupation categories. It might be useful for making more of an intelligent bot, however.
In the longer term, plugins could be used to make AWB more of a bot. Save talk page lists in a database, periodically scan categories and compare against the WPBio living persons category/transclusions. Bot manager, predefined jobs (including creating lists).
User:Reedy Boy & Kingboyk: Wikifunctions2.dll has been converted to C# and merged into AWB. Various modifications have been made to the plugin for it to work smoothly with AWB version 4. Note: Please help updating docs and links now wikifunctions2 no longer exists.
1.3.0.0
Kingboyk: Fixed bug in wiki-format logger where article name was truncated if it contained a colon. Improved edit summary and parameter handling when dealing with WPBiography child workgroups. Plugin logging now receives notification of username and logged in username changes, so errors with the log upload location being incorrect ought to be resolved. Now filter braces from a generic template definition. Major internal changes - now I have access to the AWB codebase too, I've been able to introduce a much more elegant OOP solution. However, the changes run quite deep so watch out for breakage please.
Kingboyk: New features: Sam and I have improved the new AWB logging tab (we're both AWB devs now, so often fixes and improvements for the plugin will happen in AWB); this version of the plugin will now add log info to that tab. Added code to recognise and tidyup the DEFAULTSORT magic word or the {{DEFAULTSORT}} template; WPBio listas= parameter removed if DEFAULTSORT is present. Added an "estimated time of completion" label to the main Kingbotk plugin tab. Implemented feature requested by Mike Peel: "Build a list of pages that the plugin would change, without making any change. List should be in a format that can be read back into AWB to be processed."
Tweaks: Filter out illegal-in-page-names characters from upload-jobname (AWB-side routine written by Sam). Some code has been moved from plugin's wikifunctions2 to AWB's wikifunctions. Updated {{talkheader}} regular expression to catch redirects. Implemented Plugins\Kingbotk\Set AWB menu item: click this to turn off a few AWB features which the plugin doesn't need.
WPBiography: Added explicit living=no parameter option. {{BioCOTWs}} is replaced with collaboration-candidate=yes. "Second chance" regex (the one which looks for bad or additional templates) tightened up a little. Added support for new Film workgroup.
WPMILHIST: Migrate Middle-Ages-task-force to Medieval-task-force.
Major regular expression change: The right-hand side of the templating regular expression, immediately after the end of the template name, now has a \b meaning "word boundary". My tests so far are positive but if advise me of any problems immediately please.
Reedy Boy: WPMILHIST: Expanded template workgroups as per WPMILHIST. Expanded context menu to encompass workgroups. Added a simple error displaying form to catch log upload errors.
Kingboyk: Various usability tweaks and internal changes. Added two new workgroup parameters for {{WPBiography}} (peerage and baronetcies). Updated WPBiography regular expression to handle {{Bio}} and {{BIO}} alternate names. Added WP Novels logs location. Fixed a bug in logging causing an extra (superfluous) log page to be created at the end of a run. Nudge timer removed in favour of same feature in new AWB. Tweak to have redlink category talk, template talk etc increase the New page counter in tagging mode (previously only new Talk: pages upped the counter).
Kingboyk: {{WPBiography}}: Replace parameterless {{activepolitician}} or {{activepol}} with activepol=yes. Skip article if only change is to add a WPBio listas= parameter. Add option to override the skip behaviour and force the addition of listas. Added code to ensure that the WPBio template is the last to be processed (including after generic templates) to hopefully ensure that living=yes gets top placement (after the templates mentioned in the next paragraph).
Add code to ensure that we leave {{skiptotoctalk}}/{{Skiptotoc}}/{{Skiptotoc-talk}} at the top. This new code, and the old {{talkheader}} code, has been placed into WikiFunctions2.dll so that other applications may use it too.
Minor: Settings files with assessments and cleanup turned on were causing an error because of a change in AWB's user interface. Fixed.
Reedy Boy: Minor: Fixed bug where settings couldn't be reloaded after generic template created with a space in the name. Space is automatically removed.
Kingboyk: Removed special handling of the now long-migrated WikiProject British Royalty and merged into main {{WPBiography}} regex. Added support for WPBio's needs-photo parameter and India's need-image (article assessments), plus some code to handle {{reqphoto}} - feedback invited. Fixed a bug where plugin wanted to upload logs even if Upload turned off (I'm amazed nobody reported this?!). Added support for WP India's Gujurat workgroup. Added support for WP India's workgroup importance parameters. Automagically create a WPBio listas= parameter. Various minor logging and assessment bug fixes. Added dynamic edit summaries for article assessments and hopefully fixed any remaining bugs surrounding edit summaries.
Kingboyk and Reedy Boy: Added support for {{NovelsWikiProject}}. As always when we add a new template, we have to say: we've tested this in a limited fashion only. Please ensure for yourself that it does what you expect before letting it run as a bot.
Kingboyk: New settings code to work with latest AWB, and other tweaks.
Reedy Boy: New parameters for WP India. Changes of other code for migration to new AWB version
0.9.1
3rd December 2006
Added support for {{WP India}}. Hopefully fixed the date formatting in log entries where user's Windows settings aren't English, by forcing the AWB thread to US English at startup. These edits done by me with Windows set to French were successful: [9][10]
0.9.0
11th November 2006
Auto-uploading of logs. Skipped to v0.9, as current feature set is complete for v1 - just tweaking, small additions, and bugfixes to do. Logging feature significantly improved: logging tab with options and status, reusable logging feature in a new WikiFunctions2.dll, automatic uploading of logs, logging settings can be changed without having to restart AWB. Small issues with the first alpha release: This version waits until it has enough lines to do an upload, and does it. So, if you have it set to upload at 500 lines, and the eventual entire output is 501 lines, you'll get 2 pages upload, 500 lines and 1 line. I'll refine this in the next update. Bad page logs not uploaded. Don't change settings once logging has started yet; exit AWB and reload it.
0.7.2
Added XML settings file and textbox context menu for {{NovelsWikiProject}}. Added new "NBL" parameter for {{WP Australia}}. The WP Australia template has some parameters which can be called with alternate names ("V8", "v8"; "NBL", "nbl"), so I've written an extra (overloaded) "parameter check/add" routine, which can accept an alternate name, for those parameters to call. Plugin now uses the "AndAlso"/"OrElse" short circuiting expressions in places, for efficiency. This shouldn't break anything (hopefully!). Added 3 new boilerplate text buttons to the Comments form. Timer-reset button. Menu item to turn nudging on/off.
0.7.1r1
(No code changes in plugin DLL). Supply the newest version of AWB (3.0.4.1). Updated settings file for {{Film}}. Supply settings file for {{WP Indonesia}}.
0.7.1
i) Fixed a null-reference bug which was causing an error box to be displayed when clicking Skip on the assessments form. I'm not convinced this feature is robust though so please help me test it. ii) Plugin now checks the AWB edit summary box and if the summary is "clean up" (the AWB default) when tagging talk pages it changes it to "Tagging". This is a prelude to the "Set AWB" menu item for setting sensible AWB defaults, which I will implement soon. iii) Removed 2 unused menu items. iv) Added tooltips to menu items.
0.7.0
Added {{songs}} and {{album}} plugins. Made preferred-name regex stricter ({{albums}} wasn't being renamed to {{album}})..
0.6.2
Added support for 3 new WPBiography workgroups and the {{musician}} template. Support one new WPMILHIST workgroup. Provided XML settings file for {{film}}. Some internal changes. Plugin should now merge multiple instances of same template on a page (regardless of name) if they have non-conflicting parameters and is otherwise a bit more lenient towards incorrectly formatted/doubly-added templates. Found a very strange case: page has one valid WPBio template and one bad WPBio template; the latter wasn't being noticed so the page wasn't being skipped as "bad tag". Fixed.
0.6.1
Remove importance= parameters from existing instances of {{WPMILHIST}}, per request. Workaround for a bug which occurs when the Cleanup box is checked and the Manual Assessments box is not checked (cause is still a mystery). Plugin should no longer give AWB a nudge when the user has chosen to stop processing (not tested yet). Added entry for generic plugins and MILHIST to the edit box's context menu; also added submenu for "importance". Some minor internal architectural changes. Updated Physics XML (they now support auto=yes) and tested new settings.
0.6.0
Added support for "Generic WikiProject templates". Added Auto-Stub feature for WPMILHIST. Minor architecture tweaks. Skip stub-class code if processing non main-talk, to get a more succinct edit summary and no stray auto=yes tag.
0.5.0
Added {{WP Australia}} and {{WPMILHIST}} plugins. Changed placement of {{reqphoto}} in the assessments class. In bot (auto-save) mode, plugin gives AWB a kick if it doesn't send any articles in 10 minutes. (The newly supported templates don't have right-click context menus in the AWB edit box yet).
0.4.0
Added Wikipedia assessments plugin. We now get notification from AWB of starting/starting so can log this and properly start/stop the timer. Red link checks/warnings. Non-standard namespace handling.
0.3.2
Added code to customise template placement.
If the template already exists, put it back in the same place
...unless it's {{WPBiography}} with a living=yes parameter, in which case put it at the top
Put new templates at the top
Finally, if (and only if) I've moved a template to the top or placed a new template at the top, search for {{Talkheader}} and if present move that to the top.
0.3.1
Edit-box context menu additions, UI improvements
0.3
Much improved architecture, comprehensive user interface. {{WPBiography}} (all parameters) fully supported. Other templates being added.
0.2
Development version. Added a user interface and placeholder support for other WikiProjects and for manual Wikipedia 1.0 assessments.
0.1
Features Basic template addition/reparameterising for living persons bios. Object orientated design, with the BLP plugin inheriting from a base class.
Or - rather than have all this parameter support specific to each project what about defining the parameters in the XML settings and generically coding for all of them. Indications could be made for radio button type options to group the parameters to be alternatives to each other. (i.e. like the "stub, start, a-class, b-class" etc). :: Kevinalewis : (Talk Page)/(Desk)17:54, 7 December 2006 (UTC)[reply]
I'm hoping to move to a more user-configurable model in version 2. These are both good ideas which I'll consider at the time. --kingboyk20:03, 27 March 2007 (UTC)[reply]
Note that Mike no longer uses Windows or AWB.
Could you have the plugin remove the "auto=yes" parameter from the WPBiography tag, if it exists, when assessing such an article for another WikiProject? jwillburtalk02:45, 24 April 2007 (UTC)[reply]
See if there's any reasonable way of adding a "photo/image needed" tag in assessments mode, when user is adding a WP template which doesn't have a needs photo parameter. (Per a post by User:JodyB). --kingboyk15:17, 28 April 2007 (UTC)[reply]
The plugin was conceived and developed by, and is maintained by, Kingboyk (talk·contribs). Since version 0.90.1 Reedy Boy (talk·contribs) has also had SVN write access and he will be helping me with development and adding new features.
The plugin is written in VB.NET. If you have experience in very object orientated VB.NET library programming and some time to spare, I will consider giving you SVN access. Please drop me a line by any of the usual methods.