added architecture and switched to CLICK implementation

This commit is contained in:
venus
2026-07-13 22:32:20 -05:00
parent 4b16a69b1a
commit 58351e1086
6 changed files with 84 additions and 19 deletions

View File

@@ -1,9 +1,12 @@
# functions for commands needed
# src/commands.py
from pathlib import path
# from pathlib import path
import click
@click.command()
def test():
print("hello from test")
def Set_Challenge(comp: str, chal: str, setDirectory: bool):
# set the current challenge and competition from input
if state.current_comp != comp:

View File

@@ -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()