40 lines
728 B
Python
Executable File
40 lines
728 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import readFile
|
|
import datetime
|
|
import header
|
|
|
|
#outFile = outFile + ".html"
|
|
timeCreate = ""
|
|
timeMod = ""
|
|
m2h = "" # markdown 2 html
|
|
headerStr = ""
|
|
footStr = "\n</body>\n</html>"
|
|
|
|
|
|
def printHtml(head, body, foot, outFile):
|
|
print("placeholder")
|
|
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 css():
|
|
print("placeholder")
|
|
|
|
def main():
|
|
# metadata("sample.md")
|
|
parseMd("sample.md")
|
|
printHtml(headerStr, m2h, footStr, "outdir/index.html")
|
|
|
|
def test():
|
|
print(str(header.readHead("string")) + str(parseMd("sample.md")) + footStr)
|
|
|
|
#main()
|
|
test()
|