Skip to content

scripts/insert_settore_from_excel_corrected.py

Overview

This file contains 3 documented elements.

Functions

insert_settore_values(cursor)

Inserisce i valori settore dal file Excel con relazioni alle aree.

Parameters: - cursor

main()

No description available. Connects to the pyarchinit plugin SQLite database located at the default QGIS3 profile path and invokes insert_settore_values to populate sector entries from an Excel source. After committing the transaction, it queries the pyarchinit_thesaurus_sigle table to print a summary of sector counts grouped by parent area for records matching tipologia_sigla = '10.15' and nome_tabella = 'TMA materiali archeologici'. Returns 0 on success or 1 if the database file is not found or a sqlite3.Error is raised, rolling back the transaction in the latter case.