INNER CODE UNIT · Python

cell

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

    def cell(s):
        return "`" + s.replace("|", "\\|") + "`"

    out = [
        "| table | key | type | default | values | applies to |",
        "|---|---|---|---|---|---|",
    ]
    for table in TABLE_ORDER:
        for name, typ, default, values, applies, desc, _ in rows[table]:
            out.append(f"| `{table}` | `{name}` | {cell(typ)} | {cell(default)} "
                       f"| {cell(values)} | {applies} |")
    return "\n".join(out)


def render_reftoml(rows):
    out = [
        "# config.toml — REFERENCE. Lists every key the parser reads, grouped by",
        "# table, with type / default / valid values / applies-to. This file is a",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…