<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
\begin{DoxyItemize}
\item infos = Information about the simplespeclang plugin is in keys below
\item infos/author = Markus Raab \href{mailto:elektra@libelektra.org}{\tt elektra@libelektra.\+org}
\item infos/licence = B\+SD
\item infos/needs =
\item infos/provides = storage
\item infos/recommends =
\item infos/placements = getstorage setstorage
\item infos/status = maintained specific nodep preview experimental difficult unfinished old concept
\item infos/metadata =
\item infos/description = provides conceptual specification language
\end{DoxyItemize}

See \hyperlink{md_doc_tutorials_validation_doc_tutorials_validation_md}{the validation tutorial} for introduction. This plugin provides a conceptual simplistic specification language.

It currently supports to specify\+:


\begin{DoxyItemize}
\item structure (which keys are allowed)
\item enums (which values are allowed)
\item multi-\/enums (by name convention\+: if name ends with {\ttfamily $\ast$})
\end{DoxyItemize}

\subsection*{Purpose}

The plugin demonstrates how simple a configuration specification can be within the Elektra framework. It is conceptual and mainly for educational usage. You can base your plugins

\subsection*{Configuration}


\begin{DoxyItemize}
\item {\ttfamily /keyword/enum}, default {\ttfamily enum}\+: used as keywords for enum definitions.
\item {\ttfamily /keyword/assign}, default {\ttfamily =}\+: used as keywords for assignment.
\end{DoxyItemize}

Configuration within the specification language\+:


\begin{DoxyItemize}
\item {\ttfamily mountpoint $&lt;$filename$&gt;$}\+: defines a file-\/name for {\ttfamily kdb spec-\/mount}
\item {\ttfamily plugins $&lt;$pluginspec$&gt;$}\+: defines list of plugins for {\ttfamily kdb spec-\/mount}
\end{DoxyItemize}

\subsection*{Usage}

First you need to mount the plugin to spec, e.\+g.\+:


\begin{DoxyCode}
sudo kdb mount myspec.ssl spec/test simplespeclang
\end{DoxyCode}


Then you can write your specification (with default keywords)\+:


\begin{DoxyCode}
cat &gt; `kdb file spec/test` &lt;&lt; HERE
mountpoint filename.txt
enum key = value1 value2 value3
enum key2 = value1 value2
HERE
\end{DoxyCode}


And finally you need a specification mount, so that all necessary plugins are present\+:


\begin{DoxyCode}
kdb spec-mount /test
\end{DoxyCode}


Also make sure that {\ttfamily spec} is mounted as global plugin\+:


\begin{DoxyCode}
kdb global-mount
\end{DoxyCode}


Then you are only able to write valid keys\+:


\begin{DoxyCode}
kdb set /test/key value1  # accepted
kdb set /test/key2 value3 # rejected, no value3 for key2
kdb set /test/something else # rejected, no key something
\end{DoxyCode}
 </pre></body></html>