diff --git a/scripts/deps.py b/scripts/deps.py index 6239915..87b0464 100644 --- a/scripts/deps.py +++ b/scripts/deps.py @@ -18,6 +18,7 @@ # import os from set_config import source_dir +from colorama import Fore def mtime(file): if os.path.isfile(file): @@ -41,13 +42,13 @@ def read_deps(dname): def check_deps(target, dname): target_mtime = mtime(target) if not target_mtime: - return target + " missing" + return Fore.CYAN + target + " missing" + Fore.WHITE if not os.path.isfile(dname): - return "no deps" + return Fore.CYAN + "no deps" + Fore.WHITE deps = read_deps(dname) for dep in deps: if mtime(dep) > target_mtime: - return dep + ' changed' + return Fore.CYAN + dep + ' changed' + Fore.WHITE return None def source_dirs(bom_dir): diff --git a/scripts/exports.py b/scripts/exports.py index 0d88dd3..600f0b7 100644 --- a/scripts/exports.py +++ b/scripts/exports.py @@ -31,6 +31,7 @@ from deps import * from tmpdir import * import json import shutil +from colorama import Fore, init def bom_to_parts(bom_dir, part_type, assembly = None): # @@ -130,7 +131,7 @@ def make_parts(target, part_type, parts = None): changed = check_deps(part_file, dname) changed = times.check_have_time(changed, part) if part_type == 'stl' and not changed and not part in bounds_map: - changed = "No bounds" + changed = Fore.CYAN + "No bounds" + Fore.WHITE if changed: print(changed) # diff --git a/scripts/options.py b/scripts/options.py index 5de2f58..deaddcf 100644 --- a/scripts/options.py +++ b/scripts/options.py @@ -20,6 +20,7 @@ # Set command line options from enviroment variables and check if they have changed import json, os, deps +from colorama import Fore, init def check_options(dir = '.'): global options, options_mtime @@ -37,7 +38,7 @@ def check_options(dir = '.'): def have_changed(changed, target): if not changed and deps.mtime(target) < options_mtime: - return "command line options changed" + return Fore.CYAN + "command line options changed" + Fore.WHITE return changed def list(): diff --git a/scripts/times.py b/scripts/times.py index f7b41fe..5447837 100644 --- a/scripts/times.py +++ b/scripts/times.py @@ -44,7 +44,7 @@ def got_time(name): def check_have_time(changed, name): if not changed and not got_time(name): - changed = "no previous time" + changed = Fore.CYAN + "no previous time" + Fore.WHITE return changed def add_time(name, start):