INNER CODE UNIT · Python

build_fields

Zverik/every_door · tools/json_to_sqlite.py:161

    def build_fields(data: dict[str, dict]) -> Iterator[tuple]:
        bad_types = set([
            'access', 'cycleway',
            'wikidata', 'wikipedia', 'restrictions', 'structureRadio',
            'networkCombo', 'onewayCheck', 'directionalCombo',
        ])
        for name, row in data.items():
            # Some field types we just do not edit, or have different dedicated editing fields.
            if row['type'] in bad_types:
                continue

            if 'key' in row:
                key = row['key']
            elif 'keys' in row:
                key = '\\'.join(row['keys'])
            else:
                continue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…