Convert title to Logseq-amenable metadata

This commit is contained in:
benjamin melançon 2024-06-22 23:24:01 -04:00
parent 37ea872f5c
commit 908112fe9c

View file

@ -13,6 +13,14 @@ def rewrite_file(filepath):
or (i == 4 and line == "\n")
):
continue
if (i == 5):
title_pieces = line.split("======")
if len(title_pieces) == 3:
title = title_pieces[1].strip()
w.write("---\n")
w.write("title: " + title + "\n")
w.write("---\n")
continue
w.write(line)