Commons:MediaMoveBot

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note BetacommandBot is NOT active - renames are handled by admins.

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]
  1. The bot should be written in pywikipediabot (python)
  2. 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:

  1. Re-upload media files that have been tagged for renaming with {{rename media|target name}} by an approved user
  2. Tag the source file of successfully re-uploaded with {{bad name|target name}}
  3. 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}}
  4. 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]
  1. 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.
  2. 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.

Categories

[edit]

Categories involved in the rename process by bot.