Jump to content

Wikipedia talk:AutoWikiBrowser

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 22 hours ago by DavidBrooks in topic Split database dump files

Start a new discussion

This is the discussion page for the AutoWikiBrowser (AWB) project. It is also the place to discuss using the AWB program (for help, questions, or general inquiries about AWB). Specific guidelines on where to make particular reports or requests are provided in the § Before you post section below. Before asking a question, please refer to the read the § Frequently asked questions below.

Before you post

[edit]
Do you want to ...Please use
Report a bug or request a feature in AWB?Check reported bugs on Phabricator before filing a new bug report. You do not need to create another account there; just log in with your global Wikimedia account. See this MediaWiki wiki page on how to report bugs and request features on Phabricator.
Report an incorrectly fixed typo?Wikipedia talk:AutoWikiBrowser/Typos
Request approval to use AWB?Wikipedia:Requests for permissions/AutoWikiBrowser
Ask a question about AWB or ask for help?This page

Frequently asked questions

[edit]

Discussion

[edit]

Find instances of an article's title in the body

[edit]

Per title, is there any way to do this with find and replace, without setting up a new rule for each article? Can magic words be used for this? One use case would be wrapping instances of the title in {{lang}} templates in articles about foreign words (e.g. those in subcategories of Category:Words and phrases by language), per MOS:LANG. Thanks! Helpful Cat🐈 02:04, 5 October 2026 (UTC)Reply

@Helpful Cat: Yes, there are some magic strings that you can include in your "Find" and "Replace" strings; see the table at Wikipedia:AutoWikiBrowser/Find_and_replace#Normal_settings. -- John of Reading (talk) 06:45, 5 October 2026 (UTC)Reply
Amazing, thank you! Helpful Cat🐈 06:48, 5 October 2026 (UTC)Reply
Do you know if there's a way to respect the original case when using these magic strings? Let's say I'm finding %%title%% and replacing it with {{lang|af|%%title%%}} (for Afrikaans text). Is there a way for lowercase instances of the title to remain lowercase?
I know there's a case-sensitive setting, but I would like to find all occurrences of the title regardless of case. Thanks! Helpful Cat🐈 12:55, 5 October 2026 (UTC)Reply
@Helpful Cat: Try finding (%%title%%), replacing with {{lang|af|$1}}, with "case sensitive" turned off and "regex" turned on. The round brackets tell the find+replace code to remember what it matched and the $1 prints it out again. -- John of Reading (talk) 13:59, 5 October 2026 (UTC)Reply
Amazing, looks like that works. Thank you! Helpful Cat🐈 14:13, 5 October 2026 (UTC)Reply

Prepend unless already there

[edit]

Is there a way to have AWB prepend text unless that text is already present? I know there's the option to skip pages that contain certain text, but I don't necessarily want to skip those pages entirely, because there are also other changes I'm making. Thanks! Helpful Cat🐈 10:22, 5 October 2026 (UTC)Reply

Wait, it removes the duplicate automatically, so maybe this question wasn't necessary:
Wow! Helpful Cat🐈 10:31, 5 October 2026 (UTC)Reply

One-time find and replace

[edit]

Is there a way to find and replace within the edit box, without making it a rule? Let's say I'm finding (%%title%%) and replacing it with {{lang|af|$1}} (to tag it as Afrikaans text as I described above). By default, this also italicises the text. Let's say in one specific article, the text should not be italicised because it's a proper name, so I need to add |italic=no to the lang template. However, I don't want to make it a rule that (%%title%%) should always be replaced with {{lang|af|$1|italic=no}}, because the text should be italicised in most articles. Is there a way to find instances of the template in the edit box and replace them with the italic=no version? I see there is a find function for the edit box, but I don't see a replace function. Thanks! Helpful Cat🐈 11:04, 7 October 2026 (UTC)Reply

@Helpful Cat: No, I don't there's a direct way to do this. One workaround would be to grab the text from the edit box and paste it into an external editor such as Notepad++, use that editor's find and replace, and paste it all back into AWB. Or, if I thought that "one-time" might well turn into "ten or a dozen times", I'd set up a second find and replace rule, and use the "Enabled" column to switch on whichever was appropriate for the current article. -- John of Reading (talk) 12:10, 7 October 2026 (UTC)Reply
Thank you! Helpful Cat🐈 12:18, 7 October 2026 (UTC)Reply
You might be able to get it done with a greedy ([\s\S]+) after the search term so that it pulls everything after the match, and then make sure a $2 is included in the replace. The first match would catch everything on the page, but if you have it set to only find once it won't iterate to later text. Primefac (talk) 23:07, 9 October 2026 (UTC)Reply
Thanks! Sorry, I'm not familiar with regex and don't think I understand you. Where should I put the ([\s\S]+) and the $2, in the same rule or a new one? How would that help me replace the lang templates with the italic=no version? Thanks again for your help. Helpful Cat🐈 08:44, 10 October 2026 (UTC)Reply
It would be (%%title%%)([\s\S]+) replacing with {{lang|af|$1}}$2. \s is a whitespace character, and \S is a non-whitespace character, so the [\s\S]+ check is basically "any/all characters after this". Primefac (talk) 15:17, 10 October 2026 (UTC)Reply
Thanks. Sorry, I'm still missing something - how would that help me replace the lang templates with the italic=no version? Wouldn't that just replace the page's content after the first instance of the title with itself? Helpful Cat🐈 15:34, 10 October 2026 (UTC)Reply
I think I might have misread your initial query. Are you looking to replace all instances of the page title with the {{lang}} variant, and only on some articles you want to add the |italic=no? Assuming you're not using a bot, just have two rules set up, one with the italic and one without. If it's a page that needs the no italics, enable that rule, otherwise keep it disabled. Primefac (talk) 16:37, 10 October 2026 (UTC)Reply
Are you looking to replace all instances of the page title with the {{lang}} variant, and only on some articles you want to add the |italic=no? Yes, that's it. My initial query was whether there is a one-time find and replace function for the edit box so that after the (%%title%%) to {{lang|af|$1}} rule runs, I can replace {{lang|af|$1}} with {{lang|af|$1|italic=no}}. I see that creating two rules is the best solution to this. Thanks again! Helpful Cat🐈 01:09, 11 October 2026 (UTC)Reply

When is the bot flag added to edits?

[edit]

Hi. I keep forgetting when the bot flag is added to edits. I haven't found this in the FAQ.

I made some edits on plwiki using a bot password for my main account, but they were not marked as bot edits.

  • I had the flooder flag on my account.
  • I am on the enabled bots list.
  • The bot password had "High-volume (bot) access" granted.
  • In some edits I even added "minor edit" option and that didn't help.

So I'm in a bit of trouble... and also don't know what triggers the flag? Example edit EcceNux (talk) 21:15, 10 October 2026 (UTC)Reply

Bots are flagged as such with a specific user right. If you're using your main account, chances are good it won't be flagged as a bot because your main account is (I am guessing) not a bot. Primefac (talk) 21:43, 10 October 2026 (UTC)Reply
"Bot password" is a misleading misnomer. In other contexts it's an "application password", intended for use with a high-complexity password in contexts where a regular username/password won't work. If you're logging in with a username that has an "@" prefix it gets you a little extra privilege (like evading the IP check on login). David Brooks (talk) 11:34, 12 October 2026 (UTC)Reply

General fixes adding incorrect birth categories

[edit]

Prompted by the database report at Wikipedia:Database reports/Unbelievable life spans, I'm seeing a slow-motion edit war with the AWB general fixes. Is there anything that can be done to...

...to stop the general fixes adding incorrect birth categories? In four of these cases the actual birth is BC, but AWB is adding an AD category; in the final case the birth year in the lead sentence is marked "SH", Solar Hijri calendar. -- John of Reading (talk) 14:18, 14 October 2026 (UTC)Reply

Split database dump files

[edit]

If you use the "Database scanner", read on.

The Mediawiki team has started providing database dumps as a sequence of compressed XML files alongside the previous single, unwieldy file. Starting in January 2027 they will stop producing the single file.. You can still scan each file in sequence, but I have made a change that automates it for you; once you select a single XML file, AWB will offer to stream all the XML files in the same directory in one pass. Feel free to give it a go and let me know what you think. There are a couple of error conditions that need to be handled better, and some potential UI changes.

I'm traveling, so responses may not be swift.

Get it from https://github.com/DavidWBrooks/UnofficialAWB/releases/latest; as usual buyer beware and remember to unlock the downloaded files first. David Brooks (talk) 21:10, 20 October 2026 (UTC)Reply

And it was remiss of me not to mention the help I got from John of Reading in testing and feedback. David Brooks (talk) 21:42, 20 October 2026 (UTC)Reply