added architecture and switched to CLICK implementation
This commit is contained in:
@@ -1,27 +1,11 @@
|
||||
# src/main.py
|
||||
# Parses and calls commands
|
||||
|
||||
import argparse
|
||||
from os import setregid
|
||||
from pathlib import Path
|
||||
from ctf.utils import *
|
||||
|
||||
def set_arguments():
|
||||
parser = argparse.ArgumentParser( #type:ignore
|
||||
prog="ctf",
|
||||
description="A collection of cli tools to improve your ctf workflow",
|
||||
epilog="")
|
||||
parser.add_argument('action') # positional argument, action to be taken
|
||||
parser.add_argument('-c', '--count') # option that takes a value
|
||||
parser.add_argument('-v', '--verbose', action='store_true') # on/off flag
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
import ctf.commands as commands
|
||||
|
||||
|
||||
def main():
|
||||
args = set_arguments()
|
||||
print(args)
|
||||
commands.test()
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user