mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-06-27 02:30:08 +00:00
15 lines
385 B
Python
15 lines
385 B
Python
![]() |
import sqlite3
|
||
|
import sys
|
||
|
from pathlib import Path
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
connection = sqlite3.connect(database=sys.argv[1])
|
||
|
|
||
|
query = None
|
||
|
script_path = (Path(__file__).parent / Path("create-sqlite-schema.sql")).resolve()
|
||
|
with open(script_path) as f:
|
||
|
query = f.read()
|
||
|
cursor = connection.cursor()
|
||
|
cursor.executescript(query)
|
||
|
connection.close()
|