I can't seem any examples of how to parse 'Front Matter' with Python. I have the following:
---
name: David
password: dwewwsadas
email: [email protected]
websiteName: Website Name
websitePrefix: websiteprefix
websiteDomain: domain.com
action: create
---
and I am using the following code:
listing = os.listdir(path)
for infile in listing:
stream = open(os.path.join(path, infile), 'r')
docs = yaml.load_all(stream)
for doc in docs:
for k,v in doc.items():
print k, "->", v
print "\n",
I keep getting errors because of the second set of ---