feat: Add non-CANSLIM report filtering option to load_scanner_reports()
This commit is contained in:
parent
4be088c0b2
commit
d8658e9b8b
@ -30,7 +30,7 @@ def load_scanner_reports(scanner_type: str = None):
|
|||||||
# Get file creation time
|
# Get file creation time
|
||||||
created = datetime.fromtimestamp(file.stat().st_ctime)
|
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 scanner_type == "technical":
|
||||||
if not (file.name.startswith(("atr_ema_", "sunny_"))):
|
if not (file.name.startswith(("atr_ema_", "sunny_"))):
|
||||||
print(f"Skipping {file.name} - not a technical report") # Debug print
|
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_"):
|
if not file.name.startswith("canslim_"):
|
||||||
print(f"Skipping {file.name} - not a CANSLIM report") # Debug print
|
print(f"Skipping {file.name} - not a CANSLIM report") # Debug print
|
||||||
continue
|
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({
|
reports.append({
|
||||||
'name': file.name,
|
'name': file.name,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user