20 lines
719 B
Python
20 lines
719 B
Python
import os
|
|
import variables
|
|
|
|
buildscript = open("build.sh","w")
|
|
buildscript.write("#!/usr/bin/env bash && python3 colors.py\n\n")
|
|
if variables.neocities:
|
|
buildscript.write("neocities push")
|
|
else:
|
|
buildscript.write("rclone copy build " + variables.servername + ":" + variables.serverpath + " -P -L")
|
|
buildscript.close()
|
|
|
|
fontloc = open("build/font.css","w")
|
|
fontloc.write("@font-face {\n src: url(\"")
|
|
if len(variables.subfolder) > 0:
|
|
header.write("/" + variables.subfolder)
|
|
fontloc.write("/assets/fonts/04b24.ttf\");\n font-display: swap;\n font-family: \"04b24\";\n font-style: normal;\n font-weight: 400;\n}\n")
|
|
fontloc.close()
|
|
|
|
if not os.path.exists("build/user.css"):
|
|
open("build/user.css","x")
|