@@ -18,17 +18,18 @@ def create_table(name: str):
18
18
script_path text,
19
19
venv text,
20
20
venv_path text,
21
+ cmd text,
21
22
thumbnail_path text)""" )
22
23
23
24
conn .commit ()
24
25
conn .close ()
25
26
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 = "" ):
27
28
conn = sqlite3 .connect ("_temp_.db" )
28
29
c = conn .cursor ()
29
30
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 ))
32
33
33
34
conn .commit ()
34
35
conn .close ()
@@ -55,7 +56,7 @@ def read_to_run_script(table: str, script_name: str):
55
56
conn = sqlite3 .connect ("_temp_.db" )
56
57
c = conn .cursor ()
57
58
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 } \" " )
59
60
script_info = c .fetchone ()
60
61
61
62
conn .commit ()
@@ -67,7 +68,7 @@ def read_to_run_all_scripts(table: str):
67
68
conn = sqlite3 .connect ("_temp_.db" )
68
69
c = conn .cursor ()
69
70
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 } \" " )
71
72
script_info = c .fetchall ()
72
73
73
74
conn .commit ()
0 commit comments