eyre.utils
embed
macro
(embed path)keywordize-status
(keywordize-status status)newlines
normalize-mac
(normalize-mac mac)Normalizes a mac address to colon-separated lower case. Accepts colon, dash, or no separators.
parse-kv
(parse-kv content)Parses key=value lines into a keyword->string map. Surrounding double quotes are stripped from values.
parse-kv-colon
(parse-kv-colon content)Parses key: value lines into a keyword->string map.
parse-prefix
(parse-prefix p)Parses a netmask like 255.255.255.0 or 0xffffff00 into a prefix length. If already a number string returns the int.
parse-sections
(parse-sections out)Splits raw gather output into a map of section-name -> joined string. Sections are delimited by ===name=== markers.
rejoin-lines
(rejoin-lines lines)