-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcreate_config.py
47 lines (33 loc) · 948 Bytes
/
create_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
"""
import logging
import os
import sys
from pathlib import Path
# register parent dir as package source
mck_dir = Path(__file__).parent.parent.parent.parent / "makeconfig"
sys.path.append(str(mck_dir))
# configure env before staring makeconfig
os.environ["MKC_LOG_LVL"] = "INFO" # TODO doesn't work
from Versatile import Versatile
# configure logging
logger = logging.getLogger("create_config")
logger.setLevel(logging.DEBUG)
_handler = logging.StreamHandler()
_handler.setLevel(logging.DEBUG)
_handler.setFormatter(
logging.Formatter("[versatile][%(levelname)7s] %(asctime)s [%(name)20s] //%(message)s")
)
logger.addHandler(_handler)
def cook():
versatile = Versatile()
versatile.validate()
# logger.debug(
# "\n\n"
# "--- config.ocio -----------------\n\n"
# f"{versatile}"
# )
versatile.write_to_disk("../../config/config.ocio")
return
if __name__ == '__main__':
cook()