User:HBC AIV helperbot/installation
Appearance
Instructions for installing HBC AIV helperbot
[edit]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
[edit]Note This may have already been done for you.
- Check for community consensus, we only need 2 or 3 of these bots running at a time.
- Discuss with WP:AIV what bot name you will choose, most likely HBC AIV helperbot<number>. Follow the instructions at WP:RFBA for creating an account for the bot.
- Follow the instructions at WP:RFBA for getting your bot approved to function.
Software installation
[edit]Pre-Requisites
[edit]- 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
[edit]- 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.
- Download the repaired version of the MediaWiki module
- Find your perl directory, place the contents of mediawiki.rar (after uncompressing it with a utility like WinRAR) into the perl/site/lib/ directory
- Create a new folder for the bot to live in, this can be anywhere, this is the bot folder
- Create a new file called HBC AIV helperbot.pl in the bot folder
- Go here: [1] and copy the script between the <nowiki> tags and place it in HBC AIV helperbot.pl
- 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 <module> for each module listed, or by selecting them from the graphical user interface).
- Download and install nmake from Microsoft. It is available in this knowledgebase article as nmake15.exe
- 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.
- Run the CPAN shell by typing
cpan
from a command shell (you may need to runC:\Perl\bin\cpan
if Perl is not in your command PATH. You will be presented with a CPAN prompt that looks likecpan>
- 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.
- Type
force install DateTime
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 thecpan>
prompt. - Type
force install DateTime::Format::Duration
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 thecpan>
prompt. - Type
quit
to exit the CPAN shell, and you can now exit your command prompt.
- Skip forward to "Common steps" below.
UNIX-like systems
[edit]- Install Perl. If you can't figure this out, you shouldn't be running a UNIX system :)
- 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!)
- Download the repaired version of the MediaWiki module
- 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
~/wikipedia/lib/
. - Create a directory for the bot to live in. Again, this can be anything, I used
~/wikipedia/HBC_AIV_helperbot/
- Go here: [2] and copy the script between the <nowiki> tags and place them in HBC_AIV_helperbot.pl in your chosen directory.
- At the top of the Perl script, you will need to add a shebang line, which should look like
#!/usr/bin/perl
, with the appropriate path to Perl substituted, and ause lib
line to tell the script where to find the MediaWiki module. This should look likeuse lib '/home/youruser/wikipedia/lib'
if you followed my example path above. - Make the script executable, with something like
chmod a+x HBC_AIV_helperbot.pl
- Continue at "Common steps" below.
Common steps
[edit]- Set up username and password files. If I sent you these, use those, otherwise:
- 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
- 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
- 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
- Do not use the bot account for any human edits
- 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 <scriptname> or just ./<scriptname>.
- Monitor the bot's contributions and watch the log to see if it is working properly