summaryrefslogtreecommitdiff
path: root/pywal/export.py
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-07-22 10:01:14 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-07-22 10:01:14 +1000
commitc8dd8f4d03fc79b5594e8d873e0aba77e360796a (patch)
tree1d208cc23aee244c252b76de2d56ab64e289ee48 /pywal/export.py
parentd8d0297d8968380879718758493fd135b5234591 (diff)
general: Fixes.
Diffstat (limited to 'pywal/export.py')
-rw-r--r--pywal/export.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/pywal/export.py b/pywal/export.py
deleted file mode 100644
index 1dc72bf..0000000
--- a/pywal/export.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Export colors in various formats.
-"""
-import os
-
-from pywal import util
-
-
-def template(colors, input_file, output_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)
- print(f"export: Exported {template_name}.")
-
-
-def export_all_templates(colors, output_dir, template_dir=None):
- """Export all template files."""
- template_dir = template_dir or \
- os.path.join(os.path.dirname(__file__), "templates")
-
- all_colors = {"wallpaper": colors["wallpaper"],
- **colors["special"],
- **colors["colors"]}
- all_colors = {k: util.Color(v) for k, v in all_colors.items()}
-
- # pylint: disable=W0106
- [template(all_colors, file.path, output_dir)
- for file in os.scandir(template_dir)]