osu-wayback/import_database.py

21 lines
323 B
Python
Raw Normal View History

2019-03-11 07:27:54 +01:00
if __name__ != "__main__":
print("This is not a module")
exit()
import sys
import sqlite3
if len(sys.argv) < 2:
print("Missing database import file")
exit()
sql = sqlite3.connect("wayback.db")
cur = sql.cursor()
with open(sys.argv[1], "r") as f:
cur.executescript( f.read() )
2019-03-11 11:04:06 +01:00
sql.commit()
2019-03-11 07:27:54 +01:00
cur.close()
sql.close()