WikiTask Tutorial/WikiTask Overview

From BITPlan Wiki
Revision as of 08:33, 27 April 2020 by Wf (talk | contribs) (pushed from https://partner.bitplan.com)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SiDIF input

now let's take the two templates with some other input. The new input's id is Id='w2'

Excel is format of input
SiDIF is format of input
Freemarker is format of template
WikiTask generates WikiPage
input is part of WikiPage
template is part of WikiPage
input hasid id
template hasid id
"wikitaskoverview" is id of input
"wikitasktemplate" is id of template

Templates

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>

id='tripletable'

<#assign triples=tripleStore.getTriples()/>
== Triple table ==
{|class="wikitable sortable"
!subject!!predicate!!object
|-
<#list triples as triple>
| ${triple.subject} || ${triple.predicate} || ${triple.object}
|-
</#list>
|}

WikiTasks for WikiTask overview example

{{wikitask|cmd=runtemplate|input=w2|template=triplegraph|targetpage=WikiTask Tutorial/w2graph}}
{{wikitask|cmd=runtemplate|input=w2|template=tripletable|targetpage=WikiTask Tutorial/w2table}}

runtemplate -> WikiTask Tutorial/w2graph runtemplate -> WikiTask Tutorial/w2table

Expected results

Triple graph

Triple table

subject predicate object
SiDIF format input
Freemarker format template
WikiTask generates WikiPage
input part WikiPage
input hasid id
input id wikitaskoverview
template part WikiPage
template hasid id
template id wikitasktemplate