diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 22:43:35 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 22:43:35 +1000 |
| commit | a84275f1f409e85f873cdbf0caa93c7dc36ff357 (patch) | |
| tree | 9028b9de84a5f821213e6f358f983ece15189190 | |
| parent | 1e1150bd5612c7afaafd8e7ef65f8e379383f39c (diff) | |
template: Rename arg to make more sense.
| -rw-r--r-- | pywal/template.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pywal/template.py b/pywal/template.py index de3c110..ca72a12 100644 --- a/pywal/template.py +++ b/pywal/template.py @@ -7,18 +7,18 @@ from .settings import __cache_dir__ from . import util -def template(colors, input_file, output_dir): +def template(colors, input_file, cache_dir): """Read template file, substitute markers and save the file elsewhere.""" template_data = util.read_file_raw(input_file) template_data = "".join(template_data).format(**colors) template_name = os.path.basename(input_file) - util.save_file(template_data, output_dir / template_name) + util.save_file(template_data, cache_dir / template_name) print(f"export: Exported {template_name}.") -def export_all(colors, output_dir=__cache_dir__, template_dir=None): +def export_all(colors, cache_dir=__cache_dir__, template_dir=None): """Export all template files.""" template_dir = template_dir or \ os.path.join(os.path.dirname(__file__), "templates") @@ -29,4 +29,4 @@ def export_all(colors, output_dir=__cache_dir__, template_dir=None): all_colors = {k: util.Color(v) for k, v in all_colors.items()} for file in os.scandir(template_dir): - template(all_colors, file.path, output_dir) + template(all_colors, file.path, cache_dir) |
