diff --git a/TODO b/TODO index 882a1cf..3ca97f2 100644 --- a/TODO +++ b/TODO @@ -3,4 +3,6 @@ Nice HTML tabs Don't hard-code timezone Build system Take input file as a command-line arguement -Figure out licencing \ No newline at end of file + title, template, markdown +Figure out licencing +Try to replace beautifulsoup \ No newline at end of file diff --git a/header.py b/header.py index 8d5063a..d384b54 100755 --- a/header.py +++ b/header.py @@ -1,2 +1,29 @@ #!/usr/bin/python +import bs4 +import datetime + + + +def readHead(): + inFile = "" + outHead = "" + time = [] + sTitle = "" + footStr = "\n\n" + + def __init__(self, headerFile, title): + self.inFile = headerFile + self.sTitle = title + self.outHead = "" + self.time = [] + self.footStr = "\n\n" + + def getTime(self): + gettime = datetime.datetime.now() + modDate = str(gettime.strftime("%A, %B %d, %Y at %X UTC−06:00")) #TODO: I don't want to hard-code this but the %z utc offset isn't printing + createDate = self.modDate #TODO: make this seperate + global time + time.append(str(modDate)) + time.append(str.createDate) + diff --git a/main.py b/main.py index e849360..ce58eb6 100755 --- a/main.py +++ b/main.py @@ -2,13 +2,14 @@ import readFile import datetime +import header #outFile = outFile + ".html" timeCreate = "" timeMod = "" m2h = "" # markdown 2 html headerStr = "" -footStr = "\n" +footStr = "\n\n" def printHtml(head, body, foot, outFile): @@ -51,6 +52,7 @@ def metadata(inFile): + """ headerStr = headerStr + str(title) + headerStr1 + timeMod + headerStr2 + timeCreate + headerStr3 @@ -70,8 +72,10 @@ def main(): def test(): #print(readFile.readMarkdown("/home/amber/website.sh/sample.md")) - print(parseMd("sample.md")) + #print(parseMd("sample.md")) - metadata("sample.md") + #metadata("sample.md") + header.readHead("htmlTemplate/header.header.html", "string") -main() \ No newline at end of file +#main() +test() \ No newline at end of file