Difference between revisions of "Help:Unknown Entities Pages"
From Security Vision
| Line 55: | Line 55: | ||
==Parse the last Unknown_Deployment string== | ==Parse the last Unknown_Deployment string== | ||
* Start from the string: "Unknown Deployments 0001" | * Start from the string: "Unknown Deployments 0001" | ||
| − | * extract the last 4 characters of strings: use parser function <pre>{{#sub: | + | * extract the last 4 characters of strings: use parser function: |
| − | {{#ask:[[Category:Deployments]][[~*Unknown_Deployments*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}|-4}} | + | ** function: <pre>{{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployments*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}}</pre> |
| + | ** output: {{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployments*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}} | ||
* turn string to int | * turn string to int | ||
* add 1 to int | * add 1 to int | ||
* pad with zeros | * pad with zeros | ||
| + | |||
| + | {{#sub:Icecream|-3}} | ||
Revision as of 11:12, 19 January 2022
Page name convention[ ]
Unknow_category_NNNN ie Unknown_Deployments_0000, Unknown_Deployments_0001
incremental creation of unknown entity pages[ ]
Extension:Create_Page function[ ]
{{#createpage:|Your page name|button text|Template:ThaWillFillPage}}
{{#createpage:|Your page name|button text|Template:ThaWillFillPage}}
which I can see being applied as
{{#createpage:|Unknown_Deployments_NNNN|Create Unknown Deployment|Template:Deployments}}
{{#createpage:|Unknown_Deployments_NNNN|Create Unknown Deployment|Template:Deployments}}
Querying unknown entity pages[ ]
{{#ask: [[Category:Deployments]][[~*Unknown_Deployments*]]
|format=broadtable
|limit=50
|offset=0
|link=subject
|sort=
|order=asc
|headers=show
|searchlabel=... further results
|class=sortable wikitable smwtable
}}
| Unknown Deployments 0000 |
| Unknown Deployments 0001 |
| Unknown Deployments 0002 |
| Unknown Deployments 0003 |
| Unknown Deployments 0004 |
| Unknown Deployments 0005 |
last Unknown_Deployment[ ]
{{#ask:[[Category:Deployments]][[~*Unknown_Deployments*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}
Unknown Deployments 0005
Parse the last Unknown_Deployment string[ ]
- Start from the string: "Unknown Deployments 0001"
- extract the last 4 characters of strings: use parser function:
- function:
{{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployments*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}} - output: 0005
- function:
- turn string to int
- add 1 to int
- pad with zeros
eam