diff --git a/extract-yamls b/extract-yamls new file mode 100755 index 0000000..2da50e7 --- /dev/null +++ b/extract-yamls @@ -0,0 +1,18 @@ +#!/usr/bin/awk -f + +# Start of a file entry +/= `/ { + outfile = gensub("_yaml$", ".yaml", "1", $1) + print "Writing " outfile + print substr($0, index($0, "`") + 1) > outfile + next +} + +/^`$/ { + outfile = "" + next +} + +outfile != "" { + print >> outfile +}