Tardis:CosmeticBot: Difference between revisions
(Created page with "{{mosnav|p=Bots|c=Bots}} {{moss|CodeBot is a bot that makes tiny, cosmetic changes to the code of each page. It's run often to ensure that certain elements of page formatting...") |
m (Protected "Tardis:CosmeticBot": Robot: Protecting all pages from category Policies ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{mosnav|p=Bots|c=Bots}} | {{mosnav|p=Bots|c=Bots}} | ||
{{moss| | {{moss|One of our bots makes a number of tiny, cosmetic changes to the code of each page. It's run often to ensure that certain elements of page formatting are all done the same way. This then helps other bots more reliably make more substantive changes.}} | ||
{{sc|T:CLEAN CODE|T:CBOT}} | {{sc|T:CLEAN CODE|T:CBOT}} | ||
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. But it will | 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 [[T:HEAD|section head]] has a spaces around the name or not. These two things produce the same effect for the reader: | |||
{|class=wikitable | |||
|<pre> | |||
== Section head ==</pre> | |||
|<pre> | |||
==Section head== | |||
</pre> | |||
|} | |||
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 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 following a full stop, which isn't required, but is allowed by [[T: | |||
* the placement of exactly one space between a symbol which creates a list (i.e., * and #) and the following text | * 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:''' | * consistent capitalisation of namespaces, such that — for instance — '''file:''' becomes '''File:''' | ||
* the elimination of some redundant [[pipe trick]]s — <nowiki>[[Human|human]] would become simply [[human]], for instance</nowiki> | * the elimination of some redundant [[pipe trick]]s — <nowiki>[[Human|human]] would become simply [[human]], for instance</nowiki> |
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