Helpers name changed

This commit is contained in:
KaizIqbal 2020-07-29 10:41:11 +05:30
parent 85032a0e9e
commit 9a61354b02
2 changed files with 7 additions and 6 deletions

View file

@ -2,18 +2,16 @@ import json
from clickgen import build_cursor_theme from clickgen import build_cursor_theme
from config import name, sizes, delay, bitmaps_dir, temp_folder from config import name, sizes, delay, bitmaps_dir, temp_folder
from helper import cleanup, init_build from helper import init_build, pack_it
def build() -> None: def build() -> None:
init_build() init_build()
# Building Cursor Theme
with open('./hotspots.json', 'r') as hotspot_file: with open('./hotspots.json', 'r') as hotspot_file:
hotspots = json.loads(hotspot_file.read()) hotspots = json.loads(hotspot_file.read())
build_cursor_theme(name, image_dir=bitmaps_dir, build_cursor_theme(name, image_dir=bitmaps_dir,
cursor_sizes=sizes, out_path=temp_folder, hotspots=hotspots, archive=False, delay=delay) cursor_sizes=sizes, out_path=temp_folder, hotspots=hotspots, archive=False, delay=delay)
# helper method pack_it()
cleanup()
if __name__ == "__main__": if __name__ == "__main__":

View file

@ -10,13 +10,16 @@ win_out_dir = path.join(package_dir, win_out)
def init_build() -> None: def init_build() -> None:
"""
Remove previously built packages.
"""
if path.exists(package_dir): if path.exists(package_dir):
shutil.rmtree(package_dir) shutil.rmtree(package_dir)
def cleanup() -> None: def pack_it() -> None:
""" """
🧹 Clean the unnecessary directorys & generate archive files. Create Crisp 📦 Packages for Windows & X11 Cursor Theme.
""" """
# Rename directory # Rename directory
shutil.move(path.join(temp_folder, name, "x11"), x11_out_dir) shutil.move(path.join(temp_folder, name, "x11"), x11_out_dir)