Commons:Bots/Requests/Hazard-Bot 7

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Hazard-Bot (talk · contribs)

Operator: Hazard-SJ (talk · contributions · Number of edits · recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Category replacements

Automatic or manually assisted: Automatically

Edit type (e.g. Continuous, daily, one time run): Periodically

Maximum edit rate (eg edits per minute):

Bot flag requested: (Y/N): No

Programming language(s): Python

There are cases when more help is wanted for category replacements. Now is an example. User:CommonsDelinker/commands has a backlog with, I believe, no bots working on it at the moment, so I'd like to be able to help out in such cases.  Hazard-SJ  ✈  01:36, 19 March 2013 (UTC)


  • There has been some recent issues with SieBot recently that makes COM:CDC to be backlogged. I'd welcome very much a clone for performing those category moves when SieBot is not working. I support approval (with flag). —MarcoAurelio (talk) 15:20, 19 March 2013 (UTC)
  • Please make a test run if this is not standard bot. --EugeneZelenko (talk) 14:28, 20 March 2013 (UTC)
  • If this is not a standard bot, one has to care that nothing inside <nowiki><!-- --> or <source> is replaced. -- Rillke(q?) 17:46, 22 March 2013 (UTC)
  • I planned to use CategoryMoveRobot in (PyWikipedia trunk). Originally, I was planning to manually start the bot for each request, but I could create an on-wiki page for the bot (or use the one currently in use) to use so I wouldn't have to manually start it each time. I'd still integrate the CategoryMoveRobot class into it, though. Would that be preferred? (P.S. SieBot is back up so there isn't much of a rush now.)  Hazard-SJ  ✈  00:27, 23 March 2013 (UTC)
    I think will be good idea to use User:CommonsDelinker/commands for list of requests and proceed automatically. --EugeneZelenko (talk) 14:30, 24 March 2013 (UTC)
    • In such a case, however, the completed requests won't be removed until someone comes along to do so manually, as my bot cannot edit that page.  Hazard-SJ  ✈  04:18, 26 March 2013 (UTC)
      • If you create a separate account for the task, that account could be admin-flagged so that it can edit the page. The task is important and it would be best to integrate a supplementary bot into the existing structure as neatly as possible. Rd232 (talk) 10:55, 3 April 2013 (UTC)
        Even if I'm not an admin myself (as is the current case)?  Hazard-SJ  ✈  23:09, 13 April 2013 (UTC)
        • Many moves require still manual intervention as many items cannot be bot moved and in some cases a redirect is created, otherwise deleted; I don't think that can be handled by a bot anyway. (I spend on average 2 minutes per category move on cleaning up). --Foroa (talk) 11:06, 3 April 2013 (UTC)
          Yes, moving categories it technically impossible, so without admin access it wouldn't be able to do the deletions, but rather, create the new category and request deletion of the old one.  Hazard-SJ  ✈  23:09, 13 April 2013 (UTC)
          • Ideally, the bot should be able to update the Wikidata structures as for example in d:Q1144392. --Foroa (talk) 11:11, 3 April 2013 (UTC)
            I agree: this is a very good idea. Conveniently, I'm already approved to do this on Wikidata.  Hazard-SJ  ✈  23:09, 13 April 2013 (UTC) This can't be done until Wikimedia Commons is somehow integrated into Wikidata.  Hazard-SJ  ✈  03:56, 21 April 2013 (UTC) It's currently not possible to search for values of D:P:P373 via the API. The only way to get to the relevant Wikidata item would be, considering there is a (correct) link in a template on the category page (such as in {{w}}), go to the Wikipedia page, then the item (if there is one), then change the value of p373.  Hazard-SJ  ✈  04:42, 21 April 2013 (UTC)
  • For the record, SieBot is, again, down, so I've gone ahead and coded the bot. I've ran a 16-edit trial with it here, doing four requests in all. Of course, as I already mentioned, the bot isn't able to edit the queue page, since the current one is fully protected. Also, for now, I'm just marking the old category as a category redirect to the new one.  Hazard-SJ  ✈  03:56, 21 April 2013 (UTC)
  • We need at least one other bot looking at the commands. SieBot is asleep way too often. However
    1. If the bot behaves differently from SieBot, it should replace it and not work alongside it
    2. If the bots are to work concurrently, you would have to account for more than one bot picking up the same request (as neither can edit User:CommonsDelinker/commands to remove a request before they start executing it).
If the bot doesn't behave like SieBot, can you specify in the request how it differs? Does the bot alter the old category for example (afaik SieBot does not)? –⁠moogsi (blah) 02:40, 28 April 2013 (UTC)
As for working concurrently, the only (if not, main) problem if they're working on the same category at the same time would be an edit conflict, which is already handled. Specifically, the bot currently creates the new category page if it doesn't exist (attributing the authors in the summary, or on the talk page if the list is too long), then moves the categories. After it determines that the category is empty, it replaces the content of the old category page with {{Category redirect|"new category name"}}. All that can be seen from the trial I made. As for behaving differently, I think the main difference is the implementation, and probably that my bot actually edits the old category afterwards (not sure if SieBot does that).  Hazard-SJ  ✈  02:56, 28 April 2013 (UTC)
{{Move}} requests have to be stripped during the transfer, no need to remove it from the delinker queue as it needs manual inspection (5 % of moves need manual intervention or category restructuring). --Foroa (talk) 16:08, 29 April 2013 (UTC)
I can implement that.  Hazard-SJ  ✈  02:25, 30 April 2013 (UTC)
  • Symbol support vote.svg  Support I want to make it clear that I support the proposal in its current form, before I start talking about additional features :) One thing which SieBot doesn't do (and which I think wouldn't be difficult to implement) is leave edit summaries for category moves. {{move cat}} has a reason parameter which basically goes unused, as SieBot operates apparently without purpose –⁠moogsi (talk) 19:35, 12 May 2013 (UTC)

If nobody has further objections, I propose that we approve this request. I expect that there will be some teething issues, but am confident that the bot operator is capable and will be sufficiently responsive to resolve them. --99of9 (talk) 13:32, 14 May 2013 (UTC) Approved --99of9 (talk) 14:59, 30 May 2013 (UTC)