INNER CODE UNIT · Python
import_fields
Zverik/every_door · tools/json_to_sqlite.py:144
def import_fields(cur, path: Optional[str]):
data = open_or_download(path, 'fields.min.json', False)
cur.execute("""create table fields (
name text primary key,
key text,
typ text,
label text,
placeholder text,
options text,
custom_values integer default 1,
universal integer default 0,
snake_case integer default 1,
min_value integer,
prerequisite text,
locations text
)""")
def build_fields(data: dict[str, dict]) -> Iterator[tuple]: