Difference between revisions of "Template:Infobox Wikipedia bot/doc"

From blackwiki
Jump to navigation Jump to search
imported>Andy M. Wang
(close nowiki)
imported>WOSlinker
m (change source to syntaxhighlight)
 
(7 intermediate revisions by 5 users not shown)
Line 10: Line 10:
 
| image        =
 
| image        =
 
| caption      =  
 
| caption      =  
 +
| status      =
 
| operator    =  
 
| operator    =  
 
| author      =  
 
| author      =  
Line 25: Line 26:
 
| other        =
 
| other        =
 
| nocat        =
 
| nocat        =
| brfa
+
| brfa         =
 +
| active      =
 
}}
 
}}
 
</pre>
 
</pre>
 
|}
 
|}
Values for lang_cat are [[:Category:Wikipedia bots with C++ source code published|C++]], [[:Category:Wikipedia bots with Python source code published|Python]], [[:Category:Wikipedia bots with Perl source code published|Perl]], [[:Category:Wikipedia bots with Java source code published|Java]], [[:Category:Wikipedia bots with PHP source code published|PHP]], and [[:Category:Wikipedia bots with C# source code published|C#]].
+
Values for lang_cat are [[:Category:Wikipedia bots with AutoWikiBrowser source code published|AWB]], [[:Category:Wikipedia bots with C Sharp source code published|C Sharp]], [[:Category:Wikipedia bots with Java source code published|Java]], [[:Category:Wikipedia bots with Javascript source code published|Javascript]], [[:Category:Wikipedia bots with Perl source code published|Perl]], [[:Category:Wikipedia bots with PHP source code published|PHP]], [[:Category:Wikipedia bots with Python source code published|Python]], and [[:Category:Wikipedia bots with Ruby source code published|Ruby]].
 +
 
 +
=== Status ===
 +
Setting {{para|active|yes}} will set the "Status" field to '''<span style="color:#008000">Active</span>''' and, unless {{para|nocat|yes}}, place the page into [[:Category:Active Wikipedia bots]]. Setting {{para|active|no}} will set the "Status" field to '''<span style="color:#800000">Inactive</span>''' and, unless {{para|nocat|yes}}, place the page into [[:Category:Inactive Wikipedia bots]]. Setting the {{para|status}} parameter to any value will override the automatic value in the status field.
 +
 
 +
If the bot uses a status or automatic shutoff page, you can use it to automatically categorize the bot. If the status page consists only the word "true"/"false" (or "yes"/"no"), you can use:
 +
 
 +
<code><nowiki>active={{lc:{{</nowiki>''NAME OF STATUS PAGE''<nowiki>}}}}</nowiki></code>
 +
 
 +
If it uses something other than "true"/"false" or "yes"/"no", but there are still only one possible contents of the status page when the bot is running, use:
 +
 
 +
<code><nowiki>active={{#ifeq:{{lc:{{</nowiki>''NAME OF STATUS PAGE''<nowiki>}}}}|</nowiki>''LOWER CASE TEXT IF BOT IS ACTIVE''<nowiki>|yes|no}}</nowiki></code>
 +
 
 +
If your bot has multiple lines on the status page for multiple bot tasks, and you want to display as active if any of them are running (indicated by "true" in this example), use:
 +
 
 +
<code><nowiki>active={{#iferror:{{#invoke:String|match|s={{</nowiki>''NAME OF STATUS PAGE''<nowiki>}}|pattern=</nowiki>''true''<nowiki>}}|no|yes}}</nowiki></code>
  
 
== Example ==
 
== Example ==
Line 48: Line 65:
 
|other = SkyBot 1 may later be assigned the task of delivering newsletters.
 
|other = SkyBot 1 may later be assigned the task of delivering newsletters.
 
}}
 
}}
<tt><nowiki>{{Infobox bot</nowiki><br />
+
<syntaxhighlight lang="moin">
<nowiki>|Bot name = SkyBot 1</nowiki><br />
+
{{Infobox bot
<nowiki>|image = [[File:F-105 Thunderchief underside.jpg|300px|SkyBot 1]]</nowiki><br />
+
|Bot name = SkyBot 1
<nowiki>|caption = '''SkyBot 1 at top-speed''' </nowiki><br />
+
|image = [[File:F-105 Thunderchief underside.jpg|300px|SkyBot 1]]
<nowiki>|operator = [[user:Anonymous Dissident|Anonymous Dissident]] [[User talk:Anonymous Dissident|(t)]]</nowiki><br />
+
|caption = '''SkyBot 1 at top-speed'''
<nowiki>|approval = Not yet</nowiki><br />
+
|operator = [[user:Anonymous Dissident|Anonymous Dissident]] [[User talk:Anonymous Dissident|(t)]]
<nowiki>|flag = No</nowiki><br />
+
|approval = Not yet
<nowiki>|tasks = (Will) Work at [[WP:CFD/W]], Wikiproject tagging</nowiki><br />
+
|flag = No
<nowiki>|edit rate = (Proposed) 10 per minute</nowiki><br />
+
|tasks = (Will) Work at [[WP:CFD/W]], Wikiproject tagging.
<nowiki>|period = Periodically</nowiki><br />
+
|edit rate = (Proposed) 10 per minute
<nowiki>|process = Automatic</nowiki><br />
+
|period = Periodically
<nowiki>|language = Works through [[WP:AWB|AWB]]</nowiki><br />
+
|process = Automatic
<nowiki>|Excl. comp. = yes </nowiki><ref>Note:adds bot to [[:Category:Wikipedia bots which are exclusion compliant]]</ref><br />
+
|language = Works through [[WP:AWB|AWB]]
<nowiki>|source = no </nowiki><br />
+
|Excl. comp. = yes
<nowiki>|active = yes|no </nowiki><br />
+
|source = no
<nowiki>|other = SkyBot 1 may later be assigned the task of delivering newsletters.</nowiki><br />
+
|other = SkyBot 1 may later be assigned the task of delivering newsletters.
<nowiki>|brfa = ***Not used in this example.  This parameter overrides the link to your BRFA should it be anything other than your bot's name.  This parameter is optional. ***</nowiki><br />
+
}}
<nowiki>|isbot = yes (Optional parameter.  Placing No will remove the "This user is a bot" header.)</nowiki><br />
+
</syntaxhighlight>
<nowiki>|nocat = yes (Optional parameter. Placing "yes" will not add categories. Not recommended. Might be useful for noinclude clauses when transcluding)</nowiki><br />
 
}}</tt>
 
  
 
{{Reflist}}
 
{{Reflist}}
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
[[Category:Wikipedia bot-related templates]]
 
[[Category:Wikipedia bot-related templates]]
 
+
}}</includeonly>
[[ja:Template:Infobox Bot]]
 
[[pt:Predefinição:Info/Bot]]
 
[[th:แม่แบบ:กล่องข้อมูล วิกิพีเดียบอต]]
 
[[ur:سانچہ:خانہ معلومات صارف روبہ]]
 
[[zh:Template:Infobox Bot]]
 
</includeonly>
 

Latest revision as of 10:30, 7 July 2020

Infobox

The complete infobox:

{{Infobox bot
| Bot name     = 
| image        =
| caption      = 
| status       =
| operator     = 
| author       = 
| approval     = 
| flag         = 
| tasks        = 
| edit rate    = 
| process      = 
| language     = 
| period       =
| Excl. comp.  =
| source       =
| lang_cat     =
| shutoff      =
| other        =
| nocat        =
| brfa         =
| active       =
}}

Values for lang_cat are AWB, C Sharp, Java, Javascript, Perl, PHP, Python, and Ruby.

Status

Setting |active=yes will set the "Status" field to Active and, unless |nocat=yes, place the page into Category:Active Wikipedia bots. Setting |active=no will set the "Status" field to Inactive and, unless |nocat=yes, place the page into Category:Inactive Wikipedia bots. Setting the |status= parameter to any value will override the automatic value in the status field.

If the bot uses a status or automatic shutoff page, you can use it to automatically categorize the bot. If the status page consists only the word "true"/"false" (or "yes"/"no"), you can use:

active={{lc:{{NAME OF STATUS PAGE}}}}

If it uses something other than "true"/"false" or "yes"/"no", but there are still only one possible contents of the status page when the bot is running, use:

active={{#ifeq:{{lc:{{NAME OF STATUS PAGE}}}}|LOWER CASE TEXT IF BOT IS ACTIVE|yes|no}}

If your bot has multiple lines on the status page for multiple bot tasks, and you want to display as active if any of them are running (indicated by "true" in this example), use:

active={{#iferror:{{#invoke:String|match|s={{NAME OF STATUS PAGE}}|pattern=true}}|no|yes}}

Example

SkyBot 1
This user is a bot
(talk · contribs)
SkyBot 1
SkyBot 1 at top-speed
OperatorAnonymous Dissident (t)
Approved?Not yet
Flagged?No
Task(s)(Will) Work at WP:CFD/W, Wikiproject tagging.
Edit rate(Proposed) 10 per minute
Edit period(s)Periodically
Automatic or manual?Automatic
Programming language(s)Works through AWB
Exclusion compliant?Yes
Source code published?no
Emergency shutoff-compliant?Yes
Other informationSkyBot 1 may later be assigned the task of delivering newsletters.
{{Infobox bot
|Bot name = SkyBot 1
|image = [[File:F-105 Thunderchief underside.jpg|300px|SkyBot 1]]
|caption = '''SkyBot 1 at top-speed'''
|operator = [[user:Anonymous Dissident|Anonymous Dissident]] [[User talk:Anonymous Dissident|(t)]]
|approval = Not yet
|flag = No
|tasks = (Will) Work at [[WP:CFD/W]], Wikiproject tagging.
|edit rate = (Proposed) 10 per minute
|period = Periodically
|process = Automatic
|language = Works through [[WP:AWB|AWB]]
|Excl. comp. = yes
|source = no
|other = SkyBot 1 may later be assigned the task of delivering newsletters.
}}