INNER CODE UNIT · Python
import_presets
Zverik/every_door · tools/json_to_sqlite.py:219
def import_presets(cur, path: Optional[str]):
data = open_or_download(path, 'presets.min.json', False)
cur.execute("""create table presets (
name text primary key,
can_area integer,
add_tags text,
remove_tags text,
icon text,
match_score integer,
locations text
)""")
def is_point_geometry(row: dict) -> bool:
return ('geometry' in row and
('point' in row['geometry'] or 'vertex' in row['geometry']))
def skip_preset(name: str, row: dict) -> bool:
# Skip templates.