Tardis:CosmeticBot: Difference between revisions
No edit summary |
m (Protected "Tardis:CosmeticBot": Robot: Protecting all pages from category Policies ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
(No difference)
|
Latest revision as of 00:31, 11 May 2017
SpellBot → JIMBO → How do I get a bot? → CosmeticBot |
From time to time, a bot shall execute a script whose sole function is to clean up the code. It shall run on every page in the main namespace, as well as several other namespaces. This script will in no way change the way that a page appears to the reader. But it will slightly change the way the code appears to the editor, and most importantly, to other bots.
For instance, it doesn't matter to the reader whether a section head has a spaces around the name or not. These two things produce the same effect for the reader:
== Section head == |
==Section head== |
CosmeticBot makes the arbitrary decision to change all of them to the style on the left. This then means that other bots know that there will be exactly one space between the equals signs and the name of the section — something that saves a lot of time with bot coding. It's for this reason that another of our policies, T:HEAD, requires the insertion of a leading and trailing space in section heads.
Amongst the other trivial-but-important tasks CosmeticBot tackles are:
- the removal of extraneous spaces, per T:SPACING
- the placement of exactly one space following a full stop, which isn't required, but is allowed by T:SENT SPACE
- the placement of exactly one space between a symbol which creates a list (i.e., * and #) and the following text
- consistent capitalisation of namespaces, such that — for instance — file: becomes File:
- the elimination of some redundant pipe tricks — [[Human|human]] would become simply [[human]], for instance