Misplaced Pages

talk:AutoWikiBrowser: Difference between revisions - Misplaced Pages

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 02:52, 6 January 2022 editLowercase sigmabot III (talk | contribs)Bots, Template editors2,305,781 editsm Archiving 2 discussion(s) to Misplaced Pages talk:AutoWikiBrowser/Archive 33) (bot← Previous edit Revision as of 22:40, 9 January 2022 edit undoEliz81 (talk | contribs)Extended confirmed users15,681 edits Variable names for common page attributes?: new sectionNext edit →
Line 115: Line 115:
==GENFIX error== ==GENFIX error==
]&nbsp;You are invited to join the discussion at ]. <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">]</span><small>}&#125;</small></span> <sup>]</sup> 19:54, 4 January 2022 (UTC)<!-- ] --> ]&nbsp;You are invited to join the discussion at ]. <span style="color:#AAA"><small>&#123;{u&#124;</small><span style="border-radius:9em;padding:0 5px;background:#088">]</span><small>}&#125;</small></span> <sup>]</sup> 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? ~]]<sup>]</sup> 22:40, 9 January 2022 (UTC)

Revision as of 22:40, 9 January 2022

AutoWikiBrowser 6.3.1.1

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.
Archiving icon
Archives

Index 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
11, 12, 13, 14, 15, 16, 17, 18, 19, 20
21, 22, 23, 24, 25, 26, 27, 28, 29, 30
31, 32, 33, 34



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 a bug details

Try to report bugs in the current version of the software. Update to the most recent version and check to make sure your bug has not been reported already on this page. See "How to Report Bugs Effectively" for advice on how to write bug reports.

Before posting anything related to non-Wikimedia Foundation wikis, verify that the site is running a recent version of MediaWiki with enabled Bot API. Older versions of MediaWiki or without the Bot API are not supported. Be sure to mention the exact URL of your wiki.

Request a feature details

Please use the feature request button to add new feature requests. This format allows the developers to keep track of feature requests. Take some time to search the archives, both on-wiki and on Phabricator to check whether a similar request was previously discussed.

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
  • When I start it up I get one of the following errors:
    "The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.", or
    "To run this application, you must first install one of the following versions of the .NET Framework..."
    This error means your computer does not have the .NET framework version 2 installed properly. You can choose from various versions for download here, or you can run Windows Update and select version 2 of the .Net framework from the "Optional Updates" section, if you want the choice made for you.
  • Does AWB run on Linux or Mac?
  • Does AWB work on other projects and languages?
    Many Wikimedia projects and languages are supported, see the "User and project preferences" option in the general menu. Other languages will be added on request, though at the moment the interface is always in English. You are also able to use AWB with third-party wikis: Options > Preferences > Site, you can change the wiki there. The wiki must support the Bot API required by AWB. This means that it should have latest HEAD version of MediaWiki or something close to that. The wmf-deployment branch is also recommended, as this is what is currently live on WMF sites.
  • Under Windows Vista (and newer), AWB is using wrong font size, which results in clipped text and lost buttons and options, (see example here). How to fix it?Tracked in Phabricator
    Task T103506
    • Solution #1: Go to "Control Panel\All Control Panel Items\Display" and switch resizing of the fonts to 100%.
    • Solution #2: Right click on AutoWikiBrowser.exe --> Properties -> Compatibility (tab) --> enable the "Disable display scaling on high DPI settings" option or for Windows 10, if available, select System (Enhanced).
  • AWB puts stubs after categories, though categories are always rendered the last by MediaWiki?
    According to WP:STUB#Categorizing stubs, by convention they are placed at the end of the article, after the External links section, any navigation templates, and the category tags, so that the stub category will appear last. If your wiki uses another order, please let us know here.
  • I don't like or use Internet Explorer; please use Firefox instead.
    AWB does not use Internet Explorer per se. It does, however, use the same web browser control (MSHTML) as Internet Explorer; the equivalent Firefox component does not provide the needed functionality.
  • How do I open the page in another browser if I can't use the one in AWB?
    Right click on the edit box in the bottom right side of your screen. Select "Open page in browser".
  • How do I edit a page that doesn't exist?
    Uncheck "Ignore non existing pages" in the "Skip articles" box.
  • How do I skip certain articles?
    Use the "Skip if contains" and "Skip if doesn't contain" on the "Skip" tab
  • Can't you leave up a "stable" version, so I don't have to download new versions?
    It is important to keep people up to date with the latest versions, because their use of the software doesn't just affect them, but the whole of Misplaced Pages. As any bugs that remain will be trivial, hopefully releases won't be too frequent.
  • How can I stop AWB clicking when it changes pages?
    This is a Windows sound theme setting. This page explains how to turn off the clicking sound.
    Alternatively, delete the following key from the Windows registry:
    HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Current
  • AWB randomly crashes upon page load on my system, and I always use a browser other than Internet Explorer when using Misplaced Pages.
    You may have installed custom scripts incompatible with IE. Wrap the contents of your monobook.js into conditional:
               //Detect IE5.5+
               if (navigator.appVersion.indexOf("MSIE")==-1)
               {
                   // Previous contents go here
                   ....
               }
  • I get Just In Time Debugger Messages when loading AWB/loading pages.
    In Internet Explorer, go to Tools → Options → Advanced. Make sure 'Disable Script Debugging (Internet Explorer)' and 'Disable Script Debugging (Other)' Are both checked. Press apply and close.
  • Why does AWB run very, very slowly if I try to make changes in the edit window on larger pages, especially pages with long lists or tables?
    If running on Windows, exit the Speech Recognition software that is built into some versions of Windows; don't just turn it 'Off', you must 'Exit' the software if you have started up Speech Recognition.
  • When I do a clean install of AutoWikiBrowser the application seems to find old setting data somewhere. I'd like to do a really clean install. Any ideas?
    Clean up your registry and remove the folder "C:\Documents and Settings\user name\Local Settings\Application Data\AutoWikiBrowser" (Windows XP) or "C:\Users\user name\AppData\Local\AutoWikiBrowser\" (Windows 7). Note that the application data folder may be hidden.
  • AWB prompts that there is a newer version but won't update
    Check the version number of your AWBUpdater.exe. The current version is 2.4.0.0. If you have an older version, you have to download the latest AWB version and make a clean install.
  • Which .NET Framework version do I have?
    You can find your .NET Framework version in Help → About box.
  • Where are the default settings stored?
    • Windows XP: C:\Documents and Settings\\Local Settings\Application Data\AutoWikiBrowser
    • Windows Vista onwards: C:\Users\\AppData\Local\AutoWikiBrowser\Default.xml
  • I cannot copy text from the diff window using the Control+C keyboard shortcut.
    You must have Microsoft.mshtml.dll available for AWB to use for this functionality to work. You can try downloading the file (there are a number of third-party websites offering DLL file downloads) and putting it in the same folder as AutoWikiBrowser.exe. This is reported not to work for all users, presumably due to .NET Framework problems.
  • Is there any way to set AWB to not use https? (GFW blocks 443 port)
    In preferences, set project to "custom". Set the left box to http. In the webpage box, type en.wikipedia.org/w/ (English Misplaced Pages) or zh.wikipedia.org/w/ (Chinese Misplaced Pages). Note that leaving off the /w/ will result in a "root element missing" error.
  • How do I login to AWB with accounts enabled with two-factor authentication?
    You should use a bot password. Despite the name, they aren't just for bots. See Misplaced Pages:Using AWB with 2FA.

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)

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 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)

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'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)

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 Phabricator
Task 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)