diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-06-29 18:12:41 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-06-29 18:12:41 +1000 |
| commit | e92bce4fe932ea9e13abb6c01a9685bb3bada73b (patch) | |
| tree | 6dd5396e8c62294ba34477ee20a60fb561ce9324 /pywal/export_colors.py | |
| parent | 35920c71640e30dd818db971890381f35705ef75 (diff) | |
template: Add initial putty template.
Diffstat (limited to 'pywal/export_colors.py')
| -rwxr-xr-x | pywal/export_colors.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pywal/export_colors.py b/pywal/export_colors.py index 6d51ca6..9a3d958 100755 --- a/pywal/export_colors.py +++ b/pywal/export_colors.py @@ -5,6 +5,7 @@ import os import pathlib from pywal.settings import CACHE_DIR, TEMPLATE_DIR +from pywal import util def template(colors, input_file): @@ -17,11 +18,8 @@ def template(colors, input_file): with open(template_file) as file: template_data = file.readlines() - # Merge both dicts. - colors["colors"].update(colors["special"]) - # Format the markers. - template_data = "".join(template_data).format(**colors["colors"]) + template_data = "".join(template_data).format(**colors) # Export the template. with open(export_file, "w") as file: @@ -30,5 +28,9 @@ def template(colors, input_file): def export_all_templates(colors): """Export all template files.""" + # Merge both dicts. + colors["colors"].update(colors["special"]) + # pylint: disable=W0106 - [template(colors, file.name) for file in os.scandir(TEMPLATE_DIR)] + [template(colors["colors"], file.name) + for file in os.scandir(TEMPLATE_DIR)] |
