Difference between revisions of "Help:Unknown Entities Pages"
Line 17: | Line 17: | ||
=Feedback:19.01.2022= | =Feedback:19.01.2022= | ||
* proceed with other entities? | * proceed with other entities? | ||
+ | ** yes | ||
* where to locate the "Unknown entity creation" interface? | * where to locate the "Unknown entity creation" interface? | ||
+ | ** In forms | ||
+ | ** ?redlink that invokes a template | ||
+ | ** ?open in new tab - | ||
* where to locate the existing "Unknown entity" query table? | * where to locate the existing "Unknown entity" query table? | ||
+ | ** leading to a new page | ||
+ | ** frontpage | ||
+ | ** sidebar | ||
+ | |||
Revision as of 16:24, 19 January 2022
Used extensions:
Used Templates:
Covered categories:
- Category:Deployments - DONE
- Category:Dataset - TODO
- Category:Events - TODO
- Category:Institution - TODO
- Category:Person - TODO
- Category:Technology - TODO
Feedback:19.01.2022[ ]
- proceed with other entities?
- yes
- where to locate the "Unknown entity creation" interface?
- In forms
- ?redlink that invokes a template
- ?open in new tab -
- where to locate the existing "Unknown entity" query table?
- leading to a new page
- frontpage
- sidebar
TODO:[ ]
Auto annotation with "Is unknown" property[ ]
Using the Property:Is unknown (bool)
Add the following snippet to the Templates, in order to mark page with
- Is unknown = true - in pages titles, that start with "Unknown"
- Is unknown = false - all other pages
{{#set: Is unknown={{#ifeq: {{#explode:{{PAGENAME}}| |0}}|Unknown|true|false}} }}
Done only for Category:Deployments
Page name convention[ ]
Unknow_category_NNNN
ie Unknown_Deployments_0000, Unknown_Deployments_0001
Interface[ ]
Template:Create Unknown Entity
Invoked with {{Create Unknown Entity|CATEGORY NAME}} ie. {{Create Unknown Entity|Deployments}}
results in: Template:Create Unknown Entity
New Unknown Person:
Template:Create Unknown Entity - TODO: change button text
All Unknown Entities[ ]
Process: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_Deployment*]] |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_Deployment*]]|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_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}}
- output: 0005
- function:
- add 1 to int Extension:ParserFunctions##expr
{{#expr: 1 + {{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}} }}
- output: 6
- pad with zeros: Magic_words#Formatting padleft
{{padleft:{{#expr: 1 + {{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}}}}|4|0}}
- output: 0006
Create Page & last unknown entity[ ]
{{#createpage: |Unknown_Deployment_{{padleft:{{#expr: 1 + {{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}}}}|4|0}} |Create Unknown Deployment |Template:Deployments }}
{{#createpage: |Unknown_Deployment_0006 |Create Unknown Deployment |Template:Deployments }}
Default value: when no results are returned[ ]
use Extension:ParserFunctions##if to assign a default value: "000" if the results of the query are None, else return the last item from the query
Example: True
{{#if: {{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist}}|{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|000}}
Unknown Deployments 0005
Example: False
{{#if: {{#ask:[[Category:XYZ]][[~*Unknown_Deployment*]]|format=plainlist}}|{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|000}}
000