
\begin{DoxyItemize}
\item infos = Information about the yaypeg plugin is in keys below
\item infos/author = René Schwaiger \href{mailto:sanssecours@me.com}{\tt sanssecours@me.\+com}
\item infos/licence = B\+SD
\item infos/needs = directoryvalue yamlsmith
\item infos/provides = storage/yaml
\item infos/recommends =
\item infos/placements = getstorage
\item infos/status = maintained unittest preview experimental unfinished nodoc concept discouraged
\item infos/metadata =
\item infos/description = This storage plugin uses a P\+EG based parser to read Y\+A\+ML files
\end{DoxyItemize}\hypertarget{md_src_plugins_yaypeg_README_src_plugins_yaypeg_README_md}{}\section{Y\+Ay P\+EG}\label{md_src_plugins_yaypeg_README_src_plugins_yaypeg_README_md}
The Y\+Ay P\+EG plugin use a parser based on \href{https://github.com/taocpp/PEGTL}{\tt P\+E\+G\+TL} to convert Y\+A\+ML data to Elektra’s {\ttfamily Key\+Set} type.

\subsection*{Dependencies}

This plugin requires https\+://github.com/taocpp/\+P\+E\+G\+T\+L/blob/2.\+7.\+x/doc/\+Installing-\/and-\/\+Using.md \char`\"{}\+P\+E\+G\+T\+L\char`\"{} {\ttfamily 2.\+7.\+1}. Previous versions of the library might work too. However, neither the current development version of P\+E\+G\+TL ({\ttfamily 3.\+0}), nor the latest version of P\+E\+G\+TL {\ttfamily 2.\+7.\+x} can be used by the plugin because of the issue referenced \href{https://github.com/taocpp/PEGTL/issues/143}{\tt here}.

\subsection*{Examples}

\subsubsection*{Mappings}

``` \section*{Mount plugin}

sudo kdb mount config.\+yaml user/tests/yaypeg yaypeg

\section*{Add some values}

kdb set user/tests/yaypeg/movements/deadly \textquotesingle{}Dull\textquotesingle{} kdb set user/tests/yaypeg/movements/deep \textquotesingle{}Red\textquotesingle{}

\section*{Manually add a key}

printf \textquotesingle{}Rosalía\+: El\+::\+Mal\+::\+Querer\textquotesingle{} $>$$>$ {\ttfamily kdb file user/tests/yaypeg}

\section*{List keys}

kdb ls user/tests/yaypeg \#$>$ user/tests/yaypeg/\+Rosalía \#$>$ user/tests/yaypeg/movements/deadly \#$>$ user/tests/yaypeg/movements/deep

\section*{Retrieve a value}

kdb get user/tests/yaypeg/\+Rosalía \#$>$ El\+::\+Mal\+::\+Querer

\section*{Undo modifications}

kdb rm -\/r user/tests/yaypeg sudo kdb umount user/tests/yaypeg 
\begin{DoxyCode}
### Arrays
\end{DoxyCode}
 \section*{Mount plugin}

sudo kdb mount config.\+yaml user/tests/yaypeg yaypeg

\section*{Manually add some values}

printf \textquotesingle{}ponies\+:~\newline
\textquotesingle{} $>$ {\ttfamily kdb file user/tests/yaypeg} printf \textquotesingle{} -\/ Flutter Shy \# Yay!~\newline
\textquotesingle{} $>$$>$ {\ttfamily kdb file user/tests/yaypeg} printf \textquotesingle{} -\/ Pinkie Pie~\newline
\textquotesingle{} $>$$>$ {\ttfamily kdb file user/tests/yaypeg} printf \textquotesingle{} -\/ Maud Pie\textquotesingle{} $>$$>$ {\ttfamily kdb file user/tests/yaypeg}

\section*{List array keys}

kdb ls user/tests/yaypeg \#$>$ user/tests/yaypeg/ponies \#$>$ user/tests/yaypeg/ponies/\#0 \#$>$ user/tests/yaypeg/ponies/\#1 \#$>$ user/tests/yaypeg/ponies/\#2

\section*{Retrieve last array entry}

kdb get user/tests/yaypeg/ponies/\$(kdb getmeta user/tests/yaypeg/ponies array) \#$>$ Maud Pie

\section*{Undo modifications}

kdb rm -\/r user/tests/yaypeg sudo kdb umount user/tests/yaypeg ```

\subsection*{Limitations}

The plugin has the same limitations as \hyperlink{md_src_plugins_yambi_README_src_plugins_yambi_README_md}{Y\+A\+M\+Bi }. 