new structure
This commit is contained in:
parent
677b80f521
commit
14d15c4dea
6
V4.py
6
V4.py
@ -47,6 +47,10 @@ parser.add_argument(
|
|||||||
"-r", "--risky", help="make the program faster, probably better risk of ban", dest="fast", action="store_true"
|
"-r", "--risky", help="make the program faster, probably better risk of ban", dest="fast", action="store_true"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"-c", "--config", help="Choose a specific config file", dest="fast", action="store_true"
|
||||||
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
CUSTOM_START = args.override
|
CUSTOM_START = args.override
|
||||||
LOG = args.log
|
LOG = args.log
|
||||||
@ -75,7 +79,7 @@ else:
|
|||||||
system("") # enable colors in windows cmd
|
system("") # enable colors in windows cmd
|
||||||
|
|
||||||
#reading configuration
|
#reading configuration
|
||||||
config_path = f"{path.abspath( path.dirname( __file__ ) )}/config.cfg"
|
config_path = f"{path.abspath( path.dirname( __file__ ) )}/user_data/config.cfg"
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(config_path)
|
config.read(config_path)
|
||||||
|
|
||||||
|
6
main.py
6
main.py
@ -3,7 +3,7 @@
|
|||||||
import configparser
|
import configparser
|
||||||
import os
|
import os
|
||||||
print
|
print
|
||||||
config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/config.cfg"
|
config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg"
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read(config_path)
|
config.read(config_path)
|
||||||
|
|
||||||
@ -66,14 +66,14 @@ def setup_comptes():
|
|||||||
else:
|
else:
|
||||||
print(t["finc"])
|
print(t["finc"])
|
||||||
break
|
break
|
||||||
f = open('./login.csv', "w")
|
f = open('./user_data/login.csv', "w")
|
||||||
for i in lc :
|
for i in lc :
|
||||||
f.write(i)
|
f.write(i)
|
||||||
f.close()
|
f.close()
|
||||||
print(t["ajout"])
|
print(t["ajout"])
|
||||||
|
|
||||||
#modifie le fichier de configuration
|
#modifie le fichier de configuration
|
||||||
edit_config_txt("logpath",f'{os.getcwd()}/login.csv')
|
edit_config_txt("logpath",f'{os.getcwd()}/user_data/login.csv')
|
||||||
|
|
||||||
|
|
||||||
def edit_config_txt(ligne, contenu):
|
def edit_config_txt(ligne, contenu):
|
||||||
|
Loading…
Reference in New Issue
Block a user