import pathlib

current = pathlib.Path(__file__).parent
root = current.parent

import sys
sys.path.append(str(root))

import assets

config_file = pathlib.Path("./005-test-config.json")

if config_file.is_file():
    config_file.unlink()

print("Creating config file.")
assets.config_generator(assets.app_config).save(config_file)
print()

print("Loading config file.")
config = assets.config_loader(assets.app_config).load(config_file).result
print()

print("Result:")
print(config)
print()

wait = input("Change config file, save it, and please enter: ")

print("Loading from config file.")
config_2 = assets.config_loader(assets.app_config).load(config_file).result
print()

print("Result:")
print(config_2)
print()

config_file.unlink()