This is an old revision of this page, as edited by Eliz81 (talk | contribs) at 22:40, 9 January 2022 (→Variable names for common page attributes?: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 22:40, 9 January 2022 by Eliz81 (talk | contribs) (→Variable names for common page attributes?: new section)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff) AutoWikiBrowser 6.3.1.1- 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
- Changelog
- Developer discussion
- Modules
- Regular expression
- Sandbox
- Template redirects
- Typos
- Usage stats
- Userbox
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. |
Archives |
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? | Misplaced Pages talk:AutoWikiBrowser/Typos | ||||
Request approval to use AWB? | Misplaced Pages: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
Help contributing to the source code
I've made a fix for T296611 on my local machine. I'm unclear on what the next steps are: How to commit the code, how the change is reviewed and incorporated into a build.
Is there a guide for this, or can someone here help? Thanks -SCEhardT 15:02, 8 December 2021 (UTC)
- Anyone able to help on this? I'm new to open source; coming from a corporate software development background.
- My understanding is that generally on Sourceforge I would: Fork the project, make the changes in the fork, and then make a Merge Request. However this project doesn't have the Fork link I see on other projects. -SCEhardT 20:52, 13 December 2021 (UTC)
- @SCEhardt: Hi. user:Magioladitis is one of the developers of the AWB. They might be able to help. But they are not much active on enwiki, I would suggest sending an email. —usernamekiran • sign the guestbook • (talk) 21:03, 13 December 2021 (UTC)
- Thanks - I sent an email. -SCEhardT 21:14, 13 December 2021 (UTC)
- @SCEhardt: Hi. user:Magioladitis is one of the developers of the AWB. They might be able to help. But they are not much active on enwiki, I would suggest sending an email. —usernamekiran • sign the guestbook • (talk) 21:03, 13 December 2021 (UTC)
False positive "Alerts" for "Unbalanced brackets"
I often stumble upon Alert notice "Unbalanced brackets" when I have such type of sentence-structure and covers the years of 1) parliamentary democracy 2) the Great Depression and 3) the period of authoritarian rule
Is there any uncontroversial behaviour to overcome these kind of false positive alerts? One solution is eg double brackets, but it may be controversial. Example: and covers the years of (1) parliamentary democracy (2) the Great Depression and (3) the period of authoritarian rule
--Estopedist1 (talk) 22:46, 8 December 2021 (UTC)
- Would it read better as
and covers the years of: parliamentary democracy, the Great Depression, and the period of authoritarian rule
? I think you'd get more responses asking over at Misplaced Pages:Manual of Style -SCEhardT 17:19, 9 December 2021 (UTC)
AWB doesn't start on new laptop
AWB isn't starting on my new windows laptop. When I try to start it, a prompt comes up saying I need to install another app to start the task, and then, regardless if I push "yes" or "no," not one but two error messages pop up saying "The application cannot be initiated." I've tried installing .NET 4.5, installing a previous version of AWB, uninstalling and reinstalling the current version of AWB, and downloading a .NET 'repair' program from Windows. None have worked nor changed anything that happens. I run Windows 10. I dream of horses (Contribs) (Talk) 05:31, 12 December 2021 (UTC)
- @I dream of horses: When was the last time you updated your Windows? .NET should be automatically updated with Windows update. —usernamekiran • sign the guestbook • (talk) 05:45, 12 December 2021 (UTC)
- @Usernamekiran I just got it today. I assume it's the newest version of Windows. I dream of horses (Contribs) (Talk) 05:48, 12 December 2021 (UTC)
- @I dream of horses: sometimes, an update comes out after the laptop is packed. Its better to check for an update. —usernamekiran • sign the guestbook • (talk) 05:51, 12 December 2021 (UTC)
- @Usernamekiran Now, how could I forget about that? /lh Thank you for pointing that out. There were updates available. I dream of horses (Contribs) (Talk) 05:58, 12 December 2021 (UTC)
- @I dream of horses: hehe —usernamekiran • sign the guestbook • (talk) 06:00, 12 December 2021 (UTC)
- @Usernamekiran Now, how could I forget about that? /lh Thank you for pointing that out. There were updates available. I dream of horses (Contribs) (Talk) 05:58, 12 December 2021 (UTC)
- @I dream of horses: sometimes, an update comes out after the laptop is packed. Its better to check for an update. —usernamekiran • sign the guestbook • (talk) 05:51, 12 December 2021 (UTC)
- @Usernamekiran I just got it today. I assume it's the newest version of Windows. I dream of horses (Contribs) (Talk) 05:48, 12 December 2021 (UTC)
usernamekiran Unfortunately, the updates to .net don't seem to have worked. I just tried running AWB, and the same thing is happening. --I dream of horses (Contribs) (Talk) 13:18, 12 December 2021 (UTC)
- Welp. Eating my words. I dream of horses (Contribs) (Talk) 01:15, 13 December 2021 (UTC)
- @I dream of horses: Hi. I see AWB is working for you now, but not sure its on new computer or older one. If its on new, how did you do it? —usernamekiran • sign the guestbook • (talk) 17:14, 13 December 2021 (UTC)
- @Usernamekiran New computer that needed multiple updates. I dream of horses (Contribs) (Talk) 17:16, 13 December 2021 (UTC)
- @I dream of horses: yes, windows does that. It needs reboot after installing update X, before downloading and installing update Y. —usernamekiran • sign the guestbook • (talk) 17:18, 13 December 2021 (UTC)
- @Usernamekiran Aw, well, that's a bit irritating. I'm more familiar with Macs; frankly, I prefer them. Ah well, I guess I'll continue using the computers I'm using for now. I dream of horses (Contribs) (Talk) 17:19, 13 December 2021 (UTC)
- @I dream of horses: well, both of them have their pros. —usernamekiran • sign the guestbook • (talk) 17:23, 13 December 2021 (UTC)
- @Usernamekiran Aw, well, that's a bit irritating. I'm more familiar with Macs; frankly, I prefer them. Ah well, I guess I'll continue using the computers I'm using for now. I dream of horses (Contribs) (Talk) 17:19, 13 December 2021 (UTC)
- @I dream of horses: yes, windows does that. It needs reboot after installing update X, before downloading and installing update Y. —usernamekiran • sign the guestbook • (talk) 17:18, 13 December 2021 (UTC)
- @Usernamekiran New computer that needed multiple updates. I dream of horses (Contribs) (Talk) 17:16, 13 December 2021 (UTC)
- @I dream of horses: Hi. I see AWB is working for you now, but not sure its on new computer or older one. If its on new, how did you do it? —usernamekiran • sign the guestbook • (talk) 17:14, 13 December 2021 (UTC)
I dream of horses Of course. I dream of horses (Contribs) (Talk) 17:24, 13 December 2021 (UTC)
Find and replace with different strings
Is there a simple way to replace different instances of a matched string with different outputs? I need to replace a certain string with a template, which should have a certain parameter set differently between the first instance and further matches. There may be dozens of matches on a page, so trying to craft a single RegEx that captures every instance doesn't seem practical. --Paul_012 (talk) 18:36, 13 December 2021 (UTC)
- To replace the first Foo by Bar but subsequent matches of Foo by Baz needs two replacements: Foo → Bar once, then Foo → Baz throughout. With JWB this is easy: put the g flag on the second regexp but not the first. AWB should also be able to do this with the repeat count in the advanced section set to 1 for the first and a big number for the second (perhaps 0 works). Take care if Bar contains Foo which might get replaced again: a more specific example might help. Certes (talk) 19:08, 13 December 2021 (UTC)
- I think AWB's repeat count is for iterative replace-all repetitions, and doesn't seem to work for this. Thanks for the JWB suggestion, though. I should give it a try. --Paul_012 (talk) 19:54, 13 December 2021 (UTC)
- If AWB lacks a replace-once option (surely there must be one hidden somewhere) then you could replace something like (?<!Foo.*)Foo, but that may be horrendously inefficient. Certes (talk) 20:26, 13 December 2021 (UTC)
- I think AWB's repeat count is for iterative replace-all repetitions, and doesn't seem to work for this. Thanks for the JWB suggestion, though. I should give it a try. --Paul_012 (talk) 19:54, 13 December 2021 (UTC)
- I'm not sure if I understood your question. Do you want to replace one instance of foo with bar, and rest with baz; like Certes said above? —usernamekiran • sign the guestbook • (talk) 20:52, 13 December 2021 (UTC)
- @Paul 012: Do you have a specific example you could please share with us? GoingBatty (talk) 22:18, 13 December 2021 (UTC)
- Yes, replacing one instance of foo with bar and the rest with baz is more or less it, though it involves some capture group references. Specifically, I'm looking to replace
]: อักษรไทย
(a common error new editors make) with{{lang-th|อักษรไทย}}
on the first instance and{{lang|th|อักษรไทย}}
on the later ones. The อักษรไทย could be anything, which so far I've been able to get working fairly well with\\]: (+)( \(+\))?
. - Anyway, another workaround that I've found seems to work is to specify multiple rules, first replacing every foo with baz, then replacing baz(.*) with bar$1 (with single-line mode enabled). Not sure how less inefficient this is, and it wouldn't work if there are existing instances of baz earlier in the text, but it actually fits my purposes. As Certes said, though, it would be a strange omission if this functionality indeed does not exist natively. --Paul_012 (talk) 06:55, 14 December 2021 (UTC)
- maybe you can create two custom modules. First module for "first foo to bar", second module for "all foo to baz". —usernamekiran • sign the guestbook • (talk) 08:39, 14 December 2021 (UTC)
- Ah, of course that would be more straightforward. My convoluted description was due to me actually also attempting another related task at the same time. --Paul_012 (talk) 09:43, 14 December 2021 (UTC) (PS I meant this in response to the order of operations, not the use of modules; sorry for the unclearness.) --Paul_012 (talk) 11:06, 14 December 2021 (UTC))
- You don't need custom modules. A regular expression like the one above will do the job. If AWB really has no way to replace once only (a glaring omission) then adding (.*) to the end of the first regexp and $n to the end of its replacement should capture the rest of the article (replacing it by itself) to ensure that it never matches again. In this case, n=3 as capture groups 1 and 2 are already used.
\\]: (+)( \(+\))?(.*) → {{lang-th|$1$2}}$3
\\]: (+)( \(+\))? → {{lang|th|$1$2}}
- I'm guessing that you want both unbracketed and bracketed text in the template when you match something like "อักษ (รไทย)"; remove $1 or $2 if not. Certes (talk) 10:06, 14 December 2021 (UTC)
- Yes, that's the intent. Seems to be adequate, for my purposes at least. --Paul_012 (talk) 11:06, 14 December 2021 (UTC)
- maybe you can create two custom modules. First module for "first foo to bar", second module for "all foo to baz". —usernamekiran • sign the guestbook • (talk) 08:39, 14 December 2021 (UTC)
- Yes, replacing one instance of foo with bar and the rest with baz is more or less it, though it involves some capture group references. Specifically, I'm looking to replace
Anon IP edits tagged AWB
While I, (Djm-leighpark/Djm-mobile/Bigdelboy) understood users required permissions to use AWB, I notice these anon. edits tagged AWB, I observed many of the edits of an tagged AWB? . I can think of at least one explanation, but does anyone have comments? Thankyou. Djm-mobile (talk) 09:35, 17 December 2021 (UTC)
- Those aren't actual WP:Tags but just "using AWB" links in the edit summaries, which can easily be manually added. Before tags were introduced, AWB used to generate this kind of edit summaries. If it isn't being done deceptively, my guess would be that the IP user didn't understand the meaning/purpose of the link and just copied it from older edit summaries they saw. --Paul_012 (talk) 09:59, 17 December 2021 (UTC)
AWB not recognising abbreviated/redirected template {{Dis}}
Tracked in PhabricatorTask T298389
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 Misplaced Pages talk:AutoWikiBrowser/General fixes § Error: Moving a commented out category out of a comment. {{u|Sdkb}} 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 22:40, 9 January 2022 (UTC)