Open main menu

Wikipedia talk:AutoWikiBrowser

  (Redirected from Wikipedia talk:AWB)

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.

Before you postEdit

Do you want to ... Please use
Report a bug in AWB? Wikipedia talk:AutoWikiBrowser/Bugs (but see instructions for Phabricator there)
Report an incorrectly fixed typo? Wikipedia talk:AutoWikiBrowser/Typos
Request a feature for a future version of AWB? Wikipedia talk:AutoWikiBrowser/Feature requests
Request approval to use AWB? Wikipedia:Requests for permissions/AutoWikiBrowser
Ask a question about AWB or ask for help? This page

Frequently asked questionsEdit

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/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?
    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 Wikipedia. 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 Wikipedia.
    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.0.2.1. 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\[username]\Local Settings\Application Data\AutoWikiBrowser
    • Windows Vista onwards: C:\Users\[username]\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 Wikipedia) or zh.wikipedia.org/w/ (Chinese Wikipedia). 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 Wikipedia:Using AWB with 2FA.

DiscussionEdit

Old/multingual wikisourceEdit

How to use AWB on http://wikisource.org , the old/multilingual/incubator wikisource? There is no language prefix and apparently it's not possible not to select a language nor to use the custom mode (error 403). If there is no solution, here is an idea : use mul as language prefix (which is done in some other cases).

Cdlt, VIGNERON * discut. 14:33, 1 August 2017 (UTC)

User:VIGNERON. Yah you can do it by just choise the Project "custom" and select "http://" then simply give url "wikisource.org/w/".-- Jay ❯❯❯ Talk 07:15, 12 November 2017 (UTC)
@Jayprakash12345: you could try and tell me if it really works? As I said before, I've got a HTTP 403 error for some reason :/ Cdlt, VIGNERON * discut. 17:27, 19 December 2017 (UTC)
User:VIGNERON, Sorry Please use "https://" instead of "http://". And Login is working fine for me. [1] [2]-- Jay ❯❯❯ Talk 17:38, 19 December 2017 (UTC)
Oh, so obvious I missed it, thank you a lot! Cdlt, VIGNERON * discut. 19:40, 19 December 2017 (UTC)

Can't find csc.exeEdit

Trying to compile a simple AWB module on a machine which I have never previously used for that purpose.

AWB itself runs fine, and has done lots of edits for me.

However, attempts to "make module" generate this error: "Compiler executable file csc.exe cannot be found."

So I downloaded installed .NET Framework 4.8 Developer pack, and restarted my machine. Same problem. Here's the full error report:

**description**: 
**workaround**: 
--------------------------
<table><tr><th>Exception:</th><td>`InvalidOperationException`</td></tr>
<tr><th>Message:</th><td>`Compiler executable file csc.exe cannot be found.`</td></tr>
<tr><th>Call stack:</th><td><pre>   at System.CodeDom.Compiler.RedistVersionInfo.GetCompilerPath(IDictionary`2 provOptions, String compilerExecutable)
   at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
   at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
   at WikiFunctions.CustomModules.CustomModuleCompiler.Compile(String sourceCode, CompilerParameters parameters)
   at AutoWikiBrowser.CustomModule.MakeModule()
    • OS**: Microsoft Windows NT 6.2.9200.0
    • version**: AutoWikiBrowser (6.1.0.1), WikiFunctions (6.1.0.1), revision 12353 (2019-09-17 21:16:42)
    • net**: 4.0.30319.42000
    • duplicate**:
    • site**: https://en.wikipedia.org


But I have mutiple copies of csc.exe :


C:\Users\Me>dir /s %WINDIR%\CSC.EXE
 Volume in drive C has no label.
 Volume Serial Number is 2CFB-CF52

 Directory of C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319

08/10/2019  15:48         2,140,808 csc.exe
               1 File(s)      2,140,808 bytes

 Directory of C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319

08/10/2019  15:48         2,758,280 csc.exe
               1 File(s)      2,758,280 bytes

 Directory of C:\WINDOWS\WinSxS\amd64_netfx4-csc_exe_b03f5f7f11d50a3a_4.0.15713.0_none_75029b843b5b1af7

15/09/2018  08:29         2,739,280 csc.exe
               1 File(s)      2,739,280 bytes

 Directory of C:\WINDOWS\WinSxS\amd64_netfx4-csc_exe_b03f5f7f11d50a3a_4.0.15744.161_none_6bb831a0de84fd37

08/10/2019  15:48         2,758,280 csc.exe
               1 File(s)      2,758,280 bytes

 Directory of C:\WINDOWS\WinSxS\x86_netfx4-csc_exe_b03f5f7f11d50a3a_4.0.15713.0_none_bcafd25b4fd743fd

15/09/2018  08:29         2,170,960 csc.exe
               1 File(s)      2,170,960 bytes

 Directory of C:\WINDOWS\WinSxS\x86_netfx4-csc_exe_b03f5f7f11d50a3a_4.0.15744.161_none_b3656877f301263d

08/10/2019  15:48         2,140,808 csc.exe
               1 File(s)      2,140,808 bytes

     Total Files Listed:
               6 File(s)     14,708,416 bytes

How do I help AWB find one of these copies of csc.exe? --BrownHairedGirl (talk) • (contribs) 15:25, 8 October 2019 (UTC)

Greetings @BrownHairedGirl: - Only a wild guess, but maybe copy one of those csc.exe into AWB directory? Which one - I have no idea... Good luck, JoeHebda (talk) 19:14, 8 October 2019 (UTC)

Category for AWB missing articles that show on WPEdit

Greetings, Wondering why Category:Unknown-importance Saints articles on Wikipedia has articles starting with letter "A" vs. AWB starts with letter "J" for same category? I did turn off all AWB filter, and did WP-purge. Regards, JoeHebda (talk) 16:07, 16 October 2019 (UTC)

@JoeHebda: AWB sorts by page name only, "Saint Arbogast", not by the category sort key, "Arbogast". I imagine the AWB list started at J because some helpful editor has worked through letters A to I recently; thanks to your efforts the AWB list now starts at P. -- John of Reading (talk) 16:47, 16 October 2019 (UTC)
@John of Reading: - Thanks. I had forgotten about that difference. Cheers! JoeHebda (talk) 18:18, 16 October 2019 (UTC)

Way to ignore external links without ignoring internal ones?Edit

Hello! I've been doing some work where I use AWB to automatically italicize the names of game review sites where they're used. However, a lot of times they link to the article on them in prose and I want to be able to edit that. But, I can't just allow external links because then AWB tries to add italics in the middle of URLs. Is there any way to set it to ignore external links but not internal ones? TheAwesomeHwyh 05:02, 17 October 2019 (UTC)

@TheAwesomeHwyh: Are you using regular expressions for your find and replace rules? If so, try tacking (?<!https?://[^ \|\{\}\[\]\<\>]*) to the end of the "find" string. If a rule would have found a match inside a URL, this stops the rule firing by checking for the http: or https:. There may be a better way, of course. -- John of Reading (talk) 06:43, 17 October 2019 (UTC)
@John of Reading: I use the "normal settings" thingy for my rules. Is that the same thing? TheAwesomeHwyh 17:08, 17 October 2019 (UTC)
@TheAwesomeHwyh: Within the "normal settings" is a grid with columns "Find", "Replace with" and so on. Do you work with rules that have the "Regex" column ticked? -- John of Reading (talk) 17:26, 17 October 2019 (UTC)
@John of Reading: Here, let me upload a image of what my rules look like. One second... TheAwesomeHwyh 17:30, 17 October 2019 (UTC)
@John of Reading: Here you go. TheAwesomeHwyh 17:32, 17 October 2019 (UTC)
 
TheAwesomeHwyh 17:32, 17 October 2019 (UTC)
Looks like its not ticked. Let me do that. TheAwesomeHwyh 17:33, 17 October 2019 (UTC)
Done. Now, where do I put your code? TheAwesomeHwyh 17:35, 17 October 2019 (UTC)
Thank you so much, I figured it out now! I have one more question though: how do I also make it ignore ref names? It is trying to correct those now. TheAwesomeHwyh 17:54, 17 October 2019 (UTC)
Be very careful with this. A lot of those game review sites are named in cs1|2 citation templates. Brute-force global replacement of |website=Game Informer with |website=''Game Informer'' (also any of the |website= aliases) or |publisher=Game Informer with |publisher=''Game Informer'' will cause cs1|2 markup errors. Do not do that.
Just because I was curious, this insource search for Game Informer used anywhere in {{cite web}} finds about a thousand pages. You might guess that there are quite a lot of pages that could be damaged by incautious use of awb to make the replacements you want to make.
Trappist the monk (talk) 18:05, 17 October 2019 (UTC)
Yep I know, that's why I want to know how to make it avoid citations. TheAwesomeHwyh 18:25, 17 October 2019 (UTC)
Just pinging @John of Reading: since I'm not sure if you saw my question- how would one also prevent it from replacing text in references? TheAwesomeHwyh 19:29, 17 October 2019 (UTC)
@TheAwesomeHwyh: I don't have that ready to hand, sorry.
Has anyone else solved that one? -- John of Reading (talk) 19:59, 17 October 2019 (UTC)
I have found that it is a lot easier to find what I don't want to find than it is to not-find what I don't want to find. Regex doesn't do logical-not very easily. So, what I do quite often is find and then hide what I don't want to find.
Suppose that I don't want to find the text Game Informer in |publisher=. I might write a find and replace that looks like this:
find: (\|\s*publisher\s*=\s*)[Gg]ame\s+[Ii]nformer(\s*[\|\}])
replace: $1__g4m3_1nf0rm3r__$2
This 'hides' all of the |publisher=Game Informer by replacing the text I want to find with |publisher=__g4m3_1nf0rm3r__; text that I'm not looking to find.
Repeat for all of the various |website= aliases and whatever other parameters might have the name (|title= for example). Then repeat the above for all of the review site names (new secret word for each review site name).
Once everything that you don't want to find is hidden, do the find and replace that adds the italic wikimarkup. When that is done, unhide:
find: __g4m3_1nf0rm3r__
replace: Game Informer
repeating for each of the secret words and associated review site names.
This is a simplified example. en.wiki editors will have added inappropriate wikimarkup and extraneous text and whatever to |publisher= and |website= (and aliases; and markup is not always balanced) so be aware of that. Also consider doing this in a c# module; much easier to do it that way (I think).
Trappist the monk (talk) 22:42, 17 October 2019 (UTC)
Thank you so much! TheAwesomeHwyh 22:47, 17 October 2019 (UTC)
Sorry to pester you- but I've run into another error. Now it tries to replace ref names and the names of game sites in the game review template that shows all the review scores. Is there any way around that? TheAwesomeHwyh 23:49, 17 October 2019 (UTC)
Forgot to ping: @Trappist the monk:. TheAwesomeHwyh 23:50, 17 October 2019 (UTC)
Er, it tries to italicize them. TheAwesomeHwyh 23:53, 17 October 2019 (UTC)
@Trappist the monk: Hmm. I've been trying at this for a while now and I don't quite understand. I tried doing (\|\s*publisher\s*=\s*)(\|\s*name\s*=\s*)[Gg]ame[Zz]one(\s*[\|\}]) but it just ignores the ref names. What did I do wrong? TheAwesomeHwyh 01:45, 18 October 2019 (UTC)
That regex doesn't work as you intend it to work because it is looking for |publisher= followed by |name= followed by GameZone. It is unlikely that you will ever find that string.
find: (<ref\s*name\s*=\s*"?)[Gg]ame[Zz]one("?)
replace: $1__G4M320n3__$2
Trappist the monk (talk) 11:55, 18 October 2019 (UTC)
@TheAwesomeHwyh: (?!(?-i:(?s:(?:(?!<ref).)*)</ref)) should prevent matches inside ref tags. "Scan ahead looking for </ref, but while scanning ahead, make sure you don't go past <ref" -- John of Reading (talk) 03:29, 18 October 2019 (UTC)
@John of Reading: Thanks! I'll just manually skip the review template, then. TheAwesomeHwyh 03:35, 18 October 2019 (UTC)
@John of Reading: Wait, it's not actually working. Should I be placing this before Trappist's workaround or after? TheAwesomeHwyh 03:42, 18 October 2019 (UTC)
@TheAwesomeHwyh: This should be tacked on to the end of the "Find" string, with "Regex" ticked. Once it's working properly, this would be instead of Trappist's workaround. What page are you trying it out on? -- John of Reading (talk) 03:49, 18 October 2019 (UTC)
@John of Reading: My French Coach and My Spanish Coach. Is there a way I could export my rules to some sort of text file so that I could copy it here? TheAwesomeHwyh 03:52, 18 October 2019 (UTC)
Oh wait. Looks like I was tacking this on the end... one second. TheAwesomeHwyh 03:53, 18 October 2019 (UTC)
I mean the beginning, one second. TheAwesomeHwyh 03:53, 18 October 2019 (UTC)
@John of Reading: This seems to be only working on the first appearance of a ref name, but it just ignores whenever it happens again. I'm trying currently to have it skip Eurogamer ref's but It's only skipping the first appearance. TheAwesomeHwyh 03:55, 18 October 2019 (UTC)
@TheAwesomeHwyh: Ah, I see. Try tacking on (?<!\<\s*ref\s+name\s*=\s*(?:"|'|)[\w\s\:\-\.\/]{0,99}) as well, which should prevent matches inside <ref name=sommething/>. I'm going back to bed now; I'm in the UK. -- John of Reading (talk) 04:05, 18 October 2019 (UTC)
@John of Reading: Thanks! Just to clarify, do I need both or just the latter? TheAwesomeHwyh 04:06, 18 October 2019 (UTC)
@John of Reading: Nevermind, looks like I need both. Thanks! TheAwesomeHwyh 04:08, 18 October 2019 (UTC)
Return to the project page "AutoWikiBrowser".