77version = "0.1.0"
88
99parser = argparse .ArgumentParser ()
10- parser .add_argument ("-st" ,
11- "--start" ,
12- help = "introduce you to dynamic" ,
13- action = "store_true" )
14-
15- parser .add_argument ("-s" ,
16- "--search" ,
17- help = "search a question on StackOverflow" ,
18- action = "store_true" )
19-
20- parser .add_argument ("-v" ,
21- "--version" ,
22- version = f"Dynamic-CLI version { version } " ,
23- action = 'version' )
24-
25-
26- parser .add_argument ("-n" ,
27- "--new" ,
28- help = "Opens browser to create new StackOverflow question." ,
29- const = True ,
30- metavar = "title (optional)" ,
31- nargs = "?" )
32-
33- parser .add_argument ("-file" ,
34- "--file" ,
35- help = "Save answer to a file" ,
36- action = "store_true" )
37-
38- parser .add_argument ("-c" ,
39- "--custom" ,
40- help = "Set a custom API key" ,
41- action = "store_true" )
42-
43- parser .add_argument ("-u" ,
44- "--update" ,
45- help = "Check updates for the application" ,
46- action = "store_true" )
47-
48- parser .add_argument ("-GET" ,
49- help = "Make a GET request to an API" ,
50- action = 'store_true' )
51-
52- parser .add_argument ("-POST" ,
53- help = "Make a POST request to an API" ,
54- action = 'store_true' )
55-
56- parser .add_argument ("-DELETE" ,
57- help = "Make a DELETE request to an API" ,
58- action = 'store_true' )
59-
60- parser .add_argument ("-p" ,
61- "--playbook" ,
62- help = "View and organise the playbook" ,
63- action = 'store_true' )
64-
65- parser .add_argument ("-no" ,
66- "--notion" ,
67- help = "\
10+ parser .add_argument (
11+ "-st" , "--start" , help = "introduce you to dynamic" , action = "store_true"
12+ )
13+
14+ parser .add_argument (
15+ "-s" , "--search" , help = "search a question on StackOverflow" , action = "store_true"
16+ )
17+
18+ parser .add_argument (
19+ "-v" , "--version" , version = f"Dynamic-CLI version { version } " , action = "version"
20+ )
21+
22+
23+ parser .add_argument (
24+ "-n" ,
25+ "--new" ,
26+ help = "Opens browser to create new StackOverflow question." ,
27+ const = True ,
28+ metavar = "title (optional)" ,
29+ nargs = "?" ,
30+ )
31+
32+ parser .add_argument (
33+ "-file" , "--file" , help = "Save answer to a file" , action = "store_true"
34+ )
35+
36+ parser .add_argument ("-c" , "--custom" , help = "Set a custom API key" , action = "store_true" )
37+
38+ parser .add_argument (
39+ "-u" , "--update" , help = "Check updates for the application" , action = "store_true"
40+ )
41+
42+ parser .add_argument ("-GET" , help = "Make a GET request to an API" , action = "store_true" )
43+
44+ parser .add_argument ("-POST" , help = "Make a POST request to an API" , action = "store_true" )
45+
46+ parser .add_argument (
47+ "-DELETE" , help = "Make a DELETE request to an API" , action = "store_true"
48+ )
49+
50+ parser .add_argument (
51+ "-p" , "--playbook" , help = "View and organise the playbook" , action = "store_true"
52+ )
53+
54+ parser .add_argument (
55+ "-no" ,
56+ "--notion" ,
57+ help = "\
6858 Login to your Notion account to save playbook.\
6959 Opens a browser window for you to login to\
7060 your Notion accout" ,
71- action = 'store_true' )
61+ action = "store_true" ,
62+ )
7263
7364ARGV = parser .parse_args ()
7465
7566search_flag = Search (ARGV )
7667
68+
7769def main ():
78- if ARGV .start :
79- print ('''\U0001F604 Hello and Welcome to Dynamic CLI
70+ if ARGV .start :
71+ print (
72+ """\U0001F604 Hello and Welcome to Dynamic CLI
8073 \U0001F917 Use the following commands to get started
8174 \U0001F50E Search on StackOverflow with '-s'
8275 \U0001F4C4 Open browser to create new Stack Overflow question with '-n [title(optional)]'
8376 \U0001F4C2 Save answer to a file with '-file'
8477 \U00002728 Know the version of Dynamic CLI with '-V'
8578 \U0001F609 See this message again with '-st'
8679 \U00002755 Get help with '-h'
87- ''' )
88- else :
89- search_flag .search_args ()
90-
91-
92-
80+ """
81+ )
82+ else :
83+ search_flag .search_args ()
0 commit comments