MonitorProgress/config.py
2025-04-10 04:08:55 +04:00

31 lines
1.3 KiB
Python

import os
# --- Configuration ---
REPO_URL = "http://192.168.5.191:3000/LCI/MTN6" # Assuming same base URL for now? Needs clarification if varies per project.
BRANCH = "main" # Assuming same branch for all projects
# Define the root directory containing all project subdirectories
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
# PROJECTS_ROOT_DIR is one level up from SCRIPT_DIR if config.py is at the root
# If config.py is inside a 'src' folder, adjust accordingly. Assuming root for now.
PROJECTS_ROOT_DIR = os.path.join(SCRIPT_DIR, 'projects')
# Relative path within a project's repo to the SCADA views
# Remove project-specific prefix, utils.py will find the correct parent folder
VIEWS_DIR_RELATIVE = "com.inductiveautomation.perspective/views/Detailed-Views"
# Relative path within a project's base folder for extracted drawing text
# We will construct this as 'project_name/extracted_texts' within PROJECTS_ROOT_DIR
TEXT_OUTPUT_FOLDER_RELATIVE = "extracted_texts"
CHECK_INTERVAL_SECONDS = 60
# --- Column Names from CSV (Adjust if necessary) ---
CSV_ALIAS_COL = 'Alias'
CSV_PANEL_COL = 'Control Panel'
CSV_EQ_TYPE_COL = 'Equipment Type' # Optional, for details modal
CSV_CONV_TYPE_COL = 'Type of Conveyor' # Optional, for details modal
# --- Ensure Projects Root Directory Exists ---
os.makedirs(PROJECTS_ROOT_DIR, exist_ok=True)