added config class to validate config entries

This commit is contained in:
venus
2026-04-07 02:04:00 -05:00
parent f0d2f18364
commit 09b4947e6e
4 changed files with 45 additions and 14 deletions

View File

@@ -1,12 +1,22 @@
# functions for commands needed
# src/commands.py
import os
from ctf.utils import state
from pathlib import path
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:
state.current_comp=comp
state.comp_dir=pathlib
# TODO archive the old competitions
if state.current_chal != chal:
state.current_chal=chal
print("challenge already set")
# TODO archive the old challenges
# TODO set the directory to challenge directory, with ignore option
# Read variables
# Initialize a challenge
## Copy files into directory
## add section to log