Spaces:
Running
Running
File size: 556 Bytes
227e75d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from pathlib import Path
from datetime import datetime
class Settings:
DEFAULT_OUTPUT_DIR = Path("output")
TIMESTAMP_FORMAT = "%Y%m%d_%H%M%S"
@classmethod
def get_timestamp(cls) -> str:
return datetime.now().strftime(cls.TIMESTAMP_FORMAT)
@classmethod
def get_clone_dir(cls, timestamp: str) -> Path:
return cls.DEFAULT_OUTPUT_DIR / f"repo_clone_{timestamp}"
@classmethod
def get_output_file(cls, timestamp: str) -> Path:
return cls.DEFAULT_OUTPUT_DIR / f"scan_result_{timestamp}.txt"
|