added more stuff to htmlifier

This commit is contained in:
virtual 2018-08-09 15:17:26 -04:00
parent 1637a91d68
commit fb2ed17b59
1 changed files with 8 additions and 1 deletions

View File

@ -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 = "<html><head><title>My Blog</title></head><body><p>%s</p></body></html>" % data
with open("%s/pyblg.html", "w+") as r:
r.write(template)
r.close()
print("wrote data")
if __name__ == '__main__':
PyBLG.banner()