removing pcompiler stuff (copy.py)

This commit is contained in:
Ozbolt Menegatti 2019-09-16 18:37:44 +02:00
parent e557455181
commit e414e48a05

24
copy.py
View File

@ -1,24 +0,0 @@
#!/usr/bin/python3
import base64
def copy(string):
import subprocess
subprocess.run(["xclip", "-selection", "c"], input=string, encoding='utf8')
with open("main.js", 'r') as fp:
script = fp.read()
with open("main.xslt", "r") as fp:
xslt = fp.read()
with open("hamburger.png", "rb") as fp:
img = fp.read()
with open("main.css", "r") as fp:
css = fp.read()
script = script.replace("XSLFILE", "`{}`".format(xslt))
script = script.replace("CSS", "`{}`".format(css))
script = script.replace("HAMBURGER", base64.b64encode(img).decode('ascii'))
copy(script)