From 20954250dc462db361e8492c4f2bc01f10c2cf2e Mon Sep 17 00:00:00 2001 From: "DESKTOP-CNFQ7PM\\Primere" Date: Thu, 24 Oct 2024 08:11:02 +0200 Subject: [PATCH] V 1.0.0 - Preview init copy --- __init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 0b5b851..8cdd633 100644 --- a/__init__.py +++ b/__init__.py @@ -11,7 +11,6 @@ from .Nodes import Outputs from .Nodes import Visuals from .Nodes import Networks from .Nodes import Segments - import shutil __version__ = "1.0.0" @@ -46,6 +45,15 @@ if os.path.exists(frontend_target): except Exception: print('[ERROR] - Cannnot delete Primere front-end folder. Please delete manually: ' + frontend_target + ' from: ' + frontend_source) +if os.path.isdir(frontend_preview_target) == False: + preview_images = os.path.join(frontend_source, 'images') + try: + shutil.copytree(preview_images, frontend_preview_target) + print('Primere initial preview copied to target directory.') + except Exception: + print('[ERROR] - Cannnot copy Primere preview folder to right path. Please delete directory: ' + frontend_preview_target + ' and copy files here manually from: ' + preview_images) + + nodes = [] IGNORE_FRONTEND = ['fonts', 'images', 'keywords', 'jquery', 'vendor'] mainDirs = list(os.walk(frontend_source))[0][1]