Forum:Request for approval: ImageRenamerBot
Right, so Forum:Call for testing: ImageRenamerBot was a bit of a rocky ride. But with a few single-image edits, I think the bot is mostly working now.
This is a bot to perform large amounts of image moves at once, with reference updating on all pages.
- The bot is a pure request-page bot, working with a configuration file a bit like User:PNGOptimisationBot. Requests are of the form
*File:Source.ext|File:Target.extto move the file, or
*File:Source.ext|File:Target.ext|OnlyPagesto only replace uses of the image in pages (for completing a move that was already done).
- The bot's requests can optionally move an image, but in all cases, they update references to a file's old name so that they point to its new one. To do this, the bot uses the API Get Image Usage and Get Backlinks to Page, then the usual Edit API.
- If the bot cannot move an image for whatever reason, it will place a message on the requester's talk page telling him or her about the error.
- If the bot cannot replace a use of an image on a page, it will try 2 times to do so, in case the use is actually on a template. If it still fails, it will place a message on Project:Administrator requests asking to investigate references on protected pages and glitches.
- Moves are marked as bot-made, and do not leave redirects behind.
- User talk page messages (reporting errors and successes of image moves, ignoring the reference replacements) are marked as minor and bot-made, so that they don't needlessly send e-mails to users.
- Only custodians should be allowed to post requests to the page. That means that the request page should be protected from editing by non-custodians via Special:Abusefilter.
- The bot would need the custodian right to move images. In my tests, I used my own account to perform the moves, with the bot updating references only (i.e. with |OnlyPages).
Rationale for testing on this wiki
I tested edits on the RuneScape Wiki itself because [[w:c:joeytje50:|Joey's wiki]] does not have the same content that the RuneScape Wiki does, including templates that transclude other templates, lots of images, and lots of articles to use the images and templates. These details are quite important to get right.
I was a responsible bot owner, however, and only made 2 single-image moves with reference replacement, checking Special:Contributions/A proofbot after each of them.
- Image renaming contributions for A proofbot
- It posting about 2 uses of an image it couldn't replace
- An attempt to explain the glitch
- File:Arcane stream necklace.png (previously File:Arcane Stream Necklace.png)
- File:Coordinate clue 08.03N 31.16E.png (previously File:Coordinate clue 08.05N 31.16E.png)
08:08, January 30, 2012 (UTC)
Support - Took a quick look through its history, and I'm very impressed with everything it can do. If it can run smoothly and safely, I think this could be a fantastic asset for us. I think you have a fantastic amount of potential here. Ronan Talk 18:15, January 30, 2012 (UTC)
Support - Seems to do it's job, can't really complain. RSDaftVader 21:46, January 30, 2012 (UTC)
Support- Yes. Yes indeed. Hair 21:54, January 30, 2012 (UTC)
Support - But if the edits to user talk pages is minor and bot marked, it doesn't leave a new message notification for the user (unless I misunderstood something) and that might lead to a large period of time before the user notices the message. 21:56, January 30, 2012 (UTC)
Question to all - Would an image move notification be important enough for a user to get an email about it? I actually thought about the minor and bot markings and figured a user would either not care, or have at least some of the files or referencing pages watchlisted. In the latter case, the user would get emails during the operation. What do you guys think?
22:10, January 30, 2012 (UTC)
- Could you make it optional to get a message when the bot finished the task, so that people can disable it when they don't want a new message for it? JOEYTJE50TALK pull my finger 12:42, January 31, 2012 (UTC)
- Sure; it could work as something to add to the edit summary to avoid getting a talk page message or something like that. With the code as it stands, that'd be an easy thing to add. 14:09, January 31, 2012 (UTC)
- The day robots can totally replace machines is the start of Judgement day. Until we get terminator bots running wild. The bot is request only, with only custodians being able to request it. It's meant mostly for cleaning up the dozens of red links that populate file moves. Hofmic Talk 14:13, February 2, 2012 (UTC)
- Like Hofmic said, it's more of a reference updating bot, because moving files to their correct names without redirections leaves lots of red links behind. Redirects are easy for pages in most namespaces, but for images it complicates re-uploads.
- The bot is also meant to save lots of time implementing Forum:Filenames, which needs to be applied to thousands of files at this time. In the future, there would be less of a need to move files, with a few more users uploading files to their correct names by example (there would be more files with correct names). Those new files can be individually dealt with by custodians. Their references on pages can be updated by custodians if there are few, or by this bot if there are many.
- In summary, it's just a helper. 17:15, February 2, 2012 (UTC)