Wikipedia:AutoWikiBrowser/Custom Modules

Using multiple Custom Modules

 * See AWB Manual: Tools: Make Module for how to include a custom module

By default, you can't actually use multiple custom modules; by using simple coding techniques, you can use multiple.

Just be aware, you may need to tweak your summary and skip changes (if you're not using skip, it's easier). Summary, just use +=, to append onto the summary

Mass AfD tagging
Go to "Tools" → "Make module" and paste the following code:

Replacing EDIT_SUMMARY_HERE with the desired edit summary (keep the quotes around the summary; if you want actual quotes in the summary write them as \") and TAG_TO_ADD_HERE with the tag you want to add to the top of the page (again keep the quotes around the summary and the \r\n after it). If you want the tag to be at the end of the page replace the line with Then check the "Enabled" box, press "Make module", and then "Done".  Keep the "edit summary" box in the main AWB form empty.

Passing text to external program for processing
Note: An interface now exists in AWB for this

So, working directory, is where the file you want to run is. File name is obvious, arguments, is probably how you want to pass it the article text or similar.

Inserting text just before categories
Could be easily adapted for inserting into other parts of the page.

Add template if not already on talk page
This example will add Talk header if it doesn't exist on the page already

How to write initialization code that's run just once
AWB will run your ProcessArticle method many times, once for each page processed. Sometimes you want to put initialization code into the Custom Module which will be executed only once (as in the example below, reading "words to unlink" from a text file). To do this, put the initialization code into a static constructor and store values into one or more static fields like this:

Customised "General Fixes"
A way was requested to run the general fixes, but to disable certain specific ones. Therefore, the code has basically just been duplicated as a Custom Module, and the lines with "//" specify the lines where a general fix has been disabled.


 * 1) Paste the following into the "Make Module" window at "Tools". Leave language at "C# 2.0", click "enabled" and "make module". The below sample has the insertion of &amp;nbsp; disabled.
 * 2) In the "Options" tab, disable "Apply general fixes"
 * AWB version 5.4.0.1 / SVN