Gradience/gradience/modules/shell.py

13 lines
347 B
Python
Raw Normal View History

2022-09-13 20:19:25 +00:00
from jinja2 import Environment, FileSystemLoader
import os
2022-09-13 20:19:25 +00:00
def modify_colors(scss_path, output_path, **vars):
env = Environment(
loader=FileSystemLoader(os.path.dirname(scss_path)),
)
template = env.get_template("_colors.txt")
with open(output_path, "w", encoding="utf-8") as f:
2022-09-13 20:19:25 +00:00
f.write(template.render(**vars))