[augeas-devel] Parsing YAML files in Augeas
Tom Limoncelli
tal at whatexit.org
Sun Dec 23 18:59:35 UTC 2012
Has anyone made a lens for YAML files?
I noticed that cobbersettings.aug is a YAML-like file format.
However, it doesn't handle 2 levels of indenting.
I tried to extend cobblersettings.aug to handle something simple like this:
key:
- key2:
- valA
- valB
However, coding that is beyond my level of expertise.
Ultimately I need to add the "{ key: val, key2: val2}" notation
because the files that I need to manipulate look like:
key:
- key2:
- {key3: val3, key4: val4}
- {key5: val5, key6: val6}
- {key6: val6, key7: val7}
key8: val8
- key9:
- {key10: val10, key11: val11}
- {key12: val12, key12: val12}
key13: val13
However first I need to get through the issue of handling multiple
levels of indentation. Suggestions?
Tom
--
http://EverythingSysadmin.com -- my blog
http://www.TomOnTime.com -- my videos
More information about the augeas-devel
mailing list