This repository was archived by the owner on Sep 24, 2025. It is now read-only. 
      
File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 44import  sqlparse 
55import  os 
66import  argparse 
7- import  mysql .connector 
7+ # import mysql.connector
88
99# === CONFIGURATION === 
1010ADMIN_FILE  =  'admin.sqlite' 
@@ -159,6 +159,7 @@ def connect_to_database(db_path):
159159 print (f"\n ❌ Error connecting to database: { e }  " )
160160 return  None 
161161def  connect_to_database (db_info ):
162+  import  mysql .connector 
162163 try :
163164 args  =  {
164165 'db' : db_info ['database' ],
@@ -299,7 +300,13 @@ def my_database_procedure(connection, db_info):
299300 print (f"\n ✅ Inserted { item_id  -  ITEM_START_ID }   items and { field_id  -  FIELD_START_ID }   fields." )
300301
301302def  main ():
302-  parser  =  argparse .ArgumentParser (description = 'Connect to MySQL database.' )
303+  parser  =  argparse .ArgumentParser (
304+  description = """Install jam.py-v7 and create a new project with jam-project.py! 
305+ 
306+  Then run this script to connect to a MySQL database, list its tables,  
307+  and scaffold Jam.py V7 front-end.""" ,
308+  formatter_class = argparse .RawTextHelpFormatter 
309+  )
303310 parser .add_argument ('--database' , required = True , help = 'Database name' )
304311 parser .add_argument ('--user' , required = True , help = 'Username' )
305312 parser .add_argument ('--password' , required = True , help = 'Password' )
Original file line number Diff line number Diff line change @@ -426,7 +426,11 @@ def my_database_procedure(db_info):
426426def  main ():
427427 global  args  # Declare it global so it modifies the outer 'args' 
428428 parser  =  argparse .ArgumentParser (
429-  description = "Connect to a SQLite database, list its tables and scaffold Jam.py V7 front-end." 
429+  description = """Install jam.py-v7 and create a new project with jam-project.py! 
430+ 
431+  Then run this script to connect to a SQLite database, list its tables,  
432+  and scaffold Jam.py V7 front-end.""" ,
433+  formatter_class = argparse .RawTextHelpFormatter 
430434 )
431435 parser .add_argument ('--db' , required = True , help = 'Database name' )
432436 parser .add_argument ('--prefix' , default = '' , help = 'Tables name prefix to remove for Captions' )
                                 You can’t perform that action at this time. 
               
                  
0 commit comments