User talk:Thegeneralbot

From The Urban Dead Wiki

Jump to: navigation, search

Can I get you to subst in notification templates instead of just transcluding them? ᚱᛖᚢᛖᚾᚨᚾ 01:21, 6 May 2011 (BST)

I was just about to ask the same. Mystery transcluded headers don't work out any other way. --Karekmaps 2.0?! 01:31, 6 May 2011 (BST)
Yup, I've already put that change into the code..--The General T Sys U! P! F! 07:42, 6 May 2011 (BST)
Thought I saw that on some of the later edits; just making sure. Good stuff! Happy ᚱᛖᚢᛖᚾᚨᚾ 09:05, 6 May 2011 (BST)
Yeah, I'm slowly fiddling with it as I see where the problems are.
I'm currently trying to get it to match the date uploaded against the current date so that it doesn't tag images that have just been uploaded, which is slightly tricky due to the differece in formating of dates used on the wiki compared to dates outputted by python. After that I'm going to try to make it condense notices under one header (currently it adds a new header for each image it finds).--The General T Sys U! P! F! 10:29, 6 May 2011 (BST)
Better idea. Can we just get the bot to not give notices? Maybe just have it add a category to the images considering they should be on the uploader's watchlist anyway. --Karekmaps 2.0?! 16:05, 6 May 2011 (BST)
I could, but part of the point is to notify people of images that they've forgotten about and I don't like working on the assumption that people are actually intelligent (because there are lots who aren't). However, I am aware that it breaks your userpage and I've created {{nobots}} flag which should allow you to exclude it from your talk page: Is that acceptable?--The General T Sys U! P! F! 19:10, 6 May 2011 (BST)
So long as there's a solution for people who don't want the notice, yeah that works for me. I honestly have more problem with it re-adding the message after having it deleted off my page then anything else about the formatting. --Karekmaps 2.0?! 19:55, 6 May 2011 (BST)
If you are going to give notices, might I suggest not using a bot account to do so? From what I've seen (i.e. what happened to me), bot accounts that post on talk pages do not trigger the orange wiki notifications to talk page owners, nor do they trigger e-mails in the case of users who have signed up for them. If the point of posting to the talk pages is to notify people, then it would be best if an account that actually triggers notifications is used. In my case, I only noticed that my talk page had been edited after I looked at my Watchlist, but I never received any form of notification from the wiki software that a change had been made to my talk page. Aichon 20:36, 6 May 2011 (BST)
I've change it so that the bot no longer marks its edits as minor; this should mean that they show up on talk pages.--The General T Sys U! P! F! 10:21, 7 May 2011 (BST)
It shouldn't be re-adding messages that were deleted as long as the template is still on the image. When did that happen? Please let me know if that happens again.--The General T Sys U! P! F! 10:21, 7 May 2011 (BST)

Template:Orphan

The template isn't officially depreciated, but it should be. I'd recommend using {{OrphanAlert}} if the bot will be used to notify users via template. {{OrphanPage}} may also be a good task, just keep in mind that not all orphans are actually orphans. Some pages are meant for inclusion only (typically group advertisements and navigation bars). For these, I've been creating group categories where there were none and linking the pages there. See {{GroupCat}} and category:CORAM for an example. ~Vsig.png 16:02, 13 May 2011 (UTC)

Eagh, userbox templates are not notices and bots shouldn't be spamming them. --Karekmaps 2.0?! 16:04, 13 May 2011 (BST)
Agreed. If anything, the bot should only be adding <noinclude>{{OrphanPage}}</noinclude> to the top of orphaned pages, where it will be categorized as an orphan and can be sorted out by someone with a pulse. ~Vsig.png 16:42, 13 May 2011 (UTC)

Yeah, the reason the bot isn't already running is:

  1. Because I'm still making sure it behaves correctly; Unused Images was a small enough category that I could police it myself: Orphaned pages has to be right.
  2. Because I'm still debating whether this is a good job for a bot and how far it should go.

If I may ask: is the Rob with the template used or the concept of a bot doing the notifying?--The General T Sys U! P! F! 18:40, 13 May 2011 (BST)

It's the template, really. The problem is that for a long time, many people felt that Special:lonelypages needed to be cleared, even if it meant spamming the creators of the pages. At one point, people got sick of it and tried to ban the use of the template. As a compromise, the text portion of {{Orphan}} was altered so that action was required by the author to de-orphan pages and almost everyone decided to stop using it. A few months ago, I took it upon myself to expand on that system and create category:Orphans and the newer and improved {{OrphanAlert}} and {{OrphanPage}} in hopes that people would BE BOLD and introduce valuable links to articles. ~Vsig.png 18:58, 13 May 2011 (UTC)
So would there be serious objection if the bot started notifying with {{OrphanAlert}}? I'm still debating if I want to make it do that, it's a lot of extra coding and a lot more potential bugs, so I'm not going to do it if it's going to cause controversy.--The General T Sys U! P! F! 21:51, 13 May 2011 (BST)
I wouldn't bother having your bot do it, honestly. Basically, the template is there as a tool to notify active users and groups that have legitimately forgotten to link their pages. I'd be fine if the bot just added {{OrphanPage}} to the orphans pages themselves, though. ~Vsig.png 22:17, 13 May 2011 (UTC)

Template:Orphanedimage should add a timestamp to make it easier to identify when an image was flagged as orphan, thus when it will become eligible for deltion --People's Commissar Hagnat [talk] [wcdz] 00:02, 14 May 2011 (BST)

Substitute in Template:Unsigned

D'you reckon you can have the bot trawl for and substitute in {{unsigned}} templates? These should really be subst-ed in when used, but I know a lot of people (myself included) haven't followed good template hygiene with these.

If it goes well, I think it might be worth working up a list of templates that should or should not be subst-ed and using the bot to enforce the former.

Might also be nice to have it check for unsigned comments in appropriate areas (and incorrectly invoked {{unsigned}} templates), but that'd likely be a separate function.

Cheers! ᚱᛖᚢᛖᚾᚨᚾ 03:36, 19 May 2011 (BST)

It looks like a lot of the links lead to protected pages. Not to say it couldn't be run for mainspace usage, though. ~Vsig.png 06:04, 19 May 2011 (UTC)
Well, I'll run it on the unprotected pages for now. On a side note: the bot is actually capable of switching to a Sysop account when it needs to edit protected pages.--The General T Sys U! P! F! 09:22, 19 May 2011 (BST)
While this may be technically possible, I'd like to request that you not do this without prior discussion. If you can demonstrate a clear need for the bot to have sysop permissions, we should discuss giving it those permissions. Otherwise, there may be unfortunate consequences should it go rogue. ᚱᛖᚢᛖᚾᚨᚾ 00:39, 23 May 2011 (BST)
Yup, can do. I'll set it up later today.
Yeah, I'm OK with it if someone wants to give me a list.
Auto-signing unsigned comments is on the list, but it's quite difficult to implement because it needs to 1) recognise individual comments from different users in a block of texts and 2) Somehow match that against the revisions diffs in order to get the user who posted it. Recognising the comments is the most challenging part because there's no easy way seperator that it can scan for to deliniate comments from different users.--The General T Sys U! P! F! 09:18, 19 May 2011 (BST)
Quick note: some of us actually prefer having it as a template, since it creates cleaner code which is easier to read. Counting bytes is only useful on pages that are in danger of exceeding the transclusion limit. Elsewhere, cleaner code makes for easier editing and less confusion. Aichon 10:58, 20 May 2011 (BST)

Just to note: I am going to do this but my notebook, which is the machine that normally runs this stuff, is currently refusing to start the wireless service. I'll need to either fix it or port the bot over to my personal laptop, which will delay things a bit.--The General T Sys U! P! F! 19:04, 19 May 2011 (BST)

Looking good so far! Big Grin :D
I had no idea {{wikipedia}} existed until I looked at the code that was getting subst'd in. We may want to subst that template, too. ᚱᛖᚢᛖᚾᚨᚾ 23:18, 19 May 2011 (BST)
Yup Big Grin :D. It's turning out to be quite a nice script.
Yeah, I don't actually get why we need that template when we can just use the Wikipedia: prefix in links. In fact, I think I might change the template over.--The General T Sys U! P! F! 09:15, 20 May 2011 (BST)

Substitution of {{Wikipedia}} is running.--The General T Sys U! P! F! 14:19, 20 May 2011 (BST)

I'm actually a little annoyed at the bot now, since, prior to this run of the bot, I added {{nobots}} to the navbar that's on most of my pages and it wasn't respected. Any chance the code for the bot could be modified to handle such inclusions, that way users don't have to include it individually on all (in my case, dozens or hundreds) of their pages? Also, why is it running on User and User Talk pages in the first place? There should be a clear justification for any edits of this sort (bot or otherwise) done on user pages, but there isn't one here. Contrary to Rev's idea of "good template hygiene", the only justifiable reason to subst these templates after the fact is if pages are nearing the transclusion limit, which has only been an issue on A/VB, so why userspace pages are being modified without their permission is beyond me.
I know you mean well, but I think you're being a bit overenthusiastic in your use of your Maslow's Hammer. I'm of the opinion that these edits are doing more harm than good since they're making code less human-readable in places where that matters (they're also inflating the size of the code, which likely doesn't matter too much). Editing owned pages and comments should only be done with good reason, and I haven't seen one provided in this case. Aichon 20:25, 20 May 2011 (BST)
The bot scans the text of the page for the {{nobots}}, so it won't recognise inclusions from other templates: Unfortunately, the only way to get around that would be to have it fetch and scan the text of very single template used on the page, which would massively increase both the processing time and the server load; it would also mean that adding the flag to a single template would also add the flag to every single page the template is included on, which would be rather undesirable.
The reason it ran on User and User Talk pages is because it was set to simply edit all pages wit the template included. It is set up like that on the assumption that batch edits to templates are normally uncontroversial maintenance edits agreed by concensus and should thus be included all pages. With hindsight, this was probably an oversight as no one should really be editing other people's user pages without a good reason.
As for he content of the edits: I can see who subst'ing in the {{Unsigned}} template might be undesirable in terms of user-readability. I do, however, believe that subst'ing {{Wikipedia}} was justified because it had absolutely no effect on the size or readability of pages and removed an unnecessary template call, thus reducing server load: Given that there was absolutely no change to the content of the post beyond replacing "{{" with "[[", ":" with "|" and "}}" with "]]", I feel that this was an acceptable alteration to user's in the same way that it is normally acceptable to fix accidental links in other users' posts.--The General T Sys U! P! F! 22:23, 20 May 2011 (BST)
Oops, yeah, I kinda conflated the two batches of changes. The wikipedia one is fine in terms of page size and whatnot. As for checking it, isn't there a list of every template included (even via other templates) on the edit page right below the code? Seems like that could be an easy way to check this sort of thing without a need to parse dozens of pages. I'm also a bit unclear on why it's considered undesirable, since it seems to me like that's a proper and expected behavior. Categorization already happens via templates, which is quite similar to flagging. Aichon 00:57, 21 May 2011 (BST)
Actually, categories and templates are entirely unrelated features. ᚱᛖᚢᛖᚾᚨᚾ 03:42, 21 May 2011 (BST)
I know, Rev. Please read what I said. I wasn't saying that categories and templates are similar features. Clearly they're not. I was saying that adding categories via templates is similar to flagging via templates, and that since the former already happens here, it makes sense for the latter to perform similarly. Aichon 09:25, 21 May 2011 (BST)
The bot uses the Mediawiki API rather than the normal edit form because it's faster, causes less server load and is much easier for the boy to parse. However, it doesn't show all the extraneous bits and pieces that normal editors see (like that template list). It's undesirable because it would mean that bot-protecting an individual commonly used template would also block the bot from every single page that template is included on.--The General T Sys U! P! F! 08:32, 21 May 2011 (BST)
The API stuff makes sense, but what about checking Special:WhatLinksHere/Template:Nobots at the start of a batch operation, and caching that list so that it only needs to be checked once? Also, I promise I'm not trying to be stubborn, but I'm still unclear on why that's undesirable. It seems like expected behavior to me, since in every other situation I can think of on a wiki, templates that are included on a page are acted upon, regardless of whether they were directly included or indirectly included. If we don't want a bot to run on a template, but we still want it to run on the pages the template is included on, we'll just toss a noinclude around the nobots call on the template's page. Again, that's expected behavior and is the way that everything else behaves on the wiki. Aichon 09:25, 21 May 2011 (BST)
That's actually a good idea which I hadn't thought of: my only objection to it is that it will be an ugly and painful mess to code because of the way python handles generator objects. The reasom I considered it undesirable is because, in the current implementation, the bot is simply retrieving the text of the page and thus ignores noinclude tags: This means that putting the tag on one of the framework utility templates would block the bot from huge swathes of the wiki.--The General T Sys U! P! F! 10:18, 21 May 2011 (BST)
Not sure what generator objects are, but I can see now why it's undesirable with the current implementation, since you'd have to actually parse text (speaking from ample experience: NOT a fun or easy task). If implemented to use the link I provided, it wouldn't have to parse text, and wouldn't have issues with noinclude, but that'd mean rewriting things. Still though, I think it might be worth pursuing, since it sounds like people demonstrating the use of the nobots template in a pre, nowiki, or other code of that sort will cause your bot to flag the page as nobots, even though it shouldn't be. Aichon 10:38, 21 May 2011 (BST)
Generator objects are basically iterators that allow you to pass values into a for loop, which is brilliant for taking an actuon on all pages which fulfill a certain criterion but not so good for exempting pages based on a certain a criterion (because it doesn't return a list of values if called directly and you can't do for page not in generator). They're used in my bot to retrieve the lists of pages that it acts on. Yeah, difficulties in parsing text are the main reason why my script to fix broken links is being held up; the dangerreport script works because it only has to match text in a very specific format. The bot does actually have the ability to handle pre and nowiki tags, but it doesn't check for noinclude tags because most of the time you *do* want them to to be recognised: I'd have to write seperate parsing code specifically for template inclusions.--The General T Sys U! P! F! 15:12, 21 May 2011 (BST)
It's not exactly hard to add {{nobots}} to the pages you want bot protected, but let's take this one step further to the logical solution: why not request this as a bot job? Tongue :P ᚱᛖᚢᛖᚾᚨᚾ 22:27, 21 May 2011 (BST)
I like the way you think! Also, this. Aichon 07:09, 22 May 2011 (BST)
I'll see what I can do (I thought I'd found a solution to reading it from transclusions of other templates, but it doesn't seem to work).--The General T Sys U! P! F! 16:18, 22 May 2011 (BST)
Rather than go into a lengthy explanation, I'll just link to where we stole the template from and let you get it direct from the horse's mouth. ᚱᛖᚢᛖᚾᚨᚾ 03:38, 21 May 2011 (BST)
The link you provided doesn't offer any justification for why it is done that way, nor does the talk page. It merely dictates Wikipedia's convention for use of the template. Without a justification, I fail to see the relevancy (unless you mean to make an argument from authority, which I doubt is the case). Also, even that convention is subject to debate. Aichon 09:25, 21 May 2011 (BST)
This is another example of your point. It looks pretty clearly like the reason it's substituted there is because of users creating bots because of a false premise that it's less impactful in a significant way. That's the debate from when the change started and it was more or less just ignored on wikipedia. --Karekmaps 2.0?! 21:01, 21 May 2011 (BST)

Patrolled

Why is the bot automatically marking edits as patrolled? That more or less defeats the whole purpose of the task. You can't automatically review and edit or page.--Karekmaps 2.0?! 11:13, 5 June 2011 (BST)

It's a permission granted to the "bot" usergroup, nothing to do with my code.--The General T Sys U! P! F! 10:58, 6 June 2011 (BST)

Talk pages

Good afternoon. Just a tiny suggestion - would it be possible to fiddle the bot's code so it generates a header when posting on user talk pages? Ta very much, ~~ Chief Seagull ~~ talk 12:34, 17 June 2011 (BST)

Well, kinda. So far there's been two variations on this: Originally, it added a new header every time it notified someone, which looked silly when it added 5 headers to the same talk page in a single run; I then changed it so that it would check to see if a header was already there and not add a new one if there was. The problem is that it doesn't know where on the page the header is and so having the header anywhere on the page will cause it to add a new one, even if there have subsequently been new headers added below the previous notification
I'm currently trying to find a way to work around this but haven't yet managed to; I suspect it will involve an ugly hack which counts the bits before the end of the page.--The General T Sys U! P! F! 13:36, 17 June 2011 (BST)

Um,

Perhaps you could change the bot signature from A helpful bot to A Helpful Little Bot? Yes? Ignore me.--  AHLGTG 18:00, 21 June 2011 (BST)

Heh I immediately thought of AHLG the first time I saw the sig. I agree. ~Vsig.png 18:05, 21 June 2011 (UTC)
Done :D.--The General T Sys U! P! F! 19:01, 21 June 2011 (BST)

Removing categories from previously categorized images

So I noticed that one image that was categorized by the bot has since been put into use. Does the bot check images that it previously categorized to see if they've been put into use and then edit them accordingly? Not a big deal if you haven't got that far yet. Just curious. ~Vsig.png 18:04, 21 June 2011 (UTC)

Oh, btw the image in question is File:BB Bee2.gif. ~Vsig.png 18:05, 21 June 2011 (UTC)
Blarg! Nevermind. I checked history and saw that the bot did in fact remove it's contribution. It was Yon that added the Unused Images category. ~Vsig.png 18:08, 21 June 2011 (UTC)
Not to be confused with a bot.--Yonnua Koponen T G P ^^^ 18:27, 21 June 2011 (BST)
Yeah, at the end of each run the bot checks Category:Unused Images against Special:Unusedfiles and removes the template from any images which are now in use. It doesn't currently check for the presence of the category tag on its own but I'll put that on the to-do list.--The General T Sys U! P! F! 18:51, 21 June 2011 (BST)
And, done! The bot will now replace instances of "Category:Unused Images" with the template and will also check for and remove the category as well as the template when it un-tags pages.--The General T Sys U! P! F! 22:08, 21 June 2011 (BST)

Special:MostLinkedPages

I'm about to be overtaken by a bot. I don't know how I feel about that. I mean, besides Greenwarrior, nobody has been able to overtake me through legitimate means. <_< --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 14:06, 24 October 2011 (BST)

Update: I was overtaken by a bot. A bot! Is Skynet taking over the world now? >_> --•▬ ▬••▬ • •••• •▬ ▬•▬• ▬•▬ #nerftemplatedsigs 21:48, 24 November 2011 (UTC)
It's all part of my evil plan to take over the wiki by ruling Special:MostLinkedPages and using it as a launching pad for my army of terminators!--The General T Sys U! P! F! 12:09, 25 November 2011 (UTC)

Status Reports

Hi, just wondering if you could run the Generalbot again to update a ton of building statuses over 1 (maybe better if 2, but whatever suits you) months old. Thanks in advance! PB&J 18:32, 11 September 2012 (BST)

Personal tools
project wonderful
column-okay