Beispiel #1
0
def addCtx(p_cwd, a_ctx):
    p_cnf = os.path.join(p_cwd, n_cnf)
    cnf = dckrjsn.read_json(p_cnf, sch = s_cnf)

    a_ctx.append({
        'p_cwd': p_cwd,
        'cnf': cnf
    })
Beispiel #2
0
def recursiveCtx_i(p_cwd, a_ctx):
    p_sub = os.path.join(p_cwd, n_sub)
    a_sub = dckrjsn.read_json(p_sub, sch = s_sub)

    for sub in a_sub:
        if 'folder' in sub:
            p_cwd_nxt = os.path.join(p_cwd, sub['folder'])
            recursiveCtx_i(p_cwd_nxt, a_ctx)
        else:
            addCtx(p_cwd, a_ctx)
Beispiel #3
0
import importlib

cli = None

p_cwd_top = None

n_cnf = 'dckrcnf.json'
n_sub = 'dckrsub.json'
n_s_cnf = 'dckrcnf.schema.json'
n_s_sub = 'dckrsub.schema.json'

p_src = os.path.dirname(os.path.abspath(__file__))
p_s_cnf = os.path.join(p_src, n_s_cnf)
p_s_sub = os.path.join(p_src, n_s_sub)

s_cnf = dckrjsn.read_json(p_s_cnf)
s_sub = dckrjsn.read_json(p_s_sub)

m_cmd = {}

def addCtx(p_cwd, a_ctx):
    p_cnf = os.path.join(p_cwd, n_cnf)
    cnf = dckrjsn.read_json(p_cnf, sch = s_cnf)

    a_ctx.append({
        'p_cwd': p_cwd,
        'cnf': cnf
    })

def recursiveCtx_i(p_cwd, a_ctx):
    p_sub = os.path.join(p_cwd, n_sub)