Difference between revisions of "WikiTask Tutorial"
(pushed from https://partner.bitplan.com) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
==== Access rights ==== | ==== Access rights ==== | ||
The use of the Service behind {{Link|target=Template:Wikitask}} is access restricted. You need to be in the list of allowed users. You might | The use of the Service behind {{Link|target=Template:Wikitask}} is access restricted. You need to be in the list of allowed users. You might | ||
− | want to contact info@bitplan.com to get access rights. | + | want to contact [mailto:info@bitplan.com info@bitplan.com] to get access rights for one of our partner wikis. |
+ | |||
==== Login in ==== | ==== Login in ==== | ||
Before your start you might want to login to the service. | Before your start you might want to login to the service. | ||
Line 71: | Line 72: | ||
} | } | ||
</graphviz> | </graphviz> | ||
+ | http://diagrams.bitplan.com/render/png/0xf4b969a1.png | ||
== API == | == API == |
Latest revision as of 13:47, 2 February 2021
Overview
With the Template:Wikitask you can generate WikiPages based on
and a template from one of the following engines
Prerequisites
Access rights
The use of the Service behind Template:Wikitask is access restricted. You need to be in the list of allowed users. You might want to contact info@bitplan.com to get access rights for one of our partner wikis.
Login in
Before your start you might want to login to the service. Just click login to do so.
First example: Dad loves mum
The following four lines are valid sidif input with the id='dadlovesmum'
sidif input
dad loves mum
mum loves dad
kid loves mum
kid loves dad
kid likes granny
granny hates dad
freemarker template
this is a simple freemarker template with the id='triplegraph'
<#assign rankdir="TB"/>
<#assign triples=tripleStore.getTriples()/>
== Triple graph ==
<graphviz format='svg'>
digraph ${wikiTask.input} {
rankdir="${rankdir}";
<#list triples as triple>
"${triple.subject}" -> "${triple.object}" [label="${triple.predicate}"];
</#list>
}
</graphviz>
the following wikiTask call will create the wikipage "Dad loves mum 2015-03-14" by applying the freemarker template with the id='triplegraph' to the triples read from the sidif input "dadlovesmum".
{{wikitask|cmd=runtemplate|input=dadlovesmum|template=triplegraph|targetpage=Dad loves mum 2015-03-14}}
runtemplate -> Dad_loves_mum_2015-03-14
expected result
first the wiki markup is shown than the graphical representation rendered by graphviz.
<graphviz format='svg'> digraph dadlovesmum { rankdir="TB"; "dad" -> "mum" [label="loves"]; "kid" -> "mum" [label="loves"]; "kid" -> "dad" [label="loves"]; "kid" -> "granny" [label="likes"]; } </graphviz>
API
Predefined Variables
- tripleStore - the tripleStore loaded with the SiDIF content specified in wikiTask.input
- see http://bitplan.github.io/org.sidif.triplestore/apidocs/org/sidif/triple/TripleStore.html for the API details
- wikiTask - the wikiTask specified with .input, .template, .pageTitle
- title - the title specified