feat: Add non-CANSLIM report filtering option to load_scanner_reports()

This commit is contained in:
Bobby (aider) 2025-02-13 21:50:04 -08:00
parent 4be088c0b2
commit d8658e9b8b

View File

@ -30,7 +30,7 @@ def load_scanner_reports(scanner_type: str = None):
# Get file creation time
created = datetime.fromtimestamp(file.stat().st_ctime)
# If scanner_type is specified, filter based on actual naming patterns
# If scanner_type is specified, apply appropriate filtering
if scanner_type == "technical":
if not (file.name.startswith(("atr_ema_", "sunny_"))):
print(f"Skipping {file.name} - not a technical report") # Debug print
@ -39,6 +39,10 @@ def load_scanner_reports(scanner_type: str = None):
if not file.name.startswith("canslim_"):
print(f"Skipping {file.name} - not a CANSLIM report") # Debug print
continue
elif scanner_type == "non_canslim": # New option for non-CANSLIM reports
if file.name.startswith("canslim_"):
print(f"Skipping {file.name} - is a CANSLIM report") # Debug print
continue
reports.append({
'name': file.name,