Difference between revisions of "Ask"
Josef.Noll (Talk | contribs) (→email list) |
Josef.Noll (Talk | contribs) (→Example) |
||
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=[[Title::Explanation of Semantic MediaWiki ask function]]= | =[[Title::Explanation of Semantic MediaWiki ask function]]= | ||
− | see also [[Test-Ask]] for invers properties | + | {{TOCright}} |
+ | see also [[Test-Ask]] for invers properties, e.g. <nowiki> [[-Has mother::Michael]] </nowiki> | ||
== help page == | == help page == | ||
Line 19: | Line 20: | ||
== Example == | == Example == | ||
− | <pre | + | <pre> |
− | {{#ask:[[Category | + | {{#ask:[[Category:User]] |
|?=search for users# | |?=search for users# | ||
|?User | |?User | ||
Line 38: | Line 39: | ||
|default=no results found | |default=no results found | ||
|class=sortable wikitable smwtable | |class=sortable wikitable smwtable | ||
− | }} | + | }}</pre> |
<!--- ask with OR connection, as used in Template:User ---> | <!--- ask with OR connection, as used in Template:User ---> | ||
− | {{#ask: [[Supervisor::{{SUBJECTPAGENAME}}]] OR [[Lecturer::{{SUBJECTPAGENAME}}]] OR | + | Ask with OR connection |
− | [[User::{{SUBJECTPAGENAME}}]] OR [[{{SUBJECTPAGENAME}}]] | + | <pre>{{#ask: [[Supervisor::{{SUBJECTPAGENAME}}]] OR [[Lecturer::{{SUBJECTPAGENAME}}]] OR |
+ | [[User::{{SUBJECTPAGENAME}}]] OR [[{{SUBJECTPAGENAME}}]]</pre> | ||
+ | |||
+ | <!--- ask with parts of string ---> | ||
+ | Ask for part of a string, e.g. all routers of type RDB52G - see example: [[RDB52G]] | ||
+ | <pre>ask# [[Model::~*RDB52G*]]</pre> | ||
ommit main label: | mainlabel=- | | ommit main label: | mainlabel=- | | ||
{{#show: Berlin | ?population }} | {{#show: Berlin | ?population }} | ||
− | + | ||
− | == Tips and Tricks == | + | |
+ | More info on formatting the output, see https://www.semantic-mediawiki.org/wiki/Help:Result_formats | ||
+ | |||
+ | == Tips and Tricks, using Set == | ||
Recommendation from [[Neill Mitchell|Neill]]: I always hide the raw page name as much as possible and use aliases so | Recommendation from [[Neill Mitchell|Neill]]: I always hide the raw page name as much as possible and use aliases so | ||
queries return more user friendly links. | queries return more user friendly links. | ||
Line 72: | Line 81: | ||
* define Page Link as a [[Special:Property]] | * define Page Link as a [[Special:Property]] | ||
+ | === Set syntax === | ||
+ | set allows for properties linked to a page, e.g. Paris. Though can't be used for changing a property on a page, only adding more properties..., e.g. has postcode=7501|has postcode=7502|has postcode=7503. ''Note: not found out how to query one of them'' | ||
+ | <pre> | ||
+ | {{#set: | ||
+ | Has population=2,229,621 | ||
+ | |Located in country=France | ||
+ | }} | ||
+ | </pre> | ||
=== email list === | === email list === | ||
− | {{#ask: [[-User.Project::IoTSec]] [[Partner:: | + | Example is taking for project IoTSec, here only science people |
+ | |||
+ | {{#ask: [[-User.Project::IoTSec]] [[Partner::UiO||Ifi||UNIK||NR||HiG||Simula||NCE Smart]] |?email= | sep =, |format=list |template=Email_list }} | ||
== Example == | == Example == | ||
ongoing projects, based on <nowiki> [[Category:Project]] [[Due_date::> {{#expr:{{#time: Y|now}}}}]] </nowiki> | ongoing projects, based on <nowiki> [[Category:Project]] [[Due_date::> {{#expr:{{#time: Y|now}}}}]] </nowiki> | ||
+ | * see example in [[Concept:Ongoing_Projects]] | ||
* CURRENTYEAR is {{CURRENTYEAR}}, CURRENTTIME is {{CURRENTTIME}}, LOCALTIME is {{LOCALTIME}} | * CURRENTYEAR is {{CURRENTYEAR}}, CURRENTTIME is {{CURRENTTIME}}, LOCALTIME is {{LOCALTIME}} | ||
− | * date: {{#formatdate:25 Februar 2016|dMY}} or "now": {{#time: d M Y|now }} | + | * date: {{#formatdate:25 Februar 2016|dMY}} or "now": {{#time: d M Y|now }}, using H:i for hours and minutes |
* see all time examples in: [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions Help:Extension:ParserFunctions] | * see all time examples in: [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions Help:Extension:ParserFunctions] | ||
=== recent pages === | === recent pages === |
Latest revision as of 09:44, 8 May 2020
Wiki for ITS | ||||||
---|---|---|---|---|---|---|
|
Explanation of Semantic MediaWiki ask function
see also Test-Ask for invers properties, e.g. [[-Has mother::Michael]]
help page
http://semantic-mediawiki.org/wiki/Help:Selecting_pages, including " ::>, ::! "
output to vcard
Warning: exports all users on this wiki ... further results
for errors, see Josef_Noll
Example
{{#ask:[[Category:User]] |?=search for users# |?User |?Date |?Title |format=broadtable |limit=5 |offset=1 |link=all |sort=User count |order=descending |headers=plain |mainlabel=search for users |intro=results |outro=done |searchlabel=… further results |default=no results found |class=sortable wikitable smwtable }}
Ask with OR connection
{{#ask: [[Supervisor::{{SUBJECTPAGENAME}}]] OR [[Lecturer::{{SUBJECTPAGENAME}}]] OR [[User::{{SUBJECTPAGENAME}}]] OR [[{{SUBJECTPAGENAME}}]]
Ask for part of a string, e.g. all routers of type RDB52G - see example: RDB52G
ask# [[Model::~*RDB52G*]]
ommit main label: | mainlabel=- |
More info on formatting the output, see https://www.semantic-mediawiki.org/wiki/Help:Result_formats
Tips and Tricks, using Set
Recommendation from Neill: I always hide the raw page name as much as possible and use aliases so queries return more user friendly links.
{{#set:Page Link=[[{{FULLPAGENAME}}|{{{Page Title|}}}]]}} where Page Title is usually a field in the form. Sometimes I prepend with a section ID {{#set:Page Link=[[{{FULLPAGENAME}}|{{{Section ID|}}}-{{{Page Title|}}}]]}}
Then in the queries I return Page Link and use mainlabel=- to suppress the raw page name field.
{{#ask: |?Page Link .. .. |mainlabel=- }}
Note:
- <section id="main"> <!-- main page content goes in here --> </section>
- define Page Link as a Special:Property
Set syntax
set allows for properties linked to a page, e.g. Paris. Though can't be used for changing a property on a page, only adding more properties..., e.g. has postcode=7501|has postcode=7502|has postcode=7503. Note: not found out how to query one of them
{{#set: Has population=2,229,621 |Located in country=France }}
email list
Example is taking for project IoTSec, here only science people
Bernt A. Bremdal <bernt@xalience.com>, Christian Johansen <cristi@ifi.uio.no>, Christian Resell <chrifres@ifi.uio.no>, Danica Radovanovic <danica@basicinternet.org>, Dieter Hirdes <dieter.hirdes@ncesmart.com>, Elahe Fazeldehkordi <elahe.fazeldehkordi@its.uio.no>, Getinet Ayele Eshete <getina15@student.uia.no>, György Kálmán <gyorgy.kalman@its.uio.no>, Habtamu Abie <habtamu.abie@nr.no>, Hamed Arshad <hamedar@ifi.uio.no>, Hanne Cecilie Geirbo <hannege@ifi.uio.no>, Hans Jørgen Furre Nygårdshaug <hans.nyg@gmail.com>, Heidi Tuiskula <heidi.tuiskula@smartinnovationnorway.com>, Håkon Duus <hakondu@ncesmart.com>, Ivar Rummelhoff <Ivar.Rummelhoff@nr.no>, Jayaprakash Rajasekharan <jayaprakash.rajasekharan@ncesmart.com>, Johanna Johansen <johanna@johansenresearch.info>, Josef Noll <josef.noll@its.uio.no>, Kaniz Fatema Tuly <kftuly@yahoo.com>, Kim Jonatan Wessel Bjørneset <kjbjorne@ifi.uio.no>, Kristin Vinje <>, Linn Eirin Paulsen <rocklinn@gmail.com>, Maghsoud Morshedi <morshedi.m@gmail.com>, Maunya Doroudi Moghadam <maunyad@its.uio.no>, Ming-Chang (Leo) Lee <mingchang1109@gmail.com>, Naji Ahmed Kadah <naji87@gmail.com>, Olaf Owe <olaf@ifi.uio.no>, Ole Gabrielsen <ole.gabrielsen@ncesmart.com>, Paal Engelstad <paal.engelstad@ffi.no>, Pallavi Kaliyar <>, Peder Aursand <Peder.Aursand@nr.no>, Rabie Belahcen <rabiebelahcen@gmail.com>, Rune Winther <rune.winther@multiconsult.no>, Seraj Fayyad <serajf@ifi.uio.no>, Shukun Tokas <shukunt@ifi.uio.no>, Sigurd Eskeland <Sigurd.Eskeland@nr.no>, Stein Gjessing <stein.gjessing@ifi.uio.no>, Stian Løvold <>, Svetlana Boudko <>, Syead Nusrat Nur <syeadnn@ifi.uio.no>, Toktam Ramezanifarkhani <tk.ramezani@gmail.com>, Yan Zhang <yanzhang@simula.no>, Åsmund Skomedal <asmund.skomedal@nr.no>, Øivind Berg <oivind.berg@ncesmart.com>
Example
ongoing projects, based on [[Category:Project]] [[Due_date::> {{#expr:{{#time: Y|now}}}}]]
- see example in Concept:Ongoing_Projects
- CURRENTYEAR is 2024, CURRENTTIME is 05:13, LOCALTIME is 05:13
- date: 25 Februar 2016 or "now": 27 Sep 2024, using H:i for hours and minutes
- see all time examples in: Help:Extension:ParserFunctions
recent pages
- TEK9110 (Modification dateThis property is a special property in this wiki. 24 September 2024 15:12:51)
- Diaa Jadaan (Modification dateThis property is a special property in this wiki. 24 September 2024 14:42:40)
- Diaa.jadaan (Modification dateThis property is a special property in this wiki. 24 September 2024 14:42:31)
- Tips and strategies on how to publish research papers in reputable journals 2024/09/19 (Modification dateThis property is a special property in this wiki. 19 September 2024 13:10:12)
- File:202409 ResearchPaper AASTU Noll.pdf (Modification dateThis property is a special property in this wiki. 19 September 2024 13:10:05)
- (Modification dateThis property is a special property in this wiki. 19 September 2024 13:09:44)
- Nurture Seminar at AASTU 19Sep2024 (Modification dateThis property is a special property in this wiki. 19 September 2024 08:37:14)
- (Modification dateThis property is a special property in this wiki. 19 September 2024 08:35:51)
- Nurture Seminar Sep2024 Hawassa (Modification dateThis property is a special property in this wiki. 16 September 2024 05:07:35)
- Connecting the Future for Schools and Communities 2024/09/16 (Modification dateThis property is a special property in this wiki. 16 September 2024 04:59:47)
- ... further results
pages from 2013
- Main page (Modification dateThis property is a special property in this wiki. 21 December 2013 22:17:09)
- Oulu (Modification dateThis property is a special property in this wiki. 21 December 2013 16:34:48)
- UiO (Modification dateThis property is a special property in this wiki. 21 December 2013 16:29:05)
- UNIK (Modification dateThis property is a special property in this wiki. 20 December 2013 14:51:30)
- FreeSecEDU UiO (Modification dateThis property is a special property in this wiki. 20 December 2013 14:49:19)
- FreeSecEDU (Modification dateThis property is a special property in this wiki. 20 December 2013 14:19:11)
- PM (Modification dateThis property is a special property in this wiki. 20 December 2013 14:18:47)
- Output (Modification dateThis property is a special property in this wiki. 20 December 2013 14:18:24)
- Email (Modification dateThis property is a special property in this wiki. 20 December 2013 14:18:21)
- Partner Abbreviation (Modification dateThis property is a special property in this wiki. 20 December 2013 14:17:56)
- ... further results
recent pages in slideshow
Note: format=slideshow is supported in this version, and shown in:
recent pages, random
[[modification date::+]] shows only pages that exist (not deleted ones)
The part "{{{ns}}}" of the query was not understood. Results might not be as expected.
Variables
- ARTICLEPAGENAME, TALKPAGENAME
- see more http://en.wikipedia.org/wiki/Help:Magic_words