Files
Autoparts-DB/console/config.py
2026-02-15 01:29:54 +00:00

40 lines
1.2 KiB
Python

"""
Configuration settings for the AUTOPARTES console application.
"""
import os
# Application metadata
VERSION = "1.0.0"
APP_NAME = "AUTOPARTES"
APP_SUBTITLE = "Sistema de Catalogo de Autopartes"
# Database path (relative to the console/ directory, resolved to absolute)
_CONSOLE_DIR = os.path.dirname(os.path.abspath(__file__))
DB_PATH = os.path.join(_CONSOLE_DIR, "..", "vehicle_database", "vehicle_database.db")
DB_PATH = os.path.normpath(DB_PATH)
# NHTSA VIN Decoder API
NHTSA_API_URL = "https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVin"
VIN_CACHE_DAYS = 30
# Display defaults
DEFAULT_MODE = "vt220"
PAGE_SIZE = 15
# VT220 color pairs: (foreground, background)
# These map to curses color pair indices used by the renderer.
COLORS_VT220 = {
"header": ("green", "black"),
"footer": ("black", "green"),
"normal": ("green", "black"),
"highlight": ("black", "green"),
"border": ("green", "black"),
"title": ("white", "black"),
"error": ("red", "black"),
"info": ("cyan", "black"),
"field_label": ("green", "black"),
"field_value": ("white", "black"),
"field_active": ("black", "cyan"),
}