mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-08-26 17:32:31 +00:00
11 lines
346 B
Python
11 lines
346 B
Python
from jinja2 import Environment, FileSystemLoader
|
|
|
|
import os
|
|
|
|
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:
|
|
f.write(template.render(**vars))
|