Major step towards unification of the UI Implementation of the Back Feature, splitting of TUI files back into subfolders
This commit is contained in:
+8
-4
@@ -184,7 +184,7 @@ class Selector:
|
||||
print(colorText(f"✅ Included {len(selected)} item(s).", "green"))
|
||||
return selected
|
||||
elif mode == "e":
|
||||
print(colorText(f"🚫 Excluded {len(selected)} item(s).", "yellow"))
|
||||
print(colorText(f"👫 Excluded {len(selected)} item(s).", "yellow"))
|
||||
return [item for item in items if item not in selected]
|
||||
else:
|
||||
print(colorText("⚠️ Invalid mode. Returning all items.", "yellow"))
|
||||
@@ -279,7 +279,9 @@ class Selector:
|
||||
df = df[columns]
|
||||
|
||||
items = [row for _, row in df.iterrows()]
|
||||
label_func = lambda row: str(row.to_dict())
|
||||
|
||||
def label_func(row):
|
||||
return str(row.to_dict())
|
||||
|
||||
result = Selector._select_from_list(
|
||||
items,
|
||||
@@ -311,7 +313,9 @@ class Selector:
|
||||
df = df[columns]
|
||||
|
||||
items = df.to_dict("records")
|
||||
label_func = lambda row: " | ".join(str(row[col]) for col in df.columns)
|
||||
|
||||
def label_func(row):
|
||||
return " | ".join(str(row[col]) for col in df.columns)
|
||||
|
||||
# Show rows first
|
||||
print(colorText(header, "cyan"))
|
||||
@@ -346,7 +350,7 @@ class Selector:
|
||||
print(colorText(f"✅ Included {len(selected)} row(s).", "green"))
|
||||
return [pd.Series(row) for row in selected]
|
||||
elif mode == "e":
|
||||
print(colorText(f"🚫 Excluded {len(selected)} row(s).", "yellow"))
|
||||
print(colorText(f"👫 Excluded {len(selected)} row(s).", "yellow"))
|
||||
return [pd.Series(row) for row in items if row not in selected]
|
||||
else:
|
||||
print(colorText("⚠️ Invalid mode. Returning no rows.", "yellow"))
|
||||
|
||||
+3
-3
@@ -118,14 +118,14 @@ def setup():
|
||||
logging.debug(f"{name.capitalize()} directory ensured at: {path}")
|
||||
|
||||
# Load system config (immutable)
|
||||
system_config = load_system_config()
|
||||
load_system_config()
|
||||
|
||||
# Configure logging with system-defined log level
|
||||
log_level = get_system_value("LOG_LEVEL", str, "INFO")
|
||||
configure_logging(dirs["logs"], log_level)
|
||||
|
||||
# Load user config (mutable)
|
||||
user_config = load_user_config(dirs["config"])
|
||||
load_user_config(dirs["config"])
|
||||
|
||||
# Set up .env file - ONLY for WORKING_DIR (runtime-configurable value)
|
||||
env_path = base_dir / ".env"
|
||||
@@ -155,6 +155,6 @@ def setup():
|
||||
for subfolder in subfolders:
|
||||
subfolder_path = folder_path / subfolder
|
||||
subfolder_path.mkdir(parents=True, exist_ok=True)
|
||||
logging.debug(f" └─ '{subfolder}' subfolder created at: {subfolder_path}")
|
||||
logging.debug(f"'{subfolder}' subfolder created at: {subfolder_path}")
|
||||
|
||||
logging.info("✅ Setup complete")
|
||||
|
||||
Reference in New Issue
Block a user