@@ -18,17 +18,18 @@ def create_table(name: str):
1818 script_path text,
1919 venv text,
2020 venv_path text,
21+ cmd text,
2122 thumbnail_path text)""" )
2223
2324 conn .commit ()
2425 conn .close ()
2526
26- def add_script (table : str , script_name : str , script_path : str , thumbnail_path = "icons/default_thumbnail.jpg" , venv = str , venv_path = "" ):
27+ def add_script (table : str , script_name : str , script_path : str , thumbnail_path = "icons/default_thumbnail.jpg" , venv = str , venv_path = "" , cmd = "" ):
2728 conn = sqlite3 .connect ("_temp_.db" )
2829 c = conn .cursor ()
2930
30- c .execute (f"""INSERT INTO \" { table } \" (script_name, script_path, venv, venv_path, thumbnail_path)
31- VALUES (?, ?, ?, ?, ?)""" , (script_name , script_path , venv , venv_path , thumbnail_path ))
31+ c .execute (f"""INSERT INTO \" { table } \" (script_name, script_path, venv, venv_path, thumbnail_path, cmd )
32+ VALUES (?, ?, ?, ?, ?, ? )""" , (script_name , script_path , venv , venv_path , thumbnail_path , cmd ))
3233
3334 conn .commit ()
3435 conn .close ()
@@ -55,7 +56,7 @@ def read_to_run_script(table: str, script_name: str):
5556 conn = sqlite3 .connect ("_temp_.db" )
5657 c = conn .cursor ()
5758
58- c .execute (f"SELECT script_path, venv, venv_path FROM \" { table } \" WHERE script_name=\" { script_name } \" " )
59+ c .execute (f"SELECT script_path, venv, venv_path, cmd FROM \" { table } \" WHERE script_name=\" { script_name } \" " )
5960 script_info = c .fetchone ()
6061
6162 conn .commit ()
@@ -67,7 +68,7 @@ def read_to_run_all_scripts(table: str):
6768 conn = sqlite3 .connect ("_temp_.db" )
6869 c = conn .cursor ()
6970
70- c .execute (f"SELECT script_path, venv, venv_path FROM \" { table } \" " )
71+ c .execute (f"SELECT script_path, venv, venv_path, cmd FROM \" { table } \" " )
7172 script_info = c .fetchall ()
7273
7374 conn .commit ()
0 commit comments