""" Generiert das SCSS für cal.scss """ css = "" for startEnd in ("start", "end"): acht = 0 for i in range(0, 28): if i % 4 == 0: acht += 100 height = str(acht) else: height = str(acht + (i % 4 * 15)) if len(height) == 3: height = "0" + height css += "." + startEnd + "-" + height + " {\n" if startEnd == "start": css += "grid-row-" + startEnd + ": " + "1" + "\n}\n" else: css += "grid-row-" + startEnd + ": " + "4" + "\n}\n" css += "\n\n\n" for startEnd in ("start", "end"): acht = 700 for i in range(0, 45): if i % 4 == 0: acht += 100 height = str(acht) else: height = str(acht + (i % 4 * 15)) if len(height) == 3: height = "0" + height css += "." + startEnd + "-" + height + " {\n" css += "grid-row-" + startEnd + ": " + str(i + 1) + "\n}\n" css += "\n\n\n" file = open("static/cal.scss", "a") file.write ("\n // Generated by genSCSSstarts.py\n\n") file.write(css) file.close()