Difference between revisions of "Template:Cascite/doc"

From blackwiki
Jump to navigation Jump to search
imported>Matma Rex
(avoid transcluding <templatedata> into Template:Navbox Chembox, it ends up overriding real TemplateData for other templates that transclude that navbox in their documentation (phab:T220930))
imported>SMcCandlish
m (bypass redir)
 
(3 intermediate revisions by one other user not shown)
Line 6: Line 6:
  
 
For example, when parameter {{para|CASNo}} is changed in the article, the bot sets {{para|CASNo_Ref|<nowiki>{{cascite|changed|??}}</nowiki>}} initially. See [[WP:WikiProject Chemicals/Chembox validation]].
 
For example, when parameter {{para|CASNo}} is changed in the article, the bot sets {{para|CASNo_Ref|<nowiki>{{cascite|changed|??}}</nowiki>}} initially. See [[WP:WikiProject Chemicals/Chembox validation]].
 
+
{{Chembox/doc/settable}}
{| class="wikitable sortable" style="backgroud:#aaa; width:100%;"
 
|+ Bot-set templates in {{tl|Chembox}} and {{tl|Drugbox}}
 
! template !! Verified&nbsp;fields (parameter) !! Category 'changed' !! default<br/>source !! {{tlf|Chembox}}<br/>conforms !! {{tlf|Drugbox}}<br />conforms
 
|-
 
!&nbsp;
 
!
 
!
 
!
 
!
 
!
 
|-
 
| {{tl|cascite}} || {{para|CASNo}}<br/>{{para|CAS_number}} || [[:Category:Articles with changed CASNo identifier|changed CAS number]] || CAS
 
| {{tick|12}} || {{tick|12}}
 
|-
 
| {{tl|ebicite}} || {{para|ChEBI}}, {{para|ChEMBL}} || [[:Category:Articles with changed EBI identifier|changed EBI identifier]] || EBI
 
| {{tick|12}} || {{tick|12}}
 
|-
 
| {{tl|chemspidercite}} || {{para|ChemSpiderID}} || [[:Category:Articles with changed ChemSpider identifier|changed ChemSpider identifier]] || ChemSpider
 
| {{tick|12}} || {{tick|12}}
 
|-
 
| {{tl|drugbankcite}} || {{para|DrugBank}} || [[:Category:Articles with changed DrugBank identifier|changed DrugBank identifier]] || DrugBank
 
| {{tick|12}} || {{tick|12}}
 
|-
 
| {{tl|keggcite}} || {{para|KEGG}} || [[:Category:Articles with changed KEGG identifier|changed KEGG identifier]] || KEGG
 
| {{tick|12}} || {{tick|12}}
 
|-
 
| {{tl|stdinchicite}} || {{para|StdInChI}}, {{para|StdInChIKey}},<br/>{{para|InChIKey}}, {{para|InChI}} || [[:Category:Articles with changed InChI identifier|changed InChI identifier]] || ChemSpider
 
| {{tick|12}} || {{tick|12}}
 
|-
 
| {{tl|fdacite}} || {{para|UNII}} || [[:Category:Articles with changed FDA identifier|changed FDA identifier]] || FDA
 
| {{tick|12}} || {{tick|12}}
 
|-
 
| {{tl|chemboximage}} || {{para|ImageFile[L/R]}} || [[:Category:Articles with changed Chembox image|changed Chembox image file]] || ''(none)''
 
| {{nay|12}} || N/A
 
|-
 
| <nowiki>{{drugboximage}}</nowiki>
 
|colspan=2 | ''not existing, not used'' || ''(none)''
 
| N/A || {{nay|12}}
 
|}
 
 
 
 
;Added by the bot (<code>_Ref=cite</code> templates)
 
;Added by the bot (<code>_Ref=cite</code> templates)
 
The bot-template is added as input for a purpose-added parameter:
 
The bot-template is added as input for a purpose-added parameter:
Line 59: Line 19:
  
 
;Data 'correct' or 'changed' (parameter #1)
 
;Data 'correct' or 'changed' (parameter #1)
The first parameter is either <code>correct</code>&nbsp;<sup>{{tick|7}}</sup> or <code>changed</code>&nbsp;<sup>{{cross|7}}</sup> always: {{tlx|cascite|correct|CAS}}. Cross-marked articles are categorized as 'changed'. With any other text like <code>monkey</code> <sup>{{cross|7}}</sup>, again the cross is shown and the article is categorized, now sorted under "?".
+
The first parameter is either <code>correct</code>&nbsp;<sup>{{tick|7}}</sup> or <code>changed</code>&nbsp;<sup>{{xmark|7}}</sup> always: {{tlx|cascite|correct|CAS}}. Cross-marked articles are categorized as 'changed'. With any other text like <code>monkey</code> <sup>{{xmark|7}}</sup>, again the cross is shown and the article is categorized, now sorted under "?".
  
 
;Correct by source (parameter #2)
 
;Correct by source (parameter #2)
Line 71: Line 31:
 
* {{tlf|chemboximage}} is applied by the bot, but not read by the template (article won't show up in the category).
 
* {{tlf|chemboximage}} is applied by the bot, but not read by the template (article won't show up in the category).
  
{{#ifeq:{{PAGENAME}}|Cascite|
 
 
==TemplateData==
 
==TemplateData==
 
{{TemplateData header}}
 
{{TemplateData header}}
Line 95: Line 54:
 
</templatedata>
 
</templatedata>
 
{{collapse bottom}}
 
{{collapse bottom}}
}}
 
  
 
==See also==
 
==See also==
Line 106: Line 64:
 
* {{tl|Infobox drug}}
 
* {{tl|Infobox drug}}
  
<includeonly>{{template other|{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{template other|{{Sandbox other||
 
[[Category:Templates used by CheMoBot]]
 
[[Category:Templates used by CheMoBot]]
 
[[Category:Specific-source templates]]
 
[[Category:Specific-source templates]]
 
}}}}</includeonly>
 
}}}}</includeonly>

Latest revision as of 11:44, 14 November 2020

By {{Chembox}} and {{Drugbox}} settings, a bot checks articles for parameter validation. The bot then adds and sets templates like {{cascite}} to the article. Depending on the template settings, articles are categorized for maintenance.

Usage

A template is added and set by User:CheMoBot automatically after certain edits. Depending on the earlier data checks, the template will be marked "correct" or "changed" (i.e., to be checked). 'changed' articles are categorized.

For example, when parameter |CASNo= is changed in the article, the bot sets |CASNo_Ref={{cascite|changed|??}} initially. See WP:WikiProject Chemicals/Chembox validation.

Bot-set templates in {{Chembox}} and {{Drugbox}}
template Verified fields (parameter) Category 'changed' default
source
{{Chembox}}
conforms
{{Drugbox}}
conforms
 
{{cascite}} |CASNo=
|CAS_number=
changed CAS number CAS ☑Y ☑Y
{{ebicite}} |ChEBI=, |ChEMBL= changed EBI identifier EBI ☑Y ☑Y
{{chemspidercite}} |ChemSpiderID= changed ChemSpider identifier ChemSpider ☑Y ☑Y
{{drugbankcite}} |DrugBank= changed DrugBank identifier DrugBank ☑Y ☑Y
{{keggcite}} |KEGG= changed KEGG identifier KEGG ☑Y ☑Y
{{stdinchicite}} |StdInChI=, |StdInChIKey=,
|InChIKey=, |InChI=
changed InChI identifier ChemSpider ☑Y ☑Y
{{fdacite}} |UNII= changed FDA identifier FDA ☑Y ☑Y
{{chemboximage}} |ImageFile[L/R]= changed Chembox image file (none) Red XN N/A
{{drugboximage}} not existing, not used (none) N/A Red XN
Added by the bot (_Ref=cite templates)

The bot-template is added as input for a purpose-added parameter:

|CASNo=1234-56-7 (editors input)
|CASNo_Ref={{cascite|...|...}} (bot parameter added + template set)

Initially the parameters are set {{cascite|changed|??}}

The primary parameter can have an index (see its documentation):

|CASNo3=1234-56-7
|CASNo3_Ref={{cascite|...|...}}

Indexed parameters like |CASNo1= and |CASNo2= are verified too, and are treated independently. So an article can have: |CASNo={{cascite|correct|CAS}} and |CASNo3={{cascite|changed}}.

Data 'correct' or 'changed' (parameter #1)

The first parameter is either correct ☑Y or changed Template:Xmark always: {{cascite|correct|CAS}}. Cross-marked articles are categorized as 'changed'. With any other text like monkey Template:Xmark, again the cross is shown and the article is categorized, now sorted under "?".

Correct by source (parameter #2)

Initially, the bot sets this to |?? (='source unknown'). Parameter #2 has the source that confirms the statement. By confirmation, the parameter can mention the confirming source. When that source is not the standard (as listed above), the input source is mentioned in a superscript linked:

|CASNo_Ref={{cascite|correct|CDC85}} → 1234-56-7 ☑Y[CDC85]

This source name is case-insensitive: CAS=cas.

Known issues (February 2015)
  • {{chemboximage}} is applied by the bot, but not read by the template (article won't show up in the category).

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Cascite

Extended content

Gives details of source verification, automatically generated by CheMoBot, should not be edited manually.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Either 'correct' or 'changed'

Stringrequired
22

Source used to verify reference or ?? for no source

Default
??
Stringrequired

See also

{{Chembox}}