-
Notifications
You must be signed in to change notification settings - Fork 0
/
pySeccy.py
executable file
·50 lines (36 loc) · 1.36 KB
/
pySeccy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python
import sys
from seccyfn import *
USAGE = "usage: pySeccy name\n\
pySeccy [-h] [-fc NAME] [-fb NAME] [-l]\n\n\
optional arguments:\n\
-h, --help show this help message and exit\n\n\
-fc, --force-classic compute Section ID\n\
for PSO V1\\V2\\PC\\GC only\n\n\
-fb, --force-bb compute Section ID\n\
for PSO Blue Burst only\n\n\
-l, --loop enter one name after the other\n\
type-in the word 'quit' to leave\n"
argNum = len(sys.argv)
arg = sys.argv
if (argNum == 2):
LOOP = True if ((arg[1] == '-l') or (arg[1] == '--loop')) else False
HELP = True if ((arg[1] == '-h') or (arg[1] == '--help')) else False
FORCE_CLASSIC = True if ((arg[1] == '-fc') or (arg[1] == '--force-classic')) else False
FORCE_BB = True if ((arg[1] == '-fb') or (arg[1] == '--force-bb' )) else False
if LOOP:
while True:
loopMode()
exit()
elif not (HELP or FORCE_CLASSIC or FORCE_BB):
basicMode(arg[1])
else: print(USAGE)
elif (argNum == 3):
FORCE_CLASSIC = True if ((arg[1] == '-fc') or (arg[1] == '--force-classic')) else False
FORCE_BB = True if ((arg[1] == '-fb') or (arg[1] == '--force-bb' )) else False
if FORCE_CLASSIC:
classicMode(arg[2])
elif FORCE_BB:
bbMode(arg[2])
else: print(USAGE)
else: print(USAGE)