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

User:CommonsDelinker/commands is a protected page that SieBot and CommonsDelinker read periodically to retrieve and perform the tasks indicated there. If you are not a sysop, you can add your requests here or ask any of the many sysops you may see in recent changes to edit the page with your request. Sysops can edit the commands page directly.


  1. Commands must always be protected. We don't want to give just anyone the power to control the bot.
  2. You must be sure about what you're doing before you edit Commands.
  3. Indicate the desired changes only as described here. Do not try to get something done by "tricking" the bot.
  4. Commands doesn't need to look pretty, it doesn't matter in the least bit.
  5. Put one command per line.

Controlling SieBot[edit]

Available commands[edit]

Rename a category[edit]

To rename (move) a category to another, use the template {{move cat|cat1|cat2}}. Do not include the namespace here. To move Category:Foo to Category:Bar, for example, you would put {{move cat|Foo|Bar}}:

Rename Category:Foo to Category:Bar (221 entries moved, 0 to go)

When the destination category does not exist, it is created first with a copy of the source category. If the destination category does exist, only the items belonging to the source category are moved. Note: Do not forget to add {{category redirect}} to the initial category.

To orphan an image[edit]

To orphan an image on Commons, use {{orphan|Name of the image}}. If you wanted to orphan, for example, Image:Spain flag 300.png you would use {{orphan|Spain flag 300.png}}, which gives:

Orphan File:Spain flag 300.png on Commons.

Note that the bot will only edit pages in the namespaces "Category", "Template", and "0" (mainspace) and that it is impossible for this to be 100% accurate, but it's close.

To replace one image with another[edit]

To replace one image with another, use {{replace image|Name of the image you want to replace|Name of the new image}}:
{{replace image|Spain flag 300.png|Flag of Spain.svg}}

Replace File:Spain flag 300.png with File:Flag of Spain.svg on Commons. Replace Spain flag 300.png w/ Flag of Spain.svg

To insert a fixed text into all the pages in a category[edit]

Note This didn't work.

This is especially useful for inserting templates, but it can also be used for other things. This function is not called with templates like the others because that would confuse the bot. Instead, we use tags something like HTML. They are the following:

  • <fixed text>, </fixed text> - To initiate and conclude the commmand.
  • <cat>, </cat> - To define the category in which to work.
  • <text>, </text> - To define the text to insert in the pages.

If we put, for example: <fixed text><cat>New York</cat><text>Hello, world!</text></fixed text> in /commands, the bot will edit all the pages in Category:New York to insert "Hello, world".


  • This function may have some bugs. It's handy to have a sysop around to block if the bot goes crazy.
  • The bot will insert the text right between the article text (if there is any) and the interwikis and categories.

To send a message to many people[edit]

For the bot to leave a certain message on a number of people's talk pages, use:



  • message is the name of the page where your message is located and
  • list is the name of the page where there is a list of the users you want to send it to;
  • message and list should not be in brackets ([[*]]).
  • The names in the list page should also be "raw", with no links, that is one user name (without any "User:" or "Talk:" prefix) per line.
  • The referenced message page should include your signature after your message, as SieBot will not be signing the message.

An example follows:

{{bulletin|User:CommonsDelinker/commands/message (example)|User:CommonsDelinker/commands/list (example)}}
Leave this message to all of the people listed at User:CommonsDelinker/commands/list (example).Send User:CommonsDelinker/commands/message (example) to User:CommonsDelinker/commands/list (example)

Categorize uncategorized images[edit]

To have the bot categorize all images in a category use {{Catuncat|source category|destination category}}. This is intended to be used in mass image uploads like Commons:Bundesarchiv or Commons:Deutsche Fotothek where images have temporary categories to ease the whole categorization process. The bot will work on all files in a category. If the file contains {{Uncategorized}} (or one of the variations like {{Uncategorized-BArch}} or {{Uncategorized-Fotothek}}), it will be replaced with the destination category. For example if you want to add Category:Dresden to all uncategorized images in Category:Images from the Deutsche Fotothek, location Dresden add {{Catuncat|Images from the Deutsche Fotothek, location Dresden|Dresden}} to User:CommonsDelinker/commands. This will give:

Add Category:Dresden to all uncategorized files in Category:Images from the Deutsche Fotothek, location Dresden.

Categorize uncategorized in Images from the Deutsche Fotothek, location Dresden to Dresden

Controlling CommonsDelinker (Universal image replacements)[edit]

To replace one image with another across all Wikimedia projects, use the template {{universal replace}} with three parameters. The first parameter should be the name of the old image (the image that is to be replaced), the second parameter should be the name of the new image (the image with which the old image will be replaced), the third the reason for replacing the image.

Thus, to replace Image:Foo.jpg with Image:Bar.jpg because it is a duplicate, we place in /commands:

{{universal replace|Foo.jpg|Bar.jpg|reason=duplicates}}
CommonsDelinker: Replace File:Foo.jpg with File:Bar.jpg across all Wikimedia projects. Reason: duplicates

Note: To avoid World War III, if the new image is svg and the original is not, CommonsDelinker will ignore the command.

New ideas, improvements, comments, problems, etc.[edit]

Don't hesitate to contact Siebrand or Bryan to ask a question, make a comment, propose a new idea/function, or to complain about a mistake the Bot made. If you want to request a feature or want to report a problem with the program code for CommonsDelinker, you may do this at the JIRA Issue tracker.