From b85800cb82396de7a405cded76eb68f3bd8f9c67 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 23 Aug 2020 18:32:58 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=20Theme=20builder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 build.py diff --git a/build.py b/build.py new file mode 100644 index 00000000..dfcbfc28 --- /dev/null +++ b/build.py @@ -0,0 +1,30 @@ +import json +from clickgen import build_cursor_theme + +from config import configs, sizes, delay, temp_folder +from helper import init_build, pack_it + + +def build(config) -> None: + init_build() + + build_cursor_theme( + config['name'], + image_dir=config['bitmaps_dir'], + cursor_sizes=sizes, + out_path=config['temp_folder'], + hotspots=hotspots, + archive=False, + delay=delay) + + pack_it(config) + + +if __name__ == "__main__": + # read hotspots file + with open('./hotspots.json', 'r') as hotspot_file: + hotspots = json.loads(hotspot_file.read()) + + # building themes + for config in configs: + build(config)