INNER CODE UNIT · Python

extract

toyota-connected/ivi-homescreen · scripts/gen_config_reference.py:193

def extract():
    keys = {}
    text = CFG.read_text()
    for m in re.finditer(r'at_path\("([^"]+)"\)\s*\.\s*(is_\w+)\(\)', text):
        key, t = m.group(1), m.group(2)
        if key == "view":
            continue
        keys.setdefault(key, TYPE.get(t, t))
    # [sentry] keys (different parse style in crash_handler/crash_handler.cc)
    crash = CRASH.read_text()
    sentry_section = crash[crash.find('get("sentry")'):]
    for m in re.finditer(r'get\("([^"]+)"\)', sentry_section):
        k = m.group(1)
        if k == "sentry":
            continue
        keys.setdefault("sentry." + k, "string")
    # [view.output] entries are read through a table helper (ParseOutputMatch
    # reads t["<field>"]), and [[view.output]] arrays iterate the node, so the

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…