User:HBC AIV helperbot/installation

Instructions for installing HBC AIV helperbot
This bot requires reasonably modern (minimum version 5.6.1) Perl. ActiveState Perl on Windows is known to work, as is Perl 5.8.x on FreeBSD (and thus any UNIX-like system should also work). The installation instructions for Windows are a bit more step-by-step, while basic UNIX system administration knowledge is assumed for those instructions.

Non-technical preparations
Note This may have already been done for you.
 * 1) Check for community consensus, we only need 2 or 3 of these bots running at a time.
 * 2) Discuss with WP:AIV what bot name you will choose, most likely HBC AIV helperbot . Follow the instructions at WP:RFBA for creating an account for the bot.
 * 3) Follow the instructions at WP:RFBA for getting your bot approved to function.

Pre-Requisites

 * Perl (ActiveState Perl for Windows is okay)
 * HighInBC's repaired MediaWiki module
 * Perl Modules (available in Windows PPM, CPAN for other platforms):
 * Net::NetMask
 * Perl Modules (not available in PPM, must be installed from CPAN):
 * DateTime
 * DateTime::Format::Duration (may need to force installation due to test failures)
 * make/nmake (Windows users see step-by-step instructions for further information)

Windows

 * 1) Download and install ActivePerl - Get the latest version, if you don't know which installer to use, pick MSI, with the highest version number. If you cannot tell which number is higher than another, give up.
 * 2) Download the repaired version of the MediaWiki module
 * 3) Find your perl directory, place the contents of mediawiki.rar (after uncompressing it with a utility like WinRAR) into the perl/site/lib/ directory
 * 4) Create a new folder for the bot to live in, this can be anywhere, this is the bot folder
 * 5) Create a new file called HBC AIV helperbot.pl in the bot folder
 * 6) Go here:  and copy the script between the   tags and place it in HBC AIV helperbot.pl
 * 7) Run the program called ppm (the perl package manager, it comes with perl) and install the required Perl modules listed above (only "Net::NetMask") (do this by typing install  for each module listed, or by selecting them from the graphical user interface).
 * 8) Download and install nmake from Microsoft.  It is available in this knowledgebase article as nmake15.exe
 * 9) Double-click on the downloaded nmake15.exe.  This will extract the files inside into the current directory.  Move nmake.exe and nmake.err to your Perl bin directory (usually C:\Perl\bin).  You can delete readme.txt and the original nmake15.exe.
 * 10) Run the CPAN shell by typing   from a command shell (you may need to run   if Perl is not in your command PATH.  You will be presented with a CPAN prompt that looks like
 * 11) The program may ask you several questions the first time you run it. Accept any defaults offered. When it asks you for that path to the make file, give it the full path of nmake.exe.
 * 12) Type   and hit enter.  You will be prompted a number of times to install pre-requisite modules, always answer "yes" (this should be the default).  Eventually you should see messages indicating that DateTime was successfully installed (even though there were test failures) and you will be returned to the   prompt.
 * 13) Type   and hit enter.  You may again be prompted for pre-requisites, and again, should answer yes.  The end result should again be a successful installation message (test failures are fine again, they won't affect our operations), and the   prompt.
 * 14) Type   to exit the CPAN shell, and you can now exit your command prompt.
 * 15) Skip forward to "Common steps" below.

UNIX-like systems

 * 1) Install Perl.  If you can't figure this out, you shouldn't be running a UNIX system :)
 * 2) Install the pre-requisite Perl modules listed above (except the repaired MediaWiki module - we'll do that next) using your installation method of choice (the CPAN shell is probably easiest, but if you want to download and install manually, be our guest!)
 * 3) Download the repaired version of the MediaWiki module
 * 4) Uncompress the contents of the MediaWiki RAR file into a private lib directory somewhere in your home directory.  This can be the same directory that the helperbot will live in, or a different one.  I used.
 * 5) Create a directory for the bot to live in.  Again, this can be anything, I used
 * 6) Go here:  and copy the script between the   tags and place them in HBC_AIV_helperbot.pl in your chosen directory.
 * 7) At the top of the Perl script, you will need to add a shebang line, which should look like , with the appropriate path to Perl substituted, and a   line to tell the script where to find the MediaWiki module.  This should look like   if you followed my example path above.
 * 8) Make the script executable, with something like
 * 9) Continue at "Common steps" below.

Common steps

 * 1) Set up username and password files. If I sent you these, use those, otherwise:
 * 2) Create a new file called username in the bot folder, place the bot's username in this file, do not hit enter after the name
 * 3) Create a new file called password in the bot folder, place the bot's password in this file, do not hit enter after the password
 * 4) Log into the account, go to Preferences, and in the Date and Time tab select the time format that looks like: 2001-01-15T16:12:34
 * 5) Do not use the bot account for any human edits
 * 6) Now you should be able run the bot. If you are running Windows you just be able to just double click the icon for the HBC AIV helperbot.pl file, for other OSs or from command line, you type perl  or just ./ .
 * 7) Monitor the bot's contributions and watch the log to see if it is working properly