Elektra  0.8.25
Plugin: yawn

YAwn

Introduction

This plugin uses YAEP to parse YAML data.

Dependencies

This plugin requires YAEP.

Examples

Mappings

# Mount plugin
sudo kdb mount config.yaml user/tests/yawn yawn
# Set and retrieve some basic values
kdb set user/tests/yawn 'is obviously a move introduced in Generation III of Pokemon' # Source: Bulbapedia
kdb set user/tests/yawn/ing 'is something similar'
kdb get user/tests/yawn/
#> is obviously a move introduced in Generation III of Pokemon
kdb get user/tests/yawn/ing
#> is something similar
kdb ls user/tests/yawn
#> user/tests/yawn
#> user/tests/yawn/ing
# Undo modifications
kdb rm -r user/tests/yawn
sudo kdb umount user/tests/yawn

Arrays

# Mount plugin
sudo kdb mount config.yaml user/tests/yawn yawn
kdb set user/tests/yawn/movies
kdb set user/tests/yawn/movies/#0 'YAwn I: Time to Wake Up'
kdb set user/tests/yawn/movies/#1 'YAwn II: The Awakening'
kdb set user/tests/yawn/movies/#2 'YAwn III: The Sleepover'
kdb set user/tests/yawn/movies/#3 'YAwn IV: YAwn Again'
# Retrieve last array index
kdb getmeta user/tests/yawn/movies array
#> #3
kdb get user/tests/yawn/movies/#1
#> YAwn II: The Awakening
# Undo modifications
kdb rm -r user/tests/yawn
sudo kdb umount user/tests/yawn

Limitations

The plugin has the same limitations as YAMBi .