34 lines
691 B
Python
Executable File
34 lines
691 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import readFile
|
|
import datetime
|
|
import header
|
|
|
|
#outFile = outFile + ".html"
|
|
m2h = "" # markdown 2 html
|
|
footStr = "\n</body>\n</html>"
|
|
|
|
|
|
def printHtml(head, body, foot, outFile):
|
|
file = open(outFile, 'w')
|
|
file.write(str(head + body + foot))
|
|
|
|
file.close()
|
|
|
|
def parseMd(inFile):
|
|
global m2h
|
|
m2h = str(readFile.readMarkdown(inFile))
|
|
return(m2h)
|
|
|
|
def main():
|
|
# metadata("sample.md")
|
|
parseMd("sample.md")
|
|
humanReadableArg = str(header.readHead("Big Grand Tigle"))
|
|
printHtml(humanReadableArg, m2h, footStr, "outdir/index.html")
|
|
|
|
def test():
|
|
print(str(header.readHead("string")) + str(parseMd("sample.md")) + footStr)
|
|
|
|
main()
|
|
#test()
|