I have a bunch of notes that I want to pass to a blog designed especially for working with notes and wikilinks - but I would first need to do some YAML frontmatter code treatment of my own. I tried to do it manually, but it is too much work. Does anyone know how I can do this automatically?
title :
feed: show (or hide if I dont want to show on website)
date : DD-MM-YYYY
I have a lot of notes to put this YAML before submit to the website - linked above, its a jekyll static site hosted by github.
What I’m looking for its a way to do once for all.
import os
for i in os.walk('your_folder'):
with open(i, "r+") as f:
lines = f.readlines()
f.seek(0)
f.write("---\ntitle : \nfeed: show (or hide if I dont want to show on website)\ndate : DD-MM-YYYY\n---\n")
f.writelines(lines)