Commons:MediaMoveBot
This is a functional specification for a pywikipediabot. Betacommand is working on it.
Introduction
[edit]Wikimedia Commons is all about media. To find media, meta data has to be added. Media names are a very important part of the meta data. One of the problems with media names is that they cannot be changed once a media file has been uploaded. Media have to be re-uploaded and all information should be retained. After a rename, the source media file should be tagged as having a bad name, so that all links to it can be changed to the new name. Once the source media file has been orphaned, it can be deleted.
A bot will make this process run a lot smoother. Once a approved user has tagged a media file for rename, the bot will process the request, and if it has successfully re-uploaded the media file, tag the old image.
Usage
[edit]Approved user have to paste {{rename|New name.ext}} on the file page.
Functional specifications
[edit]General
[edit]- The bot should be written in pywikipediabot (python)
- The bot should be licensed with the same license as pywikipediabot (MIT) so it can be added to the bot framework
Workings
[edit]The bot has the following tasks:
- Re-upload media files that have been tagged for renaming with {{rename media|target name}} by an approved user
- Tag the source file of successfully re-uploaded with {{bad name|target name}}
- Tag media files that have been tagged for renaming with {{rename media|target name}} by a non-approved user with {{rename media request|target name}}
- Tag media files that have been tagged for renaming with {{rename media|target name}} where "target name" is missing or of an incorrect type with {{rename media failed|target name}}
Conditions
[edit]- For actual renaming to be performed, a Commons administrator must have made the last edit to the media description page in the namespace File. This is to prevent that a vandal can perform a rename without checking.
- A approved user list at Commons:MediaMoveBot/CheckPage should be supported. This is a bulleted list containing a specified link to a user page.
Templates
[edit]Templates involved in the rename process by bot.
- {{Rename}}: request a rename (has several redirects: {{Rename media}}, {{Rename image}}), {{ImageRename}}). Will categorise into Category:Media requiring renaming if a new name is given, into Category:Media renaming requests if the template has been filled out incorrectly.
- {{Bad name}}: signals that another file is an exact duplicate and that this one can be deleted after a {{Universal replace}}. Tag used after the image has been uploaded under a new name. Placed into Category:Duplicate to be processed with CommonsDupes.
- {{Rename media request}}: signals that the rename request could not be processed by the bot because it was made by a non-approved user, or because an incorrect target name was provided, or because no target name was provided. Manual review needed by a approved user, so placed in Category:Media renaming requests.
- {{Rename media failed}}: signals that the rename request could not be processed because the target already existed. Manual review needed by a approved user, so placed in Category:Media renaming requests.
Categories
[edit]Categories involved in the rename process by bot.
- Category:Media requiring renaming: contains objects transcluding {{Rename}}. These will be processed by bot.
- Category:Media renaming requests: contains objects transcluding {{Rename media request}}, and {{Rename media failed}}. These require manual processing by approved user.