Wikipedia talk:AutoWikiBrowser/Dev

From Wikipedia, the free encyclopedia

AutoWikiBrowser - v3.3.1.0

Home

General information about AutoWikiBrowser and directions for installation.

Request approval

Request approval to be added to the CheckPage to use AutoWikiBrowser.

Discussion

Discuss the application and ask questions.

Bugs

Report bugs in the application.

Feature Requests

Request new features to be implemented into AWB

User manual

The full user manual.

Developer Talk Page · Typos · User talk templates · Plugins · IRCMonitor · AWB Projects · Changelog · AWB Sandbox
Shortcut:
WT:AWB/DEV
WP:AWB/DEV
Archive
Archive
AWB Developers

AWB was created by:

This page is for AWB developers to discuss the development of AWB.

Please do not post bugs, feature requests, and similar on here, unless it is extremely urgent, but in that case it would probably be better to use #autowikibrowser on IRC if possible.

Useful Links:

Contents

[edit] WikiDiff2

What do you think about integrating wikidiff2 into AWB? (See [1]) It's the code that generates the diffs. The only problem is that it's written in c++, not c#. Can we "translate" it with that site you told me about to translate the custom module code? That would allow us to generate the diffs locally, saving time for users when using AWB and saving resources. Then we can even eliminate the quick save option from the bots list. —METS501 (talk) 01:02, 10 March 2007 (UTC)

That program will do a version of C++, so we could. What does MaxSem have to say? Reedy Boy 01:09, 10 March 2007 (UTC)
Why do we need it? MaxSem 06:57, 10 March 2007 (UTC)
Mainly cause if you're working on a slow connection, the extra page load to view the diff wastes a lot of time. It's faster to have it rendered locally on any connection, for that matter. Also, in a much less significant way, it reduces server load, but that alone wouldn't be a reason to do it. —METS501 (talk) 07:17, 10 March 2007 (UTC)
I agree. Apparently, it has not-so-perfect UTF-8 support, so I'd rather port it to C#/.NET. I'll spend next week in SPb and will try to do it, if I have free time. MaxSem 08:08, 10 March 2007 (UTC)
Great! —METS501 (talk) 16:36, 10 March 2007 (UTC)
IIRC it's possible to compile C++ code to .NET then link it with C# code. You may want to consider doing that; I've never tried it though. Note: I am not an AWB developer. Cheers, --unforgettableid | how's my driving? 23:25, 14 March 2007 (UTC)

Please check User:Cacycle/diff for the diff code that is used for wikEd. It is in JavaScript, but converting it to C++ should be relatively easy. The code is tuned for Wikipedia texts an also detects block moves. It outputs one single text, containing all additions, deletion, and block moves. This is easier to read than the standard Wikipedia output. You can test it by installing wikEd on your monobook.js page and then pushing the new 'diff' button next to the 'View Changes' button. Cacycle 02:12, 16 March 2007 (UTC)

Cheers, but we need it into C# or similar rather than C++. But it could be something else to look at - thanks =) Reedy Boy 08:58, 16 March 2007 (UTC)
I've tried to port wikidiff2 to managed C++, but result crashed in random places, so now I'm playing with a native C# diff engine. MaxSem 13:43, 19 March 2007 (UTC)
The diff screen looks very similar to the diff Tortoise SVN uses! Reedy Boy 13:55, 19 March 2007 (UTC)
I think that detecting block moves is a very important feature - in sharp contrast to program code the effects of block moves are relatively small and they are a common change to articles. However, the current MediaWiki diff code cannot handle them and generates paragraphs of red text when in fact not a single word has been changed. I am not that into C#/++ programming, but it should not be too difficult to translate this commented JavaScript code to C#. Cacycle 23:11, 19 March 2007 (UTC)
It would be great for MediaWiki's DifferenceEngine, but not so useful for AWB that moves things only when sorting metadata. MaxSem 07:17, 20 March 2007 (UTC)

Currently workingon it, expect firt results in a week. MaxSem 07:58, 31 March 2007 (UTC)

Cool, be good to see some results!! I see a potential feature for releasing as V4!! Reedy Boy 10:36, 31 March 2007 (UTC)

[edit] Sticky links

I've just committed Parsers.StickyLinks() that makes fixes like turning [[Russian literature|Russian]] literature to [[Russian literature]]. So far it's included only in DabControl. Please review it for inclusion into Common fixes. MaxSem 08:13, 11 March 2007 (UTC)

[edit] Empty edit summary

I turned off a messagebox from AWB which was effecting my plugin (r683), but I'm not sure the replacement code I put in is optimal. I think AWB needs to be checking that the edit summary isn't empty once it's heard back from all installed plugins and not before, and it maybe needs to do something about an empty summary such as stopping the operation. --kingboyk 12:23, 17 March 2007 (UTC)

[edit] Autoupdate

I think we should include an autoupdater for AWB. It would help a lot with users who get pissed when they have to update. If they were to just press "update" when there's a new version available and the program would autoupdate, that would be tons better. If any of you want to tackle it, that would be great; unfortunately, I don't think I quite have the time or the programming experience to actually do it myself :-) —METS501 (talk) 19:39, 17 March 2007 (UTC)

Hmmm, We'd need some webspace to get the files from... A simple program to kill the AWB process, download and override and then restart AWB... Or, just have a programmed link for each version (or rather, on the Version checkpage), that they can click ok and have the file downloaded....? Hmmm, somethign that could be done... Just not exactly sure how Reedy Boy 20:25, 17 March 2007 (UTC)
Here's what I'm imagining: AWB checks if the version is current. If it is, then it just keeps going. If it isn't current, but it's still enabled, it asks the user whether to update, otherwise it updates automatically. Then it goes to the version checkpage to fetch the current version file name (which can be labeled like <!-- Current filename: Autowikibrowser4110.zip -->). Then it downloads the file "http://superb-east.dl.sourceforge.net/sourceforge/autowikibrowser/CURRENTFILENAME" (I just selected that mirror randomly, but because the file is small the mirror doesn't really make any difference anyway). Then a new process starts up which shuts down AWB, extracts the downloaded zip file, and replaces the old files with the new ones, and then starts up AWB. Just a vision :-) —METS501 (talk) 21:48, 17 March 2007 (UTC)
A more detailed version of what i just said =P Reedy Boy 21:58, 17 March 2007 (UTC)
Yep :-) —METS501 (talk) 22:01, 17 March 2007 (UTC)
I cant see that being difficult. Its just looking up how to download the files and stuff... And the easiest way for the file, i think, would have on the checkpage like a link ot the file that it would download.... Its just then the unzipping the files out... Hmmmm. Want to add a subproject to AWB for us to play about with the idea? Reedy Boy 22:03, 17 March 2007 (UTC)
Sure. You can add it. I think the hard parts are unzipping and then replacing the files though. That will be a pain in the ass on Vista. We'll have to set the program to ask for admin privileges I think. Any idea how to do that? Maybe it asks automatically? I don't know. —METS501 (talk) 22:23, 17 March 2007 (UTC)
I dont have vista... Hmmm.... We may be able to implement it using .NET.... j# Anyone? Ah, its C# using j# :) Reedy Boy 23:02, 17 March 2007 (UTC)
I would think there would be some free code already out there to do that kind of thing... erm, what's that big dot net code site? --kingboyk 23:18, 17 March 2007 (UTC) [2] --kingboyk 23:23, 17 March 2007 (UTC)

Have a look at the SVN repository. Most of thh basic functionality i have added... Reedy Boy 23:30, 17 March 2007 (UTC)

Just commited a version that works. Currently setup to download from my local webserver, with the file link and the filename manually entered

But tested working from the SF Servers, just a bit slower than a local http server ;)

Reedy Boy 00:38, 18 March 2007 (UTC)

I'm working on it more now. I scrapped all of the j# code, as that means that all users have to download the j# runtime environment. It's working great and almost ready to commit. —METS501 (talk) 04:59, 18 March 2007 (UTC)
OK, I've committed it. As far as I can tell, everything works perfectly. It prompts the user to update when the version is old or not enabled. If you want to test it out, just build the program with a different version number. It will tell you it's not enabled, and ask you to shut down AWB to update it. Then it will do it's magic and voilà, it's updated! —METS501 (talk) 05:31, 18 March 2007 (UTC)
Mets, You forgot to include the library!! First guess where to put it was correct. I've added it to the SVN now =) Reedy Boy 11:41, 18 March 2007 (UTC)
To counter needing the extra library, (ie the dll), ive put the relevant source files for the ICSharpCode.SharpZipLib.dll, into the Updater. Which increases the updater file size, but it neater. The GNU/GPL License headers are kept.
Myself and Kingboyk were discussing having the updater download only updated features. Ie we release the WF.dll, IRCM, AWB etc etc as seperate, and they are downloaded and updated only if they have been updated. This would be a future thing to do.
Also, we need to cater for any updates of the AWBUpdater. As it cannot update itself, AWB (or something in the WF.dll) would need to update it. Possibly in the same way...? Reedy Boy 13:44, 18 March 2007 (UTC)

Reedy Boy 13:44, 18 March 2007 (UTC)

Sorry about that. As far as just the updated features, you can package an AutoWikiBrowser3110update.zip with just the new features and have the updater download that. As far as updating the updater, I have no ideas. —METS501 (talk) 15:24, 18 March 2007 (UTC)
That's an excellent idea. I'll take a look at updating the updater this afternoon. --kingboyk 12:00, 19 March 2007 (UTC)
For updating the updater, i am thinking, we just upload it as an exe to SF, and have AWB download that, and paste it over the existing one. Saves the zip code. Just need to add to/manipulate the AWB update routine to look for an AWBUpdater update... Could just put something on the version checkpage? Reedy Boy 15:51, 18 March 2007 (UTC)
Sounds good and no, you can't put it on to the version check page cos you're not an admin ;) - but I'll do it for you! The updater certainly needs to be able to check it's own version (by extending the current code of course, we don't wanna load the page twice) so the version check page is the obvious place to put it. imho. --kingboyk 23:48, 18 March 2007 (UTC)
Haha... Wiki Politics - Pah ;). We'd just have to work out a way to copy over the file or something as it cant do it onto itself, as it would be in use... Hmm, could we get AWB to do the copy. If it looks in the folder, and there is an awbupater1.exe (or something) when AWB is reloaded, it renames it to replace the old? But the AWBUpdater downloads its own new version? Reedy Boy 10:11, 19 March 2007 (UTC)
Ive just commited SVN Rev 750, in which the Updater form is shown, the progress bar updates. I've dont this by a bit of a cheat, using a timer, which allows the form to be shown, and then on the tick (of 1ms) starts the update process. I've also added a routine to make sure AWB is closed, which annoys the user with messageboxes until AWB is closed.... Reedy Boy 22:02, 18 March 2007 (UTC)
Looks good! —METS501 (talk) 23:46, 18 March 2007 (UTC)
=) Reedy Boy 10:11, 19 March 2007 (UTC)

OK, here's how I think we should update the updater:

  • Move any shareable code in the uploader project to a new source code file
  • Compile that new source code file into both the uploader and AWB
  • When AWB checks it's version is enabled it should also check - from the same page - the uploader version
  • If there's an obligatory new updater it should go ahead and download it, if there's an optional one it should ask (or, to make things easier, we can assume all updater releases are obligatory)
  • AWB simply downloads the update using the shared code, moves the file into position, and then calls the new uploader if it's version check revealed the existence of a new version

Sam could probably get this implemented in a few minutes I reckon as it's mostly the same as what he's already done. --kingboyk 17:25, 19 March 2007 (UTC)

Hmmm Good idea..
Something i just thought of
The updater gets the updated AWB from the internet, and also the zip (or whatever) of the updater if it has been updated. It then extracts the updater to say AWBUpdater.exe.new, and then updates AWB as normal, it then starts AWB and closes itself. If AWB find that AWBUpdater.exe.new (or whatever) exists, it will then delete AWBUpdater, and replace it with AWBUpdater.exe.new (or rename the latter..) Reedy Boy 19:25, 19 March 2007 (UTC)
Added Code to AWB to update the updater if needed, and updater code to download a newer updater version if there is one! Reedy Boy 22:18, 22 March 2007 (UTC)
I was thinking (yes yes that's a first) why don't we have the download link on the AWB page just be a permalink to download the updater, and then have the updater install AWB?
Also, how about having a proper installation into program files with a start menu\programs entry and everything?
Finally, the updater/installer ought to ask the user what features they want, so that the plugin DLLs get copied to the install folder. That way we won;t get folks using new AWB, old plugin, or people reporting a bug cos they only copied one DLL over not two. --kingboyk 13:26, 26 March 2007 (UTC)
Thats a good point steve, would be useful, and wouldnt require that much work. The Updater will copy over any existing files, and will create a plugins folder whether they use it or not.
The installer is a good idea, and if we put copies of the DLL's in the Plugin folder, and set AWB the ability to 'install' - ie copy them if they want to add it later on...? The updater would work fine like that....
Sounds like we've possibly got some ideas for maybe v4? Or 3.5 or something...?
Reedy Boy 20:35, 26 March 2007 (UTC)

[edit] {{bots}}

I added support of these tags, shall we get the rid of blacklisting on checkpage? MaxSem 12:26, 19 March 2007 (UTC)

Could be done, after someones tagged the pages in the backlist...? Reedy Boy 19:48, 5 April 2007 (UTC)

[edit] Nudge timer

Discussion started at Wikipedia:Bot owners' noticeboard:

AWB has long had a habit of stalling: on db-lock, on timeout, on disconnection. I would often wake to find my bot stalled, so I had to resort to putting a nudge timer into my plugin. This is a dirty hack I'd really like to get removed, so any progress on stopping AWB stalling when these things happen (or building the nudge timer into AWB) would be great. --kingboyk 23:00, 22 March 2007 (UTC)
I'd support the nudge timer built into AWB. Basically, I'm envisioning a timer that starts when AWB is ready to save, and if x seconds pass with no save then it tries to resave, and so on. —METS501 (talk) 23:07, 22 March 2007 (UTC)
That's pretty much how my plugin does it; it starts a timer and if 10 minutes elapse it fires AWB a stop event followed by a start event. --kingboyk 23:20, 22 March 2007 (UTC)
I would have it more like 60 seconds, but it sounds good. I would implement it. —METS501 (talk) 23:22, 22 March 2007 (UTC)

I don't feel I know AWB or C# well enough to do this myself. It needs a good understanding of the internals and has to be robust. I will however share a few of my observations having written a reasonable implementation of this in my plugin but one which need to be a bit smarter if it were in AWB:

  • Nudge timer should be an option, and should probably only operate in bot mode
  • Timer should be no less than 60 seconds; I went for 10 minutes. User configurable is a possible alternative.
  • Number of nudges recorded in a label somewhere or on the status bar
  • Timer needs to be reset after each successful operation, disabled when there's been no start event (user clicking start or a plugin firing Start()) or when there's been a stop event, disabled if the user has been blocked or has mail, and disabled if the article list is empty.
  • I'm happy to share my VB.NET code which I would say is about 90% compliant with this: I've had one report of it starting AWB while the user was still setting up (unverified, but I imagine a slight flaw in state preservation), but it's nudged an unresponsive AWB when I was asleep several times and has been useful.

HTH. --kingboyk 14:20, 23 March 2007 (UTC)

I committed a nudge timer. Do you want to check it out? —METS501 (talk) 15:04, 25 March 2007 (UTC)
Ooh, lovely. I will do at some point, yes, but I'm a bit overloaded (pun intended) at the moment. --kingboyk 15:08, 25 March 2007 (UTC)
Could we increase the nudge timer to say 5 minutes, and also log nudges and/or display the number on the status bar? With regard to the first request, I've been experiencing a bug in my plugin where it keeps adding the same log entry over and over. I've not identified the cause yet but wonder if the new nudge timer isn't allowing enough time for the log upload operations to finish, and the plugin is receiving the next lot of article text and thinking it has to upload logs. This might not be the cause but I'd like to rule it out, and since the idea is to wake up a sleeping bot overnight I think 5 minutes is quite OK :) --kingboyk 23:36, 27 March 2007 (UTC)
Working on it. —METS501 (talk) 00:00, 28 March 2007 (UTC)
Alright, update your SVN version and see what it looks like :-) —METS501 (talk) 01:02, 28 March 2007 (UTC)
Looks fantastic. Will test later. Thanks Mets. --kingboyk 11:56, 28 March 2007 (UTC)
Why don't the cogs on the bot tab move? --kingboyk 16:23, 28 March 2007 (UTC)
What? —METS501 (talk) 22:10, 28 March 2007 (UTC)
You forgot the animation! Cogs moving as the bot is operating, with the speed of movement reflecting the edit rate, and the cogs vibrating when nudged!! --kingboyk 22:25, 28 March 2007 (UTC)
:-) —METS501 (talk) 22:58, 28 March 2007 (UTC)

In all seriousness, I added an interface member to allow plugins to override the nudge (but leave the timer running) and tests so far indicate it's solved the error in my logging code. --kingboyk 22:25, 28 March 2007 (UTC)

OK, great. —METS501 (talk) 22:58, 28 March 2007 (UTC)

Could the nudge timer be programmed to go to the next page after x amount of nudges? --TeckWiz ParlateContribs@ 23:32, 29 March 2007 (UTC)

Sure, will do that. —METS501 (talk) 23:37, 29 March 2007 (UTC)
OK, I added a checkbox where it asks if it should skip an article if the first nudge doesn't help. —METS501 (talk) 00:19, 30 March 2007 (UTC)
You don't seem to have got these values saving/loading with settings?
I've defaulted the new option to False, as I've found it an annoyance (lots of valid articles skipped when I had a bad connection). --kingboyk 16:06, 5 April 2007 (UTC)
Oh yeah, sorry, I always forget to have it save as the settings. False as default is fine with me. —METS501 (talk) 16:32, 5 April 2007 (UTC)

[edit] Plugin code

PluginManager Class:

        Public Sub Nudge(ByRef Cancel As Boolean) Implements WikiFunctions.Plugin.IAWBPlugin.Nudge
            Cancel = PluginSettingsControl.MyTrace.IsUploading

            If Not Cancel Then
                For Each p As PluginBase In ActivePlugins
                    If Not p.IAmReady Then
                        PluginSettingsControl.MyTrace.WriteBulletedLine( _
                           "Bot mode: Not nudging AWB as a generic plugin isn't ready yet", True, True, True)
                        Cancel = True
                        Exit For
                    End If
                Next
            End If

            If Not Cancel Then PluginSettingsControl.MyTrace.WriteBulletedLine("Bot mode: AWB is giving a nudge", _
               True, False, True)
        End Sub

PlugingSettingsControl Class:

        Private Sub NudgeCountTextChangedHandler(ByVal sender As Object, ByVal e As EventArgs)
            lblAWBNudges.Text = "Nudges: " & _
               DirectCast(sender, Label).Text.Replace(WikiFunctions.AWBSettings.AWBConstants.NudgeTimerString, "")
        End Sub

The above should answer the question of why I declared the label string as a constant. Constants are good anyway and AWB probably ought to use more of them rather than liberally redefining strings all over the place. --kingboyk 11:21, 30 March 2007 (UTC)

I suppose a better way might be to wrap the nudges variable inside a property, and add a Nudged() method to the plugin interface notifying of changes to the value. I'll take a look at it later. --kingboyk 14:04, 30 March 2007 (UTC)

[edit] txtSelectSource

Why is the "enter" keypress event not working? It works for txtAdd, and it has the same exact code and same settings. —METS501 (talk) 15:13, 24 March 2007 (UTC)

Mets Brokded it... :P - Wheres the text box? Reedy Boy 18:06, 24 March 2007 (UTC)
The one right below the source selector dropdown menu is the one that doesn't work (in ListMaker.cs). The one that does work is at the bottom (where you add individual articles). —METS501 (talk) 05:48, 25 March 2007 (UTC)
I noticed in the code there was some manual watches for keypresses on different controls... Reedy Boy 10:24, 7 April 2007 (UTC)

[edit] WikiFunctions2

Now that WikiFunctions2 is shipped with AWB, I alert devs to the existence of this library in case it contains any code you might want to build on. Currently it supplies logging features to my plugin, and some basic article talk page parsing. I'll be reviewing my codebase soon to see if any other shareable code should move there.

I'm certainly not saying that there's definitely anything there you want to use, just pointing it out so at least you have the choice. --kingboyk 14:58, 26 March 2007 (UTC)

[edit] Removal

Can someone just check up on my rev to make sure I'm not mistaken? Thanks. —METS501 (talk) 18:58, 27 March 2007 (UTC)

[edit] Feature Request: Excess whitespace as a general option

Im not sure if this was removed before, i cant see any real reason not to have it done, unless someone knows something i dont/have forgotten

Feel free to add it if you agree with me!!

Reedy Boy 21:00, 27 March 2007 (UTC)

Sorry, I disagree. I don't think that removing the excess whitespace which doesn't change the display of the page is necessary. If anything, it makes the source code harder, not easier, to read without changing the output. —METS501 (talk) 23:12, 27 March 2007 (UTC)
It would also be encouraging folks to commit trivial edits. --kingboyk 15:07, 28 March 2007 (UTC)
Well, it would come under the 'insignificant edit' category wouldnt it? If people started just doing that? Reedy Boy 15:11, 28 March 2007 (UTC)

the original reason for the request was specifcally for use within the image namespace, to aid in making fixes like this across large categories when doing other work (like image sorting). -ΖαππερΝαππερ BabelAlexandria 19:12, 2 April 2007 (UTC)

Fair enough, i think that should be allowed.. Urrrm... We need somewhere to put the checkbox... Or just have it do if in Image is in article title (or rather, the start), it runs the fix whitespace...? Reedy Boy 19:43, 2 April 2007 (UTC)

that might cause accidental usage on "Image of" articles (unless you did it for "Image:"). Why not move the skip options button down to where all the other skip options are and then place the option there? -ΖαππερΝαππερ BabelAlexandria 14:15, 3 April 2007 (UTC)

[edit] IAWBPlugin

Are there any plugins out there that we know of, other than those in the AWB repository and the kingbotk plugin? I want to add some functionality to the interface connected with the nudge feature - and undertake to fix the aforementioned plugins - but don't want to flagrantly breach the warning I wrote about not changing the contractual interface :) --kingboyk 15:09, 28 March 2007 (UTC)

[edit] Unicode problems -- URGENT

Big problem with new Special:ExpandTemplates usage: It's not handing HTML entities, unicode, etc. well. See what it did and [3] hat it should have done]. I don't have time to fix it now; a quick fix would be greatly appreciated. I just found out with a huge amount of messages to my talk page and my bot blocked for making that error :-) —METS501 (talk) 00:08, 29 March 2007 (UTC)

I've removed this from the code and released another new version disabling the last, as this is too big a bug. It also has problems dealing with any non-English characters. —METS501 (talk) 02:58, 31 March 2007 (UTC)
[4] To check - is this definately the desired behavoir, and are there any others worth testing on? Thanks, Martinp23 21:47, 5 April 2007 (UTC)
Committed a fix in rev 949, but I've not re-added it for handling user talk messages just yet, pending any feedback. Martinp23 21:51, 5 April 2007 (UTC)
Seems fully resolved in rev 950 Martinp23 22:14, 5 April 2007 (UTC)

[edit] Logging tab

Moved from User_talk:Mets501#Edits_to_Logging

Hey Mets, Can you hold off doing any edits to the logging thing?

Me and steve are making it Object orientated, and therefore making it a lot more flexible.

Cheers

Reedy Boy 17:45, 1 April 2007 (UTC)

Sure, no problem :-). You're right, if we want to expand the log or do anything with it in the future, making it object oriented would be much easier. —METS501 (talk) 17:48, 1 April 2007 (UTC)
Thanks. We're going to do multiple coloums (using a list view), ability to load the page in your web browser and such =). Drop you a message when we are done. Reedy Boy 18:07, 1 April 2007 (UTC)
Great. Just remember that it has to look OK in every resolution from 800x600 to 1680x1050 widescreen, which is a challenge. —METS501 (talk) 18:14, 1 April 2007 (UTC)
Anchoured to the left, top and right, and i've a neat trick for sorting out the coloumns Reedy Boy 18:25, 1 April 2007 (UTC)

Basically my thought process was this:

  • My DLL already has a logging scheme
  • I was gonna spend the time by making a tab for my plugin to log to
  • The AWB logging tab really needs to be more advanced than just a label,
  • Why spend the time making a new tab for my plugin when I could make the AWB logging OOP instead?

Sam was roped in and here we go. Can't guarantee it'll work but we'll try.

So,

  • WikiFunctions.dll gets the logging interface used by my plugin and previously declared in WikiFunctions2
  • I'm writing a new log item class called AWBLogListener which inherits from ListViewItem (so it can easily be added to the relevant list at the end)
  • Sam is working on AWB creating the log listener, writing to it, and then adding it to the relevant list
  • AWBLogListener also implements IMyTraceListener, this interface will be passed to plugins in ProcessArticle() so they can have their say too
  • AWBLogListener will also have methods and properties for use by AWB
  • Create an AWBLogListener for each article, write to it during processing, and add it to the relevant list at the end
  • AWBLogListener will handle mouseover and click events
  • Any extra functionality is easily added by bolting it into AWBLogListener

--kingboyk 20:35, 1 April 2007 (UTC)

Much more advanced than my original :-) Sounds good! —METS501 (talk) 20:39, 1 April 2007 (UTC)
Its working.... xD Reedy Boy 21:07, 1 April 2007 (UTC)
Yeah working... passed through and written to by the plugin too. Visually a bit jerky, no mouseover or double click events yet, but as a proof of concept it works :) --kingboyk 21:26, 1 April 2007 (UTC)
The Save List button isn't working. Other than that, it looks great as far as I can tell. I'm going to test it more now. —METS501 (talk) 21:37, 1 April 2007 (UTC)
Yeah, Sam knows about that and will fix it tommorow (or you can fix it).
Fixed, saves a single column of the list view, and also any sub items. Bit of a raw form - Column1 + " " + Coloum2 + " ".... Reedy Boy 19:38, 2 April 2007 (UTC)
Any idea why the tooltiptext isn't displaying?
I'll now work on double clicking the listitem opening the article in browser. --kingboyk 21:41, 1 April 2007 (UTC)
Oh and don't forget, any extra functionality for a row (such as code used by right click menu items) can be added to AWBLogListener. --kingboyk 21:42, 1 April 2007 (UTC)
Another bug (don't ask how I encountered this :-)). Try editing the article Hello, and press ignore. Now try the article "Hello/Hello", and press ignore (or AWB with automatically ignore because it doesn't exist. You get a "Cannot insert the item 'Hello' in more than one place. You must first remove it from its current location or clone it. Parameter name: item" message. This only occurs with pages with slashes when the second one (which generates the error) doesn't exist. Also try "Talk:Main Page" and "Talk:Main Page/Archive 13131312" and observe that it does happen, because there is no archive 13131312, but when doing it with "Talk:Main Page" and "Talk:Main Page/Archive 1" there's no error message. Strange. —METS501 (talk) 21:57, 1 April 2007 (UTC)
Just checked Sam's code, and he's adding the listitem by object not by a key. Maybe it's the code which creates the subitems? Any help from the debugger? --kingboyk 23:13, 1 April 2007 (UTC)
No help from the debugger. I think it's a handled error which is set to output the exception message. —METS501 (talk) 00:10, 2 April 2007 (UTC)
I guess it has something to do with it being Hello/Hello i.e. X/X, and not Hello/123. Obviously something has a non unique key where it should be unique. We'll look into it tommorow. --kingboyk 00:16, 2 April 2007 (UTC)
Nope. See my main page archive example above. —METS501 (talk) 00:36, 2 April 2007 (UTC)
OK. I doubt it's anything serious, we'll fix it tommorow :) I'm actually quite impressed that it pretty much worked first time :) --kingboyk 01:01, 2 April 2007 (UTC)
As am I :-) —METS501 (talk) 01:13, 2 April 2007 (UTC)
It seems possible if the article name doesnt exist, it can/will keep the old one and log as that....
Fixed - Moved
LogListener = new AWBLogListener(EdittingArticle.Name); 
from CaseWasLoad, to Start(), so it picks up the article name there. Which, really makes more sense having it there. This has fixed the hello and hello/hello bug. Which also means it picks up invalid titles and stuff. Reedy Boy 21:29, 2 April 2007 (UTC)
Doing Hello/Hello first results in a null object error. Could you look at this please Sam, if I don't get to it first? --kingboyk 23:24, 1 April 2007 (UTC)
You might have fixed Mets' bug but this error is still happening :) --kingboyk 22:27, 2 April 2007 (UTC)

Double click now works in both lists: dbl click to open page in browser. --kingboyk 22:41, 1 April 2007 (UTC)

Onmouseover now shows a tooltiptext message. This currently only works in the Skipped article list cos Sam hasn't assigned any log messages to the Saved article log entries :) --kingboyk 22:58, 1 April 2007 (UTC)

Do we need any log messages if it saved all ok...? Reedy Boy 21:12, 2 April 2007 (UTC)
What do you think about adding a time column to both listviews? —METS501 (talk) 06:32, 2 April 2007 (UTC)
Probably a good idea. Then they know what time it was done. Are we wanting like full date and time, or just time (HH:MM)?
Date Added to ignore list view. Reedy Boy 21:21, 2 April 2007 (UTC)
As previously said, im at my dads work today (Been driving my dads works van about moving rubbish ;D), so im not even really sat at a computer till now when im having a break. Let alone having a copy of C# Express! So tonight, i should be able to at least clear up a few bugs if you havent got round to it.
As something else, i think adding a context menu to each of the list views could be useful, then have an option to open in default internet browser, simple to do. Reedy Boy 09:21, 2 April 2007 (UTC)
Double click does that, although we probably should have a context menu anyway. --kingboyk 10:13, 2 April 2007 (UTC)
Yup, and then they can add individual articles to the Article List, and copying from list would be useful. Date/time to add tonight i think Reedy Boy 19:42, 2 April 2007 (UTC)
To try and improve the juttering, i've changed the 2 list views for 'NoFlickerListViews' that are used in IRCMonitor, seems less jerky. See how it goes. Reedy Boy 20:49, 2 April 2007 (UTC)
Something, perhaps that change?, has broken my double click code and my tool tip code. (revs 896, 897) --kingboyk 17:15, 3 April 2007 (UTC)

[edit] Ref formatter

We've got two bugs related to Parsers.FixFootnotes. I suppose it's time to disable it until we can be sure that it will work ok. MaxSem 12:46, 2 April 2007 (UTC)

[edit] DEFAULTSORT

r908, might be worth checking. Further to User_talk:Kingbotk/Plugin#Listas_and_DEFAULTSORT, and in the interests of code reuse, I've changed AWB to call the DEFAULTSORT regex in the new module I added yesterday. My regex is slightly better anyway, since it deals with this perfectly legal scenario. --kingboyk 13:01, 3 April 2007 (UTC)

[edit] New Template

Hey Guys, To make our lives easier, template created to list SVN log Rev: {{awbsvn}}

Gives rev 666

Reedy Boy 21:44, 3 April 2007 (UTC)

[edit] AWB Accounts/Profiles

Another idea

Was discussing this with Steve first.

It would be good to have some form of a profile manager in AWB.

Quite a few people have bot accounts and normal accounts, would be useful if you could easily switch between them, without having to re-login.

Save account names and possibly a default settings.xml in a generic settings file for AWB, and then save the password, encrypted into say the registry.

Reedy Boy 20:49, 4 April 2007 (UTC)

This is a good idea, but I have security concerns. I absolutely veto storing account info in settings files; storing them encrypted in the registry would usually be OK but since the application is open source I'm a little concerned about even that. I won't say any more of course because of WP:BEANS. --kingboyk 13:55, 5 April 2007 (UTC)
OK, been thinking about this some more:
  • We can give the user a security warning and the option of password-protecting their profile, and using that password in the encryption process. If they decline, we'll use the details compiled into AWB. Encryption should be enough to deter any casual hacker who has somehow got access to the registry; any attack specifically against AWB users, well, the onus is on them to password-protect their details. I personally wouldn't bother with using a password, as I think the risk is small and I'm not going to run any malicious code.
  • The account info should be an object, but the password shouldn't be passed outside AWB. Instead, plugins should be notified when the user switches accounts, and also there should be an addition/overload to WikiFunctions.Editor: void Login(Profile profile). My plugin already stores account info and uses that class to upload logs; I need a simple transition.
If we can do this, I think this is a go-er and another nice addition v4. Thoughts? --kingboyk 11:44, 7 April 2007 (UTC)
I do like this idea, and it would certainly make things easier for many. The concern about security is always present, and the storage of passwords is an issue. However, it's worth noting that it is up to the user to protect their details, but it would be nice to keep the option open to them to store them encrypted somewhere, on the condition that the security concerns with this are made abundantly clear. The wider idea of profiles for using AWB is great though :) Martinp23 11:55, 7 April 2007 (UTC)
And we can give them the option if they do actually want to save the password for certain accounts. If they didnt want to save, when the selected login, it could give an inputbox asking for the password and login anyway =). Commiting a base mock form to SVN now. Reedy Boy 12:31, 7 April 2007 (UTC)
Yep, but I personally would just trust AWB, because I use the same password for both accounts. Anyrode, if you can check that we can actually do the login code programatically, get the encryption code from that URL I gave you, and port the registry code from wikifunctions2, and do the form... i.e. plenty to be going on with until we decide on the details. Certainly the password field will be private, so that only the Profile object knows it, we might even store it encrypted in memory and decrypt it on the fly... --kingboyk 12:36, 7 April 2007 (UTC)
Basic viewing form done, and also a basic add (could be used for edit too) form done.
RijndaelSimple module moved into WF.DLL under Encryption.cs
Reedy Boy 12:59, 7 April 2007 (UTC)
As you know my desktop PC has stopped working :( Not fixed it yet, might be terminal. --kingboyk 14:23, 7 April 2007 (UTC)
I'm back, having lost a working day and sans audio. Best guess is that the audio chip on my motherboard is f*cked. (cries) --kingboyk 17:09, 7 April 2007 (UTC)

I had all these improvements and fixes planned for today and got none of it done, sigh. What a day! --kingboyk 21:20, 7 April 2007 (UTC)

[edit] Time in log

The time isn't added to the "saved" list view. —METS501 (talk) 21:32, 4 April 2007 (UTC)

Update your SVN - Added tonight Reedy Boy 21:34, 4 April 2007 (UTC)

[edit] Error

I'm getting a "Configuration system failed to initialize" error when I start up the latest SVN build. Any ideas? It's not happening in the debugger, only after actually building the project. —METS501 (talk) 17:39, 5 April 2007 (UTC)

Do you have all the necessary files in place? I seem to recall getting that error when a file was missing.
BTW, I just got a missing object error in an SVN build, but I don't know if it was caused by AWB (e.g. logging object) or plugin. --kingboyk 17:44, 5 April 2007 (UTC)
Yeah, as far as I know everything's in place. I tried deleting the output files and letting them regenerate; same error. —METS501 (talk) 17:47, 5 April 2007 (UTC)
I just deleted the entire folder, and re-checked out everything from SVN, and then rebuilt: same error. —METS501 (talk) 21:17, 5 April 2007 (UTC)
If you've got all files including AutoWikiBrowser.exe.config in place, I don't know what else to say. Mighty strange that it would work in the debugger but not compiled. Both are working for me, btw. --kingboyk 00:30, 6 April 2007 (UTC)
Can you email me your config file and I can compare mine to it to check for problems? Special:Emailuser/Mets501 works. —METS501 (talk) 19:49, 6 April 2007 (UTC)
I'd be surprised if it's settings, but FWIW I just emailed you the one I use most often. --kingboyk 20:09, 6 April 2007 (UTC)
I'm getting the same issue in the debugger, but not in compiled (though I am running the program as administrator in Vista). Could this be a permissions issue? If it is, then it has appeared surprisingly suddenly... Martinp23 19:53, 6 April 2007 (UTC)
So you have the opposite problem as me :-) When running Visual Studio with or without admin permissions I get no error on debug, and when running AWB compiled with or without admin permissions I get the error, so I don't think it's a permissions issue. —METS501 (talk) 19:57, 6 April 2007 (UTC)
Almost certainly not permissions then! On a related point - when I had this error on startup, I got a generic WebClient error when doing stuff with ExpandTemplates, though all other connections worked fine. That issue resolved itself after running the program independantly of VS2005 with admin privs (at which point I got a message from McAffee about it...). Hopefully it's something simpler than this though! Martinp23 20:04, 6 April 2007 (UTC)
AWB must have decided it only likes the british - Rule Britannia!! ;) Reedy Boy 20:00, 6 April 2007 (UTC)
(ec) Lol - but I'm British! Martinp23 20:04, 6 April 2007 (UTC)
Stepping through, I get a System.Configuration.ConfigurationErrorsException error on line 43 of Settings.Designer.cs, which is being called by line 86 of Main.cs. See below for exception detail: Martinp23 20:51, 6 April 2007 (UTC)
System.Configuration.ConfigurationErrorsException was caught
  Message="Configuration system failed to initialize"
  Source="System.Configuration"
  BareMessage="Configuration system failed to initialize"
  Line=0
  StackTrace:
       at System.Configuration.ConfigurationManager.RefreshSection(String sectionName)
       at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
       at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
       at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
       at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
       at System.Configuration.SettingsBase.get_Item(String propertyName)
       at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
       at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
       at AutoWikiBrowser.Properties.Settings.get_StubMaxWordCount() in C:\Users\Martin\Desktop\AWB\AWB\AWB\Properties\Settings.Designer.cs:line 43
       at AutoWikiBrowser.MainForm..ctor() in C:\Users\Martin\Desktop\AWB\AWB\AWB\Main.cs:line 86
This is clearly an issue with the settings file appearing empty, non-existant or inaccessible. The temproary user.config produced by VS when I debug is empty, and presumably there's a similar issue at compilation time on Mets' system (presuming the new config file didn't fix the issue). Does anyone have any ideas? For background info: I'm running VS2005 on Vista Home, with .NET 1.1, 2.0 and 3.0 installed. I can't pinpoint a time tnhat the issue occured, as this is a new PC which I'm still in the process of setting up, so am installing and uninstalling stuff all the time. Martinp23 21:51, 6 April 2007 (UTC)
The painful but obvious approach is to check out an old revision, try that, then the next revision, and so on...
Are you using a "full" VS2005 or the Express edition? --kingboyk 22:00, 6 April 2007 (UTC)
I'm on the full version, SP1 with Vista update. I'll try a few random checkouts from the past to see if there's an issue, and check the various VS settings - Martinp23 22:16, 6 April 2007 (UTC)
It's almost certainly an issue with system permissions in both my case and Mets' case. To fix, I set the .sln file to open with VS version selector (rather than devenv.exe), and made devenv.exe open without admin permissions (ie - reset these options to default on Vista). Of course, this is a bit of a pain in terms of Vista/VS interoperability, but resolves my issue. I can't guess at what Mets' issue is, but it may be worth re-building the program making sure that the settings are all at default. Martinp23 22:34, 6 April 2007 (UTC)

[edit] Logging error or something else?

The AWB logging tab (which is proving hugely useful) tells me that AWB skipped Talk:John the Scot (bishop) because the page is protected. However, it seems that page isn't and has never been protected (unless I made a mistake when looking at the logs). --kingboyk 17:49, 5 April 2007 (UTC)

Hmm, maybe the database was temporarily locked and AWB confused it for being protected? —METS501 (talk) 17:55, 5 April 2007 (UTC)

[edit] Log context menu

A todo list for items I think should be on the log context menu (not in order):

  • Remove
  • Open in browser
  • Open history in browser
  • Add to article list
  • Cut/copy
  • Select all/none/invert

Sam suggested making a user control and putting the log list boxes onto that; I think it's a good idea for encapsulating functionality. Maybe, then, the context menu could be developed on that control and passed to each log entry object at the same time as it's added to the list. --kingboyk 19:27, 5 April 2007 (UTC)

Now in a control. Reedy Boy 21:04, 5 April 2007 (UTC)
Yep, a nice bit of OOP and great work from Sam... except he disabled the f*cking double click code again!!! I'll be taking that barnstar back, young man! --kingboyk 00:32, 6 April 2007 (UTC)
I know for sure i copied it accross, as i did with the colomn click event... Reedy Boy 09:37, 6 April 2007 (UTC)
The event handler was there, but it wasn't attached in the designer. Perhaps I should do it in explicit code so nobody else (or, more likely, me!) breaks it again :P --kingboyk 20:06, 6 April 2007 (UTC)

[edit] ExpandTemplates issue

The issue which caused unicode problems is now resolved in SVN, however the offending code is still live in the current release, and the program is set to use the expandtemplates feature by default when subst'ing. The result of this is that, although the use of the function when carrying out general fixes is now disabled, it is still readily used by people when subst'ing using the find/replace system. Do you think this is something that a bug fix release should be made for? Martinp23 17:07, 6 April 2007 (UTC)

Probably, just we are still working on the logging element... Which works to an extent in its current state, there have been a hell of a lot of changes since rev 860 to the current rev 959. Steve and I aren't far off, so we should be able to get one out this weekend!! Reedy Boy 17:22, 6 April 2007 (UTC)
The other option is to checkout a known good revision, apply the new patch, and release that. The logging stuff is mostly great, but I've been getting occasional runtime errors when my bot has been running... I wouldn't recommend release of the current svn version. --kingboyk 20:05, 6 April 2007 (UTC)
Also, I can't compile and run the software and Martinp23 can't run it in debugger mode, so we should probably figure that out first. —METS501 (talk) 23:31, 6 April 2007 (UTC)
Yep, and other supposedly fixed issues remain, like it not exiting cleanly if exited immediately. Sam also had problems just now when exiting. I forget what, but no doubt he'll chip in :) --kingboyk 23:53, 6 April 2007 (UTC)
We have an infinite loop, as the web browser control has been disposed, so it isnt going to change status.
while (ReadyState != WebBrowserReadyState.Complete) Application.DoEvents();
Reedy Boy 10:22, 7 April 2007 (UTC)

[edit] Stub location in article

After changing it in SVN to comply with simple's system of doing things, I've been asked on IRC why the stub tag is put after the categories by AWB, so mixing up the visible and the invisible content. If made, this would only be a cosmetic change and could reault in meaningless edits - is it worth committing a fix based on the (apparent) support from the community for it? Martinp23 23:08, 6 April 2007 (UTC)

I've always disagreed with it being done that way too. How can we determine consensus? (IRC is not consensus, btw!) --kingboyk 23:52, 6 April 2007 (UTC)
Dunno - an IRC poll? :P (only joking!). I was told on IRC that the current system goes against common sense, and is against what most would expect (only 2 people voiced their opinions). I'll make a post on the Village Pump about it, and see what we get. Martinp23 11:46, 7 April 2007 (UTC)
I find your lack of faith in mightiness of the IRC cabal, great and mighty, disturbing. Cabal's sock 14:58, 7 April 2007 (UTC)

[edit] Contributions

I don't think this is related to AWB, but it may be, so I'll post here. I've made 60 edits on AWB, and its been 25 minutes and they're not showing up in my contribs. Very strange. The edits did take place, however, as can be seen from the article edit histories. —METS501 (talk) 00:08, 7 April 2007 (UTC)

OK, they finally showed up. That was weird. —METS501 (talk) 00:15, 7 April 2007 (UTC)
The lag has got worse and worse tonight. It was about 9 minutes, now it's 25 or so. Special:Recentchanges stays up to date, watchlist and contrins don't. --kingboyk 00:21, 7 April 2007 (UTC)
Yeah, I wonder what happened. —METS501 (talk) 02:11, 7 April 2007 (UTC)

[edit] Wikipedia:AutoWikiBrowser/User talk templates

Templates are now loaded from Wikipedia:AutoWikiBrowser/User talk templates. I've tested it, and it seems to work perfectly, but someone might want to check it over to make sure. —METS501 (talk) 02:10, 7 April 2007 (UTC)

Also, do you think that page should be semi- or fully protected? The only argument for semi- is that User:TeckWiz isn't an admin, and he probably uses it the most (with his bot). —METS501 (talk) 02:13, 7 April 2007 (UTC)
I guess semi- would be good until I become an admin :). I'm guessing alphabetical order isn't necessary? Also, is this list retrieved every time AWB starts? --TeckWiz ParlateContribs@(Lets go Yankees!) 02:16, 7 April 2007 (UTC)
It loads the first time that you try to edit a user talk page with general fixes enabled when you load up AWB. I guess we can semi-protect it; there's really no potential for abuse, aside from it not functioning (i.e. it can't be made to do outrageous things like you can with the typo list). —METS501 (talk) 03:26, 7 April 2007 (UTC)

[edit] AWB extension proposal

I've got a proposal for extension. For somebody it seems vague, so I should explain what I propose:

  1. Move common UI from WikiFunctionы library to seperate library for common UI
  2. Move wiki params from static class to normal classes (or you know how to make WikiFunctions library on to wikis in one time?)
  3. Move IRC access and parsing to seperate library
  4. Expand WikiFunctions libarary functionality
  5. Add useful utilities (like local editcounter or watchlist observer)
  6. Add automatic bots
  7. Add scripting (I saw a sample in DirectX SDK, that uses C# for scipting. It's written on C++, but I hope it's possible to use it from .NET program)

- VasilievVV 07:39, 7 April 2007 (UTC)

OMG another WikiSuite :D
I was writing email reply to you when I saw this message, so I'll reply you here.
  1. Any reason for it? WikiFunctions is just a library for common functions of AWB and things that need to be in a dll due to .NET architecture.
  2. This would require a substaintial rewrite. Will you do it?
    Yes, I think I'll try - VasilievVV 11:58, 7 April 2007 (UTC)
  3. Another dll? Currently AWB is shipped with one library, and you're proposing to split it to 5-6. That would be extremely inconvenient.
    Maybe. But now it's like a melting pot. - VasilievVV 11:58, 7 April 2007 (UTC)
  4. No need for greed or hunger, A brotherhood of man. %)
  5. There's a m:Toolserver for such things.
    It can't notify you about something immediately - VasilievVV 11:58, 7 April 2007 (UTC)
    But good tools on toolserv are better than writing a similar thing for AWB, as using toolserv can reduce strain on the databases and give you a wider range of data available (when replication gts back up to speed). Martinp23 12:17, 7 April 2007 (UTC)
  6. AWB works fine in bot mode.
    AWB can't perform some custon actions (like collecting user edit count and put it on his subpage), can it? - VasilievVV 11:58, 7 April 2007 (UTC)
    Only cause it isn't coded to do so. Reedy Boy 12:05, 7 April 2007 (UTC)
    This seems to involve the same as the point above - these things are easy to code for, but haven't been done as they have negligable value (why would the bot need to update its edit count, for example). Martinp23 12:17, 7 April 2007 (UTC)
  7. Custom C# code for article text modification is supported. Do you want to have a whaladon that would support custom scripting for everything (e.g. selecting next article to edit, switching to another project)?
    Yes. - VasilievVV 11:58, 7 April 2007 (UTC)
MaxSem 08:04, 7 April 2007 (UTC)
Hehe. If theres anything you specifically want in AWB let us know, it has support for the different languages and such... MaxSem has pretty well hit the nail on the head Reedy Boy 10:20, 7 April 2007 (UTC)
You can always write another DLL which adds these extra features, or send us code for adding to the repository. That's what I did; I just reference wikifunctions.dll and then build on it. Now some of the features I put into that code are working their way into AWB/wikifunctions proper. I'm sure we'd be delighted to have extra features from you. --kingboyk 12:19, 7 April 2007 (UTC)
Take a look at the DotNetWikiBot framework (DNWBF), which is also in C#, but is more geared towards bots that AWB is, and is far more generic. Don't forget that Wikifunctions.dll was designed with AWB in mind, and making the library more usable by other programs is a lot of work, and would probably break AWB. DNWBF would be more receptive to changes, as it is designed to be generic. Martinp23 12:25, 7 April 2007 (UTC)
Thanks for idea. - VasilievVV 17:10, 7 April 2007 (UTC)

[edit] Magic words

This change needs a review. MaxSem 17:14, 7 April 2007 (UTC)

[edit] Nudge timer revisited

The new nudge timer seems to be working well, but I think from the logs that 2 minutes as a default is a bit aggressive.

I'd propose either making the default longer, or perhaps increasing the gap between the event firing by, say, 1 minute increments each time, until it maxes out at 10 minutes.

Thoughts? --kingboyk 17:24, 9 April 2007 (UTC)

Unless I'm missing something, what's wrong with having it at 2 minutes? It's just restarting AWB if it stalls. Is it doing anything else? --TeckWiz ParlateContribs@(Lets go Yankees!) 17:41, 9 April 2007 (UTC)
It's adding a line to the log which gets uploaded by my plugin. It's also querying a possibly overloaded server. --kingboyk 18:01, 9 April 2007 (UTC)
Oh...okay. Then it probably would be a good idea. --TeckWiz ParlateContribs@(Lets go Yankees!) 18:03, 9 April 2007 (UTC)