Wikipedia:Bots/Requests for approval/BAGBot
From Wikipedia, the free encyclopedia
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Approved.
[edit] BAGBot
tasks • contribs • count • sul • logs • page moves • block user • block log • flag log • flag bot
Automatic or Manually Assisted: Automatic
Programming Language(s): Perl, using Perlwikipedia, WWW::Mechanize, HTML::Entities, URI::Escape, Carp
Function Summary: Reports on status of requests for bot approval
Edit period(s) (e.g. Continuous, daily, one time run): Sub-hourly, possibly in intervals of 10-30 minutes
Edit rate requested: 1 edit per 10 minutes, at most
Already has a bot flag (Y/N): N
Function Details: The bot first loads WP:BRFA and screen-scrapes for a list of transclusions. Several items are removed from this list, including the header, archivebox, and anything starting with botlinks. This new list is iterated over, a history request to no more than 50 revisions is made using the API, and the text of the page is retrieved. The most recent edit's vitals are saved for the "most recent edit" data. That is compared against a list of BAG members to see if the most recent editor is in BAG. If so, the most recent statistics are propagated to the "most recent BAG edit" statistics. If not, then we iterate over the other edits, most recent first, until A) we reach the end or B) we find a BAG member. We compare the username here with BAG, if it matches, we've found a BAG edit, if not, we say there was no BAG edit. We now look for several templates which may be transcluded in the text, such as {{BotApproved}}. We append a new record to the table, and proceed to the next bot. Eventually, this data is saved, and a 10-30 minute timer begins.
[edit] Discussion
Also, if BAG assistance is needed using the HTML comment <!--NeedBAG-->, it will be noted in the table. ST47Talk 13:59, 17 March 2007 (UTC)
Approved for trial. This sounds useful and it would seem to place no significant load on the server. I note that you have a working version in the sandbox. Let's see it run live for a few days. --kingboyk 14:01, 17 March 2007 (UTC)
- OK, any objections to running it at 10 minute intervals? After the trial, I'll see how often it's actually updating and revise then. ST47Talk 14:13, 17 March 2007 (UTC)
- I think any less than every 10 minutes and the data will be too old to be of any use, so let's go with that for now. --kingboyk 14:21, 17 March 2007 (UTC)
- My template works! I've set it to update in 10 minute intervals. ST47Talk 14:22, 17 March 2007 (UTC)
- Well not really, I saw in my contribs that I didn't have the most recent edit ;) Your template - which I took live btw - might work better if it placed articles into a category or better still a list? Perhaps the bot could list "attention needed" using what transcludes here, as part of it's list building every 10/x minutes?
- Another comment: It might be a good idea if it excluded edits by BAG members marked as minor? (provided we all make sure that edits we don't want listed as BAG activity are marked minor). I for example am about to edit a request page with some mere formatting changes, it's not helping the process move forward (yet - I'm linking some templates so I can better understand the request). --kingboyk 14:28, 17 March 2007 (UTC)
- [1] to the first bit, and for the second bit, I'd have to look at the framework. ST47Talk 14:32, 17 March 2007 (UTC)
- Cool. --kingboyk 14:33, 17 March 2007 (UTC)
- If the comment begins with or contains a certain preagreedupon string, such as "MINOR", then the bot can be told to ignore it. I've set this option up, so try editing one of them with "MINOR" somewhere in your comment to make sure it works. ST47Talk 14:38, 17 March 2007 (UTC)
- Yep, that worked. I'm going to change it so that the "Recent edit" is ignored as well if it is minor. ST47Talk 14:51, 17 March 2007 (UTC)
- Can you put a "last updated" line on it please? Also, Wikipedia:Bots/Requests for approval/Antischmitzbot has a {{BAGAssistanceNeeded}} on it but the bot hasn't picked that up. Maybe it's looking in your user space only? --kingboyk 15:15, 17 March 2007 (UTC)
- Yep, that worked. I'm going to change it so that the "Recent edit" is ignored as well if it is minor. ST47Talk 14:51, 17 March 2007 (UTC)
- If the comment begins with or contains a certain preagreedupon string, such as "MINOR", then the bot can be told to ignore it. I've set this option up, so try editing one of them with "MINOR" somewhere in your comment to make sure it works. ST47Talk 14:38, 17 March 2007 (UTC)
- Cool. --kingboyk 14:33, 17 March 2007 (UTC)
- [1] to the first bit, and for the second bit, I'd have to look at the framework. ST47Talk 14:32, 17 March 2007 (UTC)
- My template works! I've set it to update in 10 minute intervals. ST47Talk 14:22, 17 March 2007 (UTC)
- I think any less than every 10 minutes and the data will be too old to be of any use, so let's go with that for now. --kingboyk 14:21, 17 March 2007 (UTC)
- This looks useful, and may help bring attention to lapses here. — xaosflux Talk 15:00, 17 March 2007 (UTC)
-
-
- Great! I see you're new method of using comments before each {{botlinks}} template, that works too. —METS501 (talk) 18:46, 17 March 2007 (UTC)
- OK. If you look at the tables, you will see that one bot appears to be denied that isn't. Two reasons why:
- There is to {{BotTrial}} tag - which raises the subpoint:
- Bots in that section should be "Trial" by default. I'm going to fix that.
- And also, BotDenied has a higher priority than BotTrial, reasoning is that bots can have trials then be denied, but not vice versa.
- There is to {{BotTrial}} tag - which raises the subpoint:
- I've fixed it up do that it will work, but what's your opinion on priority? ST47Talk 19:12, 17 March 2007 (UTC)
- OK. If you look at the tables, you will see that one bot appears to be denied that isn't. Two reasons why:
- Great! I see you're new method of using comments before each {{botlinks}} template, that works too. —METS501 (talk) 18:46, 17 March 2007 (UTC)
-
Currently, here's the priority, lowest to highest:
- Open, Trial, Expired, Withdrawn, Denied, Approved, Unknown, Speedy Approved.
ST47Talk 19:15, 17 March 2007 (UTC) I notice that some of the bot's edits are marked as minor. Does minor denote no changes? --kingboyk 20:36, 18 March 2007 (UTC)
- No, minor denotes the fact that User:Shadow1 finally made minor edits possible ;). ST47Talk 21:38, 18 March 2007 (UTC)
- Lol, ok. I was wondering then, could the bot only edit if there has been a change? If you want to update the last updated line every 10 minutes still, then you could perhaps write that one line out to another page and transclude it?
- Basically, your bot's output is always appearing near the top of my watchlist even if there's nothing new and it's becoming annoying :) --kingboyk 21:43, 18 March 2007 (UTC)
- Well then, take it off your watchlist! Yes, I can do that, and actually, I don't think it will be as hard as I thought at first. Let me test some code. ST47Talk 22:15, 18 March 2007 (UTC)
- If I take it off my watchlist it's lost a lot of usefulness ;)
- Anyway! Just this one thing and I think we can get this approved. --kingboyk 22:26, 18 March 2007 (UTC)
- Yeah, I think it's set up properly, I'll go check the logs. ST47Talk 22:42, 18 March 2007 (UTC)
- I did a test, and it's working. ST47Talk 22:48, 18 March 2007 (UTC)
- By the way, I've been told that the latest version of the framework should fix that crashing problem when it tries to edit with a locked DB, as it did this morning. ST47Talk 01:40, 19 March 2007 (UTC)
- Well then, take it off your watchlist! Yes, I can do that, and actually, I don't think it will be as hard as I thought at first. Let me test some code. ST47Talk 22:15, 18 March 2007 (UTC)
Look great. There's a bug in the bot though. When there have been no BAG edits, the program shows "Never edited by BAG" with a duplicated link to the edit 2 columns before (the general last edit). —METS501 (talk) 00:08, 19 March 2007 (UTC)
- That's not a bug, that's a feature ;) - what would you like it to link to? ST47Talk 00:41, 19 March 2007 (UTC)
Approved. OK, I think is looking good and as it only edits one page every 10 minutes there's little risk attached to it, so you're approved. You'll be getting a bot flag so please don't edit as "minor"; your edits will be hidden anyway unless the user chooses to show bot edits. --kingboyk 17:37, 19 March 2007 (UTC)
- OK, switching to minor and reloading. ST47Talk 18:07, 19 March 2007 (UTC)
- Don't forget to update your edit summary too. Cheers, thanks for the bot and have fun! --kingboyk 18:44, 19 March 2007 (UTC)
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.