fetches plans so far, TODO: prepare for going public: translate, comment

This commit is contained in:
2023-10-08 21:46:31 +02:00
parent 1eaaf7adc3
commit fe76845566
8 changed files with 722 additions and 0 deletions

23
builddb.py Normal file
View File

@@ -0,0 +1,23 @@
import sqlite3
con = sqlite3.connect('repertoire.db')
cursor = con.cursor()
def execute_sql_from_file(filename, cursor):
with open(filename) as sqlfile:
sqlcommands = sqlfile.read()
list_of_commands = sqlcommands.split(';')
for command in list_of_commands:
cursor.execute(command)
execute_sql_from_file('repertoire.sql', cursor)
execute_sql_from_file('komponist_innen.sql', cursor)
execute_sql_from_file('Werk.sql', cursor)
execute_sql_from_file('Satz.sql', cursor)
con.commit()
# cursor.execute('COMMIT')
con.close()