diff --git a/write.py b/write.py index 27d4662..ec3a976 100644 --- a/write.py +++ b/write.py @@ -39,7 +39,14 @@ class PyBLG: print(", ".join(g)) f = input("Please choose a file: ") if int(f) < len(g): - + with open(g[int(f)], "w+") as t: + data = t.read().rstrip() + t.close() + template = "My Blog

%s

" % data + with open("%s/pyblg.html", "w+") as r: + r.write(template) + r.close() + print("wrote data") if __name__ == '__main__': PyBLG.banner()