AWB, or AutoWikiBrowser, is a tool that can be used to do batch wiki edits. Although people refer to AWB as a "bot," think of it more as a wiki-global find-and-replace tool. While the interface can be kind of confusing to get used to, it's fairly powerful, especially if you are familiar with regular expressions, and even if you aren't it can be used to help you out with a broad array of tasks.
This guide will assume that you have already set up a bot password; if not, then follow the steps here.
Installing AWB[edit | edit source]
|Make sure to download AWB version 184.108.40.206; versions 5.x will not be able to connect to a Gamepedia wiki.|
AWB can be downloaded here. You can see more information about the download on the Wikipedia page about AWB. When you download AWB, you actually download an executable file directly and don't need to install anything.
Logging into the wiki[edit | edit source]
To proceed, you will need a bot password. Follow the instructions at that page to obtain one. Once you have a bot password, continue with this section.
First of all, set up the site that you need. This is under Options -> Preferences -> Site. You need to do three things here:
- Pick "custom" as your project
- Select "https://" instead of http://
- Enter the domain name of the wiki (for example
help.gamepedia.com) you want into the text field (n.b. don't include "https://" since you specified that above/before)
Now that you have chosen your site, you can set up your account or accounts. Many users will want to have two separate accounts; one of them is their own, and one of them is a bot with bot rights. This way when doing brief tasks you can have them show up in Recent Changes, and longer tasks can be hidden from view there; or for more involved tasks you can start as yourself and then switch to your bot after a few pages so editors are aware of the changes but the logs aren't spammed. You should discuss with other admins and/or your wiki manager the best process for your own wiki, as different wikis may have different guidelines for this.
- Note that when we talk about "bot accounts" that's a completely different concept from a bot password; one account can have multiple bot passwords associated to it. Think of a bot password as being similar to a backup code that you might set up when you have 2-step verification on a website; it's a way to guarantee that the account is you without using your normal password. Conversely, a bot account is a second account with its own email address & password that you log into Gamepedia with, that has a different set of user rights; in particular, it has the Bot right.
That said, the way you set up an account is the same regardless of how many accounts you set up. Go to File → Log in/profiles and then press Add. The Username should be AccountName@BotPasswordName, for example if your username is
RheingoldRiver and your bot password is called
AWB, you would type
RheingoldRiver@AWB. Assuming you are on a secure computer, you probably want to check the Save Password field. Once you have configured your account or accounts, log in by double clicking on the account you want to log in with.
Note: If you have just created your new bot account, make sure to log in to the wiki with that new account (as you would with your normal login) and make three small edits before trying to use AWB.
Find-Replace[edit | edit source]
- First, you will want to make your list of pages you care about. This may be a category, or "What links here," or really any of the options.
- Once you have your list of pages, click the "Options" tab to the right and then "Find and replace."
- Check the box to the left of the text, and then press "Advanced settings." If you just want to do a simple typo correction, you can type the exact text to find into the top box and the replace text below it.
- It's also possible to do more advanced find-replace commands using regular expressions. Appropriate times to use regular expressions are if you want to match similar, but not exactly identical, patterns of text. See the next section for some resources on learning how to do this.
Resources for learning regular expressions[edit | edit source]
More advanced find-and-replace operations can be done if you use regular expressions.
- https://regexr.com/ - test your regex and make use of resources including a cheat sheet in its sidebar as you do.
- https://regex101.com/ - similar to the above.
- https://www.regular-expressions.info/ - this site is relatively technical but gives a thorough introduction to regex. If you have trouble following its explanations, don't worry - it's written at a high level and is best used when supplemented with other resources.
Blank editing in AWB[edit | edit source]
Especially if your wiki does work with Cargo, you may want to use AWB to automate "null edits" to page, or the process of editing & then saving a page without making any changes. Fortunately, this is easy to do: Just go to Options -> Apply changes automatically, and deselect this option.
Troubleshooting[edit | edit source]
If you are getting an error message and asking for help, please screenshot the error message and send the screenshot to the person you're asking for help!
Issues logging in[edit | edit source]
- Has your bot visited the wiki you are trying to log in to from a browser? If not, it won't be listed as a registered user yet.
- Are you formatting your username correctly, i.e. username@BotPwdName?
- Are you using https instead of http? (You want https.)
- Are you trying to log into the right wiki?
- Did you previously use an incorrect login, and are now unintentionally trying to log in with the same credentials? If you are using the "quick login" instead of "add..." make sure you're clicking the button to the right of the fields and not above; also make sure you delete incorrect credential sets.
Issues choosing pages[edit | edit source]
- Did you select the "all namespaces" version of the field you are trying to use? If not, AWB will only look in the main namespace.
Issues saving pages[edit | edit source]
- Is "Apply Changes Automatically" under Options checked? If not your bot is attempting to null edit, not save pages.
- Are you logged into the correct wiki for the pages you are trying to edit?
- If you are doing a find-replace, are your rules Enabled? (checkbox to the right of the Name)
- Do you have follow redirects under Options checked when you don't want to? (Or vice versa)
- Are the pages you're trying to edit protected? If so, does your bot have the needed privileges in Special:BotPasswords? Note that cascading protections is a different permission from regular protection; you may need to temporarily disable cascading protection from the front page.
Issues with regular expressions[edit | edit source]
- Did you remember to check "Regular expression"?
- Are you using Singleline (
.matches newline if enabled) and Multiline (
$match the start and end of lines instead of pages) correctly?
- Did you check your regex actually works? Using the Test... dialogue can help with this.
- Do you have an If condition specified on the rule when you don't mean to? (The tab behind your rule)
- Did you remember to escape all needed punctuation? (