Elektra
0.8.26
|
The YAy PEG plugin use a parser based on PEGTL to convert YAML data to Elektra’s KeySet
type.
This plugin requires https://github.com/taocpp/PEGTL/blob/2.7.x/doc/Installing-and-Using.md "PEGTL" 2.7.1
. Previous versions of the library might work too. However, neither the current development version of PEGTL (3.0
), nor the latest version of PEGTL 2.7.x
can be used by the plugin because of the issue referenced here.
```
sudo kdb mount config.yaml user/tests/yaypeg yaypeg
kdb set user/tests/yaypeg/movements/deadly 'Dull' kdb set user/tests/yaypeg/movements/deep 'Red'
printf 'Rosalía: El::Mal::Querer' >> kdb file user/tests/yaypeg
kdb ls user/tests/yaypeg #> user/tests/yaypeg/Rosalía #> user/tests/yaypeg/movements/deadly #> user/tests/yaypeg/movements/deep
kdb get user/tests/yaypeg/Rosalía #> El::Mal::Querer
kdb rm -r user/tests/yaypeg sudo kdb umount user/tests/yaypeg
sudo kdb mount config.yaml user/tests/yaypeg yaypeg
printf 'ponies:
' > kdb file user/tests/yaypeg
printf ' - Flutter Shy # Yay!
' >> kdb file user/tests/yaypeg
printf ' - Pinkie Pie
' >> kdb file user/tests/yaypeg
printf ' - Maud Pie' >> kdb file user/tests/yaypeg
kdb ls user/tests/yaypeg #> user/tests/yaypeg/ponies #> user/tests/yaypeg/ponies/#0 #> user/tests/yaypeg/ponies/#1 #> user/tests/yaypeg/ponies/#2
kdb get user/tests/yaypeg/ponies/$(kdb getmeta user/tests/yaypeg/ponies array) #> Maud Pie
kdb rm -r user/tests/yaypeg sudo kdb umount user/tests/yaypeg ```
The plugin has the same limitations as YAMBi .