# Bin's main source code!
# Signed happily by Latenightz (aiden)
import os
import datetime
import hashlib
import time
utimetmp = str(time.time())
f = open("tmp.txt", "w")
f.write(utimetmp)
f.close()
f = open("tmp.txt", "r")
utimefin = f.read()
hashname = hashlib.md5(utimefin.encode())
hashnameo = hashname.hexdigest()
print(hashnameo)
cmd = "mkdir " + hashnameo
os.system(cmd)
def take():
print("taking from the take.txt file...")
f = open("take.txt", "r")
takefile = f.read()
filepath2 = hashnameo + "/paste.html"
hash_frm = " " + hashnameo + "
"
f = open(filepath2, "w")
f.write(takefile)
f.close()
f = open("../list.html", "a")
f.write(hash_frm)
f.close()
def custom():
paste = input("Write to " + hashnameo + ": ")
paste = paste.replace("\n", "
") # Format the \n into
for HTML support!
filepath = hashnameo + "/paste.html"
hash_frm = " " + hashnameo + "
"
f = open(filepath, "w")
f.write(paste)
f.close()
f = open("../list.html", "a")
f.write(hash_frm)
f.close()
print("would you like to take text from 'take.txt', or input custom text?[1=take;2=custom]")
ch = input()
if (ch == "1"):
take()
else:
custom()