Skip to content

Commit

Permalink
check user template dir when exporting single file
Browse files Browse the repository at this point in the history
  • Loading branch information
masonesl authored and eylles committed Jan 19, 2024
1 parent bf8e057 commit 5adbd41
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pywal/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ def color(colors, export_type, output_file=None):
all_colors = flatten_colors(colors)

template_name = get_export_type(export_type)
template_file = os.path.join(MODULE_DIR, "templates", template_name)

if template_name == export_type:
template_file = os.path.join(CONF_DIR, "templates", template_name)
else:
template_file = os.path.join(MODULE_DIR, "templates", template_name)

output_file = output_file or os.path.join(CACHE_DIR, template_name)

if os.path.isfile(template_file):
Expand Down

0 comments on commit 5adbd41

Please sign in to comment.