
\begin{DoxyItemize}
\item infos = Information about the tcl plugin is in keys below
\item infos/author = Markus Raab \href{mailto:elektra@libelektra.org}{\texttt{ elektra@libelektra.\+org}}
\item infos/licence = B\+SD
\item infos/provides = storage/tcl
\item infos/needs = code null binary
\item infos/placements = setstorage getstorage
\item infos/status = unfinished concept
\item infos/description = Serialize tcl lists
\end{DoxyItemize}

This plugin is a storage plugin which writes keys to lists {\itshape in the style of} the Tcl programming language.

The format does not have significant spaces. The advantage of T\+CL style lists is that also arbitrary metadata can be embedded in a natural and distinguish-\/able style. It looks like\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\{}
\DoxyCodeLine{    \{}
\DoxyCodeLine{        key=val}
\DoxyCodeLine{        \{}
\DoxyCodeLine{            metakey = b}
\DoxyCodeLine{        \}}
\DoxyCodeLine{        \{}
\DoxyCodeLine{            comment = huhu}
\DoxyCodeLine{        \}}
\DoxyCodeLine{    \}}
\DoxyCodeLine{\}}
\end{DoxyCode}


\`{}\`{}{\ttfamily  @section autotoc\+\_\+md669 Mount Tcl plugin to namespace}user/examples/tcl\`{} \hypertarget{autotoc_md666_autotoc_md670}{}\section{We add the required plugins (instead of the plugin providers)}\label{autotoc_md666_autotoc_md670}
\hypertarget{autotoc_md666_autotoc_md671}{}\section{for $<$tt$>$tcl$<$/tt$>$ manually, since otherwise this command leaks memory.}\label{autotoc_md666_autotoc_md671}
sudo kdb mount config.\+tcl user/tests/tcl tcl ccode null base64\hypertarget{autotoc_md666_autotoc_md672}{}\section{Add a key value pair to the database}\label{autotoc_md666_autotoc_md672}
kdb set user/tests/tcl/key value \hypertarget{autotoc_md666_autotoc_md673}{}\section{The Tcl plugin also supports metadata}\label{autotoc_md666_autotoc_md673}
kdb meta-\/set user/tests/tcl/key comment \char`\"{}\+This key contains example data.\char`\"{} \hypertarget{autotoc_md666_autotoc_md674}{}\section{A known limitation of the plugin is that it discards whitespace characters}\label{autotoc_md666_autotoc_md674}
kdb meta-\/get user/tests/tcl/key comment \#$>$ Thiskeycontainsexampledata.

kdb export user/tests/tcl tcl \#$>$ \{ \#$>$ \{ \#$>$ key = value \#$>$ \{ \#$>$ comment = Thiskeycontainsexampledata. \#$>$ \} \#$>$ \} \#$>$ \}\hypertarget{autotoc_md666_autotoc_md675}{}\section{Undo modifications}\label{autotoc_md666_autotoc_md675}
kdb rm -\/r user/tests/tcl sudo kdb umount user/tests/tcl 
\begin{DoxyCode}{0}
\DoxyCodeLine{\#\# Binary Data}
\DoxyCodeLine{}
\DoxyCodeLine{The plugin also supports binary data via the [base64 plugin](@ref src\_plugins\_base64\_README\_md) and null keys via the [null plugin](@ref src\_plugins\_null\_README\_md).}
\end{DoxyCode}
 \hypertarget{autotoc_md666_autotoc_md676}{}\section{Mount plugin}\label{autotoc_md666_autotoc_md676}
sudo kdb mount config.\+tcl user/tests tcl ccode null base64\hypertarget{autotoc_md666_autotoc_md677}{}\section{Import some data}\label{autotoc_md666_autotoc_md677}
kdb import user/tests/dump xmltool $<$ src/plugins/xmltool/xmltool/dump.\+xml\hypertarget{autotoc_md666_autotoc_md678}{}\section{Take a look at imported data}\label{autotoc_md666_autotoc_md678}
kdb ls user/tests/dump \#$>$ user/tests/dump/.Hidden\+Binary\+Key \#$>$ user/tests/dump/.Hidden\+Directory\+Key \#$>$ user/tests/dump/.Hidden\+String\+Key \#$>$ user/tests/dump/\+Perfect\+Binary\+Key \#$>$ user/tests/dump/\+Perfect\+Directory\+Key \#$>$ user/tests/dump/\+Perfect\+String\+Key \#$>$ user/tests/dump/\+Ug.\+ly\+:Bin{\itshape } €ry\+Key \#$>$ user/tests/dump/\+Ug.\+ly\+:Dir@ect€ory\+Key \#$>$ user/tests/dump/\+Ug.\+ly\+:St@ri€n.\+g\+Key\hypertarget{autotoc_md666_autotoc_md679}{}\section{The plugin supports binary data…}\label{autotoc_md666_autotoc_md679}
kdb get user/tests/dump/\+Perfect\+Binary\+Key \#$>$ \textbackslash{}x42\textbackslash{}x69\textbackslash{}x6e\textbackslash{}x61\textbackslash{}x72\textbackslash{}x79\textbackslash{}x56\textbackslash{}x61\textbackslash{}x6c\textbackslash{}x75\textbackslash{}x65\textbackslash{}x0\hypertarget{autotoc_md666_autotoc_md680}{}\section{… and empty keys}\label{autotoc_md666_autotoc_md680}
kdb get user/tests/dump/\+Ug.\+ly\+:Bin{\itshape } €ry\+Key\hypertarget{autotoc_md666_autotoc_md681}{}\section{Undo modifications}\label{autotoc_md666_autotoc_md681}
kdb rm -\/r user/tests sudo kdb umount user/tests \`{}\`{}\`{}\hypertarget{autotoc_md666_autotoc_md682}{}\subsection{Limitations}\label{autotoc_md666_autotoc_md682}

\begin{DoxyItemize}
\item whitespaces are discarded
\item no comments
\end{DoxyItemize}\hypertarget{autotoc_md666_autotoc_md683}{}\subsection{Dependencies}\label{autotoc_md666_autotoc_md683}

\begin{DoxyItemize}
\item {\ttfamily libboost-\/dev} 
\end{DoxyItemize}