From b9fd064d3069024b7d9084d3303e28fede3ad4b0 Mon Sep 17 00:00:00 2001 From: Amit Prasad <17amitprasad@gmail.com> Date: Mon, 16 Dec 2019 11:45:22 -0500 Subject: [PATCH] Started working on matching functions --- pywal/export.py | 26 ++++++++++++++++++++++++++ pywal/util.py | 5 +++++ 2 files changed, 31 insertions(+) diff --git a/pywal/export.py b/pywal/export.py index 88c98a6..b175c11 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -3,6 +3,7 @@ Export colors in various formats. """ import logging import os +import re from .settings import CACHE_DIR, MODULE_DIR, CONF_DIR from . import util @@ -12,7 +13,32 @@ def template(colors, input_file, output_file=None): """Read template file, substitute markers and save the file elsewhere.""" template_data = util.read_file_raw(input_file) + matches = re.finditer(r"(?<=(?