Wikipedia talk:AutoWikiBrowser
- Home
Introduction and rules - User manual
How to use AWB - Discussion
Discuss AWB, report errors, and request features - User tasks
Request or help with AWB-able tasks - Technical
Technical documentation
This is the discussion page for the AWB project. It is also the place to discuss using the AWB program itself (if you need help, or have a question about AWB, etc.). Where to make specific types of reports or requests is explained in the Before you post section below. Before asking questions, please read the Frequently asked questions below.
Please click here to start a new discussion. |
Index 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 |
This page has archives. Sections older than 30 days may be automatically archived by Lowercase sigmabot III. |
Before you post
Do you want to ... | Please use | ||||
---|---|---|---|---|---|
Report a bug or request a feature in AWB? | Check reported tasks before filing a new task. You do not need to create another account there; just log in with your normal 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
Frequently asked questions
|
---|
//Detect IE5.5+ if (navigator.appVersion.indexOf("MSIE")==-1) { // Previous contents go here .... }
|
Discussion
AWB not recognising abbreviated/redirected template {{Dis}}
Hallo, this edit seems to show that AWB does not recognised {{Dis}} as equivalent to {{Disambiguation}}, so it has suggested the incorrect addition of {{orphan}} and {{stub}} to a disambiguation page for which neither is appropriate. The redirect was created in Jan 2021 by @Lugnuts:. Sorry if this should have been reported on Phabricator, but attempting to "Check reported tasks" as instructed above by searching for the word "dis" got me nowhere, and I thought someone here might know whether it was an already-reported issue. PamD 09:57, 30 December 2021 (UTC)
- @PamD: I tried this search, couldn't find it, and have logged phab:T298389. -- John of Reading (talk) 10:17, 30 December 2021 (UTC)
- @John of Reading: Thanks. PamD 10:28, 30 December 2021 (UTC)
- Thinking about it, {{dab}} already exists as a 3-letter abbreviation for {{Disambiguation}}, so I'm not sure we needed the new one, {{Dis}}, too! PamD 10:30, 30 December 2021 (UTC)
GENFIX error
You are invited to join the discussion at Wikipedia talk:AutoWikiBrowser/General fixes § Error: Moving a commented out category out of a comment. {{u|Sdkb}} talk 19:54, 4 January 2022 (UTC)
Variable names for common page attributes?
Is there a way to access information about a page that lets you use variables (outside of regular expressions) like %%PAGENAME%% in find and replace or append/prepend text? ~Eliz81(C) 22:40, 9 January 2022 (UTC)
- You can use Help:Magic words#Variables. If you want them to be substituted, add subst: after the opening braces. For example, inserting {{subst:PAGENAME}} in Foo will add the text "Foo" (which won't change even if the page is moved). Certes (talk) 22:51, 9 January 2022 (UTC)
Running AWB without computer?
As I've been using my AWB bot to churn through the backlogs in its tasks, one restraint has been that AWB only runs when my computer is running. This reduces its efficiency and also isn't great for my privacy. Is there any way to run a virtual machine or PAWS or something so that my bot will keep running 24/7? If not, could development work enable that? I wonder why AWB isn't based in the cloud to start with (I have heard of WP:JWB, but it doesn't seem widely used, and that gives me updatedness concerns). Thanks for the help, {{u|Sdkb}} talk 03:44, 16 January 2022 (UTC)
- JWB is quite widely used and has support for bots and a semi active maintainer. I've tried it for minor bot runs and haven't encountered any issues, so I would consider that an option. --Trialpears (talk) 04:29, 16 January 2022 (UTC)
- And it runs even if you turn off your computer? {{u|Sdkb}} talk 04:45, 16 January 2022 (UTC)
substituting different for first than the later.
Let's say I have a Wikipedia file that has ABC Z DEF Z GHI Z JKL
I want to substitute M1 for the first Z in the file and M2 for any later occurances of Z? Is this possible? (The user case is the use of [[The Ohio State University]]
. I want to change first hits to [[Ohio State University]]<!--The "The" is considered an advertising gimmick-->
or similar and later ones to simply [[Ohio State University]]
.Naraht (talk) 20:16, 21 January 2022 (UTC)
- I didn't see a difference between your two replacement strings, so I have marked them as code above. In any case, you could probably iterate over the block of text using some flavor of Module:String#match and its
|match=
parameter, in some order. In your code, you could use logic like "replace instance 2, replace instance 3, replace instance 4, etc. up to some large number of instances, then replace instance 1 with the custom code". – Jonesey95 (talk) 21:07, 21 January 2022 (UTC) - Having an option to replace once (s/a/b/ rather than s/a/b/g) would be one of the most useful and (I expect) easily implemented enhancements to AWB. JWB has the feature, so that may be a better way to run this particular task. Certes (talk) 21:31, 21 January 2022 (UTC)
- @Naraht: Hmmmm...I have an idea I'd like to try. Do you have an example of an article where the multiple links to the same article is not overlinking? GoingBatty (talk) 01:14, 22 January 2022 (UTC)
- I can do this by using more than one find+replace rule. I copied your sample text to User:John of Reading/Sandbox to try it out. My first rule finds
Z
and replaces it withZ UNIQUEMARKER1
, which of course changes all three. My second rule findsUNIQUEMARKER1(?<=UNIQUEMARKER1.*UNIQUEMARKER1)
and replaces it withUNIQUEMARKER2
, and this changes only the second and third instances. From there, further rules could make your desired changes to the first instance and the later instances. -- John of Reading (talk) 10:01, 22 January 2022 (UTC) - Another approach is to replace Z((.|\n)*) by M1$1, with Regex and MultiLine flags set, then replace Z by M2. The first replace should match once, consuming the first Z and the rest of the article (which may include Zs) and replacing it by M1 and the rest of the article (with later Zs intact). The second replace should match all Zs except the first Z (which no longer exists, having already been replaced by M1). If pattern Z matches replacement string M1 then more cleverness is needed. This technique seems very inefficient, but hammers the client rather than the server. Certes (talk) 14:05, 22 January 2022 (UTC)
Database scanner: multiple search criteria
In the database scanner, if I want to scan for multiple search terms using the "text not contains" feature, is there an easy way to do it? Specific example is I want all articles that contain the word "is a species of" and do not contain the words "{{Speciesbox" and "{{Taxonbar". Thanks. –Novem Linguae (talk) 23:05, 22 January 2022 (UTC)
- @Novem Linguae: Hi there! In the "Not contains" field, you could type
\{\{(Speciesbox|Taxonbar)
and then check the "Regex" box. Hope this helps, and happy editing! GoingBatty (talk) 23:13, 22 January 2022 (UTC) - Cirrus search (Special:Search/"is a species of" -hastemplate:Speciesbox -hastemplate:Taxonbar) is very fast when it has a phrase to search for. You may also want to exclude other Taxobox templates such as {{Virusbox}}. Certes (talk) 10:47, 23 January 2022 (UTC)
You are invited to join the discussion at Wikipedia:Village pump (technical) § AWB bot page blanking. {{u|Sdkb}} talk 19:14, 25 January 2022 (UTC)
Change
Hi. In spanish, the AWB put a breakline after the "Control de autoridades" or "NF" templates, and there are not breakline there. Is it possible to change it? Thanks. --Vanbasten 23 (talk) 08:35, 3 February 2022 (UTC)