Compare commits

..

No commits in common. "1ab20058c2c8b9d87c46b057540a6276a1e277c2" and "8b237a703846d16e582a503cd2cb9a6862379fff" have entirely different histories.

View file

@ -7,7 +7,6 @@ def rewrite_file(filepath):
newfilepath = base + ".md"
with open(newfilepath, 'w') as w:
in_block = False
frontmatter = False
for i, line in enumerate(f):
if ( (i == 0 and line == "Content-Type: text/x-zim-wiki\n")
or (i == 1 and line == "Wiki-Format: zim 0.26\n")
@ -17,8 +16,6 @@ def rewrite_file(filepath):
):
continue
if (i == 5):
# Set to always true when we have a type to write below
# frontmatter = True
title_pieces = line.split("======")
if len(title_pieces) == 3:
title = title_pieces[1].strip()
@ -31,14 +28,11 @@ def rewrite_file(filepath):
if (title == base):
continue
w.write("title:: " + title + "\n")
if (frontmatter == False):
w.write("\n")
if (frontmatter == True):
continue
if (i == 5):
# Types of postable-posted, email-draft, email-sent set when running this for each subdirectory
w.write("type:: postable-draft\n")
w.write("\n")
frontmatter = False
continue
if (i > 5 and line == "\"\"\"\n"):
if (in_block == False):
# Start our self-styled quotation block with a bullet.