User:Kingbotk/Plugin

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 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.

Contents

[edit] News

As of version 2.0, which will be released with v4.2 of AWB, the Kingbotk Plugin supports {{WikiProjectBannerShell}} and {{WikiProjectBanners}}:

  • Existing WikiProject templates will always be written back into the shell container it came from if we detect one
  • New WikiProject templates will be written into the existing {{WikiProjectBannerShell}} or {{WikiProjectBanners}} template

If we have other edits to do we will also:

As originally designed, when a page is being processed each active templating plugin (WPBio, Album etc) gets called by the Kingbotk Plugin Manager and decides if it has any edits to make (and templating plugins which the user hasn't enabled aren't called at all). If every active templating plugin decides it has no work to do we never get to the part of the code where we write out templates and examine their position on the page. If folks find the cleanup features useful I might do some restructuring later on to have the Plugin Manager, the Article object we create for each page, or the first active templating plugin, examine the page for these templates before doing anything else (so we never skip a page where we could clean a template). I might also consider allowing the WPBio plugin or the plugin manager to examine the page for WPBiography|living=yes even if we're not going to be writing one of those templates. However, I felt it more important to get this feature out and tested than start breaking apart the internal structure of the plugin, a structure which allows for new plugins to be added easily and which is a very nice OOP model.

Bug reports: Version 2 has "Kingbotk Plugin++" or "Plugin++" in it's edit summary. Please don't complain about the plugin not writing into these shell templates if the edit summary doesn't include that string. However, bug reports related to these templates where the edit summary includes "Kingbotk Plugin++" or "Plugin++" are requested. Some rather sophisticated regular expressions power this new feature and I wouldn't be at all surprised if there's some errors along the way. Caveat emptor &c. --kingboyk (talk) 22:11, 17 January 2008 (UTC)

[edit] Downloading and using the plugin

[edit] Warning and disclaimer

  • 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.

[edit] Specification

This plugin comes with several WikiProject-specific tools:

[edit] Templating plugins

Wikipedia Assessments within AWB. Click on the image to see it in better resolution
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

[edit] WPBiography plugin

  • The importance= parameter is replaced with priority=
  • Living=yes is optionally added/replaced if missing or =no
  • {{Blp}} is replaced with living=yes
  • {{Activepolitician}} is replaced with activepol=yes
  • {{reqphoto}} is replaced with needs-photo=yes
  • {{stubclass}} with "Biography" somewhere in the parameters is replaced with auto=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, unless a shell like {{WikiProjectBannerShell}} is present (template will be left in situ, or written to the top if new. Plugin doesn't yet write new templates into these containers or otherwise reformat them).
  • marks parameter and template renaming as minor edits, parameter value changes as major

[edit] Albums plugin

  • If {{Album}} is missing, it adds it
  • {{Needsinfobox}} is replaced with needs-infobox=yes

[edit] Australia plugin

[edit] India plugin

  • If {{WP India}} is missing, it adds it
  • {{reqphoto}} is replaced with image-needed=yes

[edit] Military History plugin

[edit] Novels plugin

  • If {{NovelsWikiProject}} is missing, it adds it
  • marks parameter and template renaming as minor edits, parameter value changes as major
  • {{Novelinfoboxneeded}} is replaced with needs-infobox=yes
  • {{Novelinfoboxincomp}} is replaced with incomp-infobox=yes
  • {{reqphoto}} is replaced with needs-infobox-cover=yes

[edit] Songs plugin

  • If {{Songs}} is missing, it adds it
  • {{sir}} is replaced with needs-infobox=yes

[edit] General

  • Move {{talkheader}} to the top
  • Move {{skiptotoctalk}} to the top
  • Replace the {{DEFAULTSORT}} template with the same magic word
  • Move the DEFAULTSORT magic word to the top

[edit] 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.

[edit] 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

[edit] Diffs

The plugin manager's tab (v0.3) in AWB. The other tabs owned by the plugin and AWB have been hidden at user request.
The plugin manager's tab (v0.3) in AWB. The other tabs owned by the plugin and AWB have been hidden at user request.

[edit] 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)
  • Logs

[edit] Todo

[edit] Version 2++ (v3?)

  • 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.
  • Do we want to have the plugin (via AWB?) load the article and look for stub and infobox templates?
  • Per the News release where {{WikiProjectBanners}}/{{WikiProjectBannerShell}} support was announced, we might want to alter the program flow somewhat to check these templates whether or not we are going to write to them (and also perhaps to write all WP templates out in one go instead of calling the regexes for each active plugin; WPBio as always complicates things :))
  • Probably not - belongs in AWB? - {{WikiProjectBanners}}/{{WikiProjectBannerShell}} - there's always the possibility of the plugin creating these templates if a certain number of WikiProject templates are on the page. However, 1) we'd need a list of WP templates, 2) this is getting well beyond what the plugin was designed for and into AWB's territory.

[edit] Manual assessment

  • Look at whether it would be practical/desirable to have extra params/templates on the manual assessments popup form (per Talk)

[edit] 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).
The plugin's object model (v0.9) in the Visual Studio Object Browser. Click to enlarge.
The plugin's object model (v0.9) in the Visual Studio Object Browser. Click to enlarge.

[edit] Possible future enhancements

  • 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).

[edit] 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).
  • I'd like it if making lists was easier. e.g. grab list, display list of subcats with checkboxes, trawl those; remove dupes and incorrect namespaces, convert to talk, remove dupes; and get a category or transclusion list to filter against (semi) automatically

[edit] Version history

[edit] Feature requests

Please place your requests on the talk page; a developer will move requests which are being considered here.

  • Perhaps sanity check existing params, see Talk. --kingboyk 16:10, 28 September 2006 (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? jwillburtalk 02:45, 24 April 2007 (UTC)
    • Is this still an active request? I could do it but it might be quite complicated... --kingboyk (talk) 19:12, 13 January 2008 (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). --kingboyk 15:17, 28 April 2007 (UTC)
    • Bump. Steve? Sam? --kingboyk (talk) 22:01, 17 January 2008 (UTC)
  • Is it possible to get an additional comment for the assessment comment window indicating the article needs a "Peer Review"? I came across a very high quality unassessed article and all I could do was assess it as A class and come back later in Firefox and add my comment. Even better could the assessment comment be editable?--Doug.(talk contribs) 04:14, 2 March 2008 (UTC)
  • Any way to make the "needs attention" box available without going to the assessment comments?--Doug.(talk contribs) 04:14, 2 March 2008 (UTC)
  • I guess what I mean here is is there any way to have the option of adding the "needs attention" parameter in an automated way, when tagging talk pages rather than by going through the whole assessment process by opening the article first. Not as important though as the first request (peer review) though.--Doug.(talk contribs) 05:02, 2 March 2008 (UTC)

[edit] Mailing list/user list

If you download the plugin, please add the Plugin page to your watchlist. It's also recommended that you add your username here so that you can be notified of any critical updates. Note: I hope never to have to message you, as I will only send out mailing lists if a critical bug is discovered. For general news and notification of updates you need to add the page to your watchlist.

  1. Plange (talk · contribs)
  2. Longhair (talk · contribs)
  3. Emt147 (talk · contribs)
  4. Grafikbot (talk · contribs)
  5. Kevinalewis (talk · contribs)
  6. Halibutt (talk · contribs)
  7. Kilo-Lima (talk · contribs)
  8. Errabee (talk · contribs)
  9. Setanta747 (talk · contribs)
  10. Cbrown1023 (talk · contribs)
  11. Mike Peel (talk · contribs)
  12. TheMadBaron (talk · contribs)
  13. Ganeshk (talk · contribs)
  14. Lostintherush (talk · contribs)
  15. Carabinieri (talk · contribs)
  16. Valentinian (talk · contribs)
  17. Stefan (talk · contribs)
  18. Cyberjunkie (talk · contribs)
  19. Menasim (talk · contribs)
  20. Snowolf (talk · contribs)
  21. SimonD (talk · contribs)
  22. Jwillbur (talk · contribs)
  23. JP06035 (talk · contribs)
  24. Mocko13 (talk · contribs)
  25. Roswell native (talk · contribs)
  26. Nmajdan (talk · contribs)
  27. Parutakupiu (talk · contribs)
  28. Jogers (talk · contribs)
  29. Mcginnly (talk · contribs)
  30. DDima (talk · contribs)
  31. Casper Gutman (talk · contribs)
  32. Violask81976 (talk · contribs)
  33. Kimon (talk · contribs)
  34. JodyB (talk · contribs)
  35. S (talk · contribs)
  36. Bookandcoffee (talk · contribs)
  37. EdBoy002 (talk · contribs)
  38. Clyde Miller (talk · contribs)
  39. Vassyana (talk · contribs)
  40. AuburnPilot (talk · contribs)
  41. RHB (talk · contribs)
  42. Visor (talk · contribs)
  43. Boy1jhn (talk · contribs)
  44. Boricuaeddie (talk · contribs)
  45. Dinosaur puppy (talk · contribs)
  46. Dihydrogen Monoxide (talk · contribs)
  47. Moondyne (talk · contribs)
  48. Thadius856 (talk · contribs)
  49. MacGyverMagic (talk · contribs)
  50. Severo (talk · contribs)
  51. countincr (talk · contribs)
  52. Magioladitis (talk · contribs)
  53. Lantonov (talk · contribs)
  54. SkierRMH (talk · contribs)
  55. Krator (talk · contribs)
  56. Parent5446 (talk · contribs)
  57. Doktor Wilhelm (talk · contribs)
  58. Dycedarg (talk · contribs)
  59. Fabrictramp (talk · contribs)
  60. Stepshep (talk · contribs)
  61. Compwhizii (talk · contribs)
  62. Tinucherian (talk · contribs)
  63. Captain panda (talk · contribs)

[edit] Technologies used

The plugin makes use of various technologies including: inheritance (see also polymorphism and encapsulation), interfaces, regular expressions, reflection, XML, XHTML, GDI+, and Windows Forms. Of course most modern programs use most or all of these but listing them like this makes me look clever ;)

[edit] Developers

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.