Skip to content

Dokuwiki

Stephen Winnall edited this page Aug 1, 2020 · 4 revisions

OHR uses Dokuwiki because Dokuwiki is small and runs on embedded machines without much apparent overhead.

Reports Generated

OHR generates its reports as text files in a file tree suitable for inclusion in a Dokuwiki installation. The files generated have known names, so users are free to use any other file name for their own own extensions to their Dokuwiki content. The file names currently in use are:

File Overwritten? Purpose
start.txt no The default content for the current folder (like index.html in HTML), generated by OHR if it doesn't exist yet, but can be edited and will not be overwritten. This file should provide – directly or indirectly – links to all other files in the same folder.
auto.txt yes Automatically generated, this file contains textual information about a specific object.
auto-svg.txt yes Automatically generated, this file contains the SVG diagram for a specific object.
anything else no User-specific Dokuwiki file – the user is responsible for ensuring that it is linked to (e.g. through start.txt)

Report Format

The format of the reports generated is defined in FreeMarker files in the JAR at etc.template.d. The names of the files are as follows:

Object File FreeMarker Template
Binding auto.txt binding.ftl
Binding start.txt binding-start.ftl
Bridge auto.txt bridge.ftl
Bridge start.txt bridge-start.ftl
Model auto.txt model.ftl
Model start.txt model-start.ftl
Thing auto.txt thing.ftl
Thing start.txt thing-start.ftl

The file macros.ftl contains FreeMarker macros included by the other template files.

The file binding-index.ftl contains an overview of all the bindings found during the current run of OHR that is suitable for inclusion on a home page.

Report Format Modification

Users are free to alter (or override) these templates but are responsible for ensuring that all other required files are linked in, directly or indirectly.

If you want to change the format of the reports generated, copy the appropriate .ftl file from at etc.template.d in the JAR to the appropriate application support folder on your OS and modify it there. OHR always tries the applications support folders of the OS before retrieving a file from the JAR.

OS User Application Support Folder System Application Support Folder
MacOS ~/Library/Application Support/OpenHAB Reporter/etc.template.d /Library/Application Support/OpenHAB Reporter/etc.template.d
Clone this wiki locally