Difference between revisions of "Template:File category check/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(Created page with " {{#ask: File:+ Modification date::+ | limit = 500 | template = File category check | link = none | searchlabel = | named args = yes | ? = file | sort = Category,...")
 
(updated modification date)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
== Explanation ==
 +
Files should always be in at least one of [[:Category:Images]], [[:Category:Videos]] or [[:Category:Sounds]]. Usually [[Special:UncategorizedFiles]] should be sufficient to detect them but templates like [[Template:Biotech]] add the files to other kinds of categories. To files that are categorized but lack a file category an inline query isn't enough, but can be done in combination with this template.
  
 
+
== Code ==
{{#ask: [[File:+]] [[Modification date::+]]
+
The following can be used to systematically scan all files in badges of 500 (upper limit):
  | limit = 500 | template = File category check | link = none | searchlabel =
+
<pre>
 +
{{#ask: [[File:+]] [[Modification date::>10 February 2024 20:30:50]]
 +
  | limit = 500 | format = template | template = File category check | link = none
 
  | named args = yes
 
  | named args = yes
 
  | ? = file
 
  | ? = file
  | sort = Category, Modification date | order = ascending
+
  | ?Category = Category
 +
| ?Modification date = Date
 +
| sort = Modification date
 
  | offset = 0
 
  | offset = 0
 
}}
 
}}
  
{{#ask: [[File:+]] [[Modification date::+]]
+
The last checked file has a ''Modification date'' of: {{#var:date}}
| limit = 500 | template = File category check | link = none | searchlabel =
+
</pre>
| named args = yes
 
| ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 500
 
}}
 
  
{{#ask: [[File:+]] [[Modification date::+]]
 
| limit = 500 | template = File category check | link = none | searchlabel =
 
| named args = yes
 
| ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 1000
 
}}
 
  
{{#ask: [[File:+]] [[Modification date::+]]
+
== Output ==
| limit = 500 | template = File category check | link = none | searchlabel =
+
If there are no files below this text, there are no files that are not in a file category.
| named args = yes
 
| ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 1500
 
}}
 
  
{{#ask: [[File:+]] [[Modification date::+]]
+
{{#ask: [[File:+]] [[Modification date::>10 February 2024 20:30:50]]
  | limit = 500 | template = File category check | link = none | searchlabel =
+
  | limit = 500 | format = template | template = File category check | link = none
 
  | named args = yes
 
  | named args = yes
 
  | ? = file
 
  | ? = file
  | sort = Category, Modification date | order = ascending
+
  | ?Category = Category
| offset = 2000
+
  | ?Modification date = Date
}}
+
  | sort = Modification date
 
+
  | offset = 0
{{#ask: [[File:+]] [[Modification date::+]]
 
| limit = 500 | template = File category check | link = none | searchlabel =
 
| named args = yes
 
  | ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 2500
 
}}
 
 
 
{{#ask: [[File:+]] [[Modification date::+]]
 
| limit = 500 | template = File category check | link = none | searchlabel =
 
| named args = yes
 
| ? = file
 
  | sort = Category, Modification date | order = ascending
 
  | offset = 3000
 
 
}}
 
}}
  
{{#ask: [[File:+]] [[Modification date::+]]
+
The last checked file has a ''Modification date'' of: {{#var:date}} {{#ifeq: {{#var:date}} | {{#show: {{#ask: [[File:+]] [[Modification date::+]] | limit = 1 | link = none | searchlabel = | sort = Modification date | order = descending }} | ?Modification date }} | Which is the date of the most recent edit. {{Check}} | There are still more to go. {{Cross}} }}
| limit = 500 | template = File category check | link = none | searchlabel =
 
| named args = yes
 
| ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 3500
 
}}
 
 
 
{{#ask: [[File:+]] [[Modification date::+]]
 
| limit = 500 | template = File category check | link = none | searchlabel =
 
| named args = yes
 
| ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 4000
 
}}
 
 
 
{{#ask: [[File:+]] [[Modification date::+]]
 
| limit = 500 | template = File category check | link = none | searchlabel =
 
| named args = yes
 
| ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 4500
 
}}
 
 
 
{{#ask: [[File:+]] [[Modification date::+]]
 
| limit = 500 | template = File category check | link = none | searchlabel =
 
| named args = yes
 
| ? = file
 
| sort = Category, Modification date | order = ascending
 
| offset = 5000
 
}}
 
  
<includeonly>[[Category:Templates]]</includeonly>
+
<includeonly>[[Category:Wiki maintenance]] [[Category:Templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 09:52, 5 April 2024

Explanation[edit]

Files should always be in at least one of Category:Images, Category:Videos or Category:Sounds. Usually Special:UncategorizedFiles should be sufficient to detect them but templates like Template:Biotech add the files to other kinds of categories. To files that are categorized but lack a file category an inline query isn't enough, but can be done in combination with this template.

Code[edit]

The following can be used to systematically scan all files in badges of 500 (upper limit):

{{#ask: [[File:+]] [[Modification date::>10 February 2024 20:30:50]]
 | limit = 500 | format = template | template = File category check | link = none
 | named args = yes
 | ? = file
 | ?Category = Category
 | ?Modification date = Date
 | sort = Modification date
 | offset = 0
}}

The last checked file has a ''Modification date'' of: {{#var:date}}


Output[edit]

If there are no files below this text, there are no files that are not in a file category.

SampleBuilding2x2.png Corrupted obeliskwiki.png Shard a.png Shard b.png Shard c.png Void structure b.png Disruptor flare.png Clipboard north.png AtmosphericHeater a.png Shard inhibitor.png Nociosphere center.png Electricinhibitor west.png CocoonMegascarabA.png CocoonMegascarabB.png CocoonMegascarabC.png CocoonMegaspiderA.png CocoonMegaspiderB.png CocoonMegaspiderC.png CocoonSpelopedeA.png CocoonSpelopedeB.png CocoonSpelopedeC.png Deadlife shell a.png Deadlife shell b.png Deadlife shell c.png Landed deadlife shell.png RevenantSpine.png Fingerspike.png Trispike.png Bulbfreak.png Toughspike.png 

The last checked file has a Modification date of: 6 May 2024 10:33:12 Which is the date of the most recent edit. Check.png