html.xonsh/readFile.py

26 lines
601 B
Python
Executable File

#!/usr/bin/python
import markdown
# Only do the <body> tag
class readMarkdown():
outStr = ""
mdFile = ""
def __init__(self, mdFile):
outStr = ""
self.mdFile = mdFile
def markdown(self, mdFile):
print("placeholder")
file = open(mdFile, 'r')
#middleVar = file.read()
outStr = str(markdown.markdown(file.read()))
def __str__(self):
return(str(outStr))
# might want to find a way to diff html from a file and readMarkdown()'s output if I want to update pages
# Edit: just keep the original markdown files dumbass