style(cli): replace emojis and unicode symbols with standard brackets [+], [-], [*], [!]
This commit is contained in:
@@ -174,4 +174,4 @@ CSRF_TRUSTED_ORIGINS = ['https://yourdomain.com']
|
||||
|
||||
MIT License — see [LICENSE](LICENSE) for details.
|
||||
|
||||
**Prepared with ❤️ by [MohammadAmin Baranzehi](https://amin.baranzehi.com)**
|
||||
**Prepared by [MohammadAmin Baranzehi](https://amin.baranzehi.com)**
|
||||
|
||||
16
cli.py
16
cli.py
@@ -47,27 +47,27 @@ CYAN = "\033[96m"
|
||||
|
||||
|
||||
def info(msg: str) -> None:
|
||||
print(f" {CYAN}→{RESET} {msg}")
|
||||
print(f" {CYAN}[*]{RESET} {msg}")
|
||||
|
||||
|
||||
def success(msg: str) -> None:
|
||||
print(f" {GREEN}✔{RESET} {msg}")
|
||||
print(f" {GREEN}[+]{RESET} {msg}")
|
||||
|
||||
|
||||
def warn(msg: str) -> None:
|
||||
print(f" {YELLOW}⚠{RESET} {msg}")
|
||||
print(f" {YELLOW}[!]{RESET} {msg}")
|
||||
|
||||
|
||||
def error(msg: str) -> None:
|
||||
print(f" {RED}✘{RESET} {msg}")
|
||||
print(f" {RED}[-]{RESET} {msg}")
|
||||
|
||||
|
||||
def banner() -> None:
|
||||
print(f"""
|
||||
{BOLD}┌──────────────────────────────────────────────────────────┐
|
||||
│ HestiaCP + Django + Gunicorn — Deployment Engine │
|
||||
│ Prepared by MohammadAmin Baranzehi (amin.baranzehi.com) │
|
||||
└──────────────────────────────────────────────────────────┘{RESET}
|
||||
{BOLD}+----------------------------------------------------------+
|
||||
| HestiaCP + Django + Gunicorn - Deployment Engine |
|
||||
| Prepared by MohammadAmin Baranzehi (amin.baranzehi.com) |
|
||||
+----------------------------------------------------------+{RESET}
|
||||
""")
|
||||
|
||||
|
||||
|
||||
@@ -254,28 +254,29 @@ def print_report(report: DiagnosticReport) -> None:
|
||||
GREEN = "\033[92m"
|
||||
YELLOW = "\033[93m"
|
||||
RED = "\033[91m"
|
||||
CYAN = "\033[96m"
|
||||
BOLD = "\033[1m"
|
||||
|
||||
dc = report.domain_config
|
||||
print(f"\n{BOLD}╔══════════════════════════════════════════════════════╗{RESET}")
|
||||
print(f"{BOLD}║ Deployment Doctor — {dc.domain:<33}║{RESET}")
|
||||
print(f"{BOLD}╚══════════════════════════════════════════════════════╝{RESET}\n")
|
||||
print(f"\n{BOLD}+======================================================+{RESET}")
|
||||
print(f"{BOLD}| Deployment Doctor - {dc.domain:<32}|{RESET}")
|
||||
print(f"{BOLD}+======================================================+{RESET}\n")
|
||||
|
||||
status_icons = {
|
||||
DiagnosticStatus.OK: f"{GREEN}✔{RESET}",
|
||||
DiagnosticStatus.WARNING: f"{YELLOW}⚠{RESET}",
|
||||
DiagnosticStatus.CRITICAL: f"{RED}✘{RESET}",
|
||||
DiagnosticStatus.OK: f"{GREEN}[+]{RESET}",
|
||||
DiagnosticStatus.WARNING: f"{YELLOW}[!]{RESET}",
|
||||
DiagnosticStatus.CRITICAL: f"{RED}[-]{RESET}",
|
||||
}
|
||||
|
||||
for check in report.checks:
|
||||
icon = status_icons.get(check.status, "?")
|
||||
icon = status_icons.get(check.status, "[?]")
|
||||
print(f" {icon} {BOLD}{check.name}{RESET}: {check.message}")
|
||||
if check.suggestion:
|
||||
print(f" └─ suggestion: {check.suggestion}")
|
||||
print(f" [-] suggestion: {check.suggestion}")
|
||||
|
||||
print()
|
||||
if report.is_healthy:
|
||||
print(f" {GREEN}{BOLD}All checks passed! Your deployment is healthy.{RESET}\n")
|
||||
print(f" {GREEN}{BOLD}[+] All checks passed! Your deployment is healthy.{RESET}\n")
|
||||
else:
|
||||
c = report.critical_count
|
||||
w = report.warning_count
|
||||
|
||||
10
hdg
10
hdg
@@ -36,10 +36,10 @@ CYAN='\033[0;96m'
|
||||
BOLD='\033[1m'
|
||||
NC='\033[0m'
|
||||
|
||||
info() { echo -e " ${CYAN}→${NC} $*"; }
|
||||
success() { echo -e " ${GREEN}✔${NC} $*"; }
|
||||
warn() { echo -e " ${YELLOW}⚠${NC} $*"; }
|
||||
error() { echo -e " ${RED}✘${NC} $*"; }
|
||||
info() { echo -e " ${CYAN}[*]${NC} $*"; }
|
||||
success() { echo -e " ${GREEN}[+]${NC} $*"; }
|
||||
warn() { echo -e " ${YELLOW}[!]${NC} $*"; }
|
||||
error() { echo -e " ${RED}[-]${NC} $*"; }
|
||||
|
||||
# ── Self-installation to /usr/local/bin ───────────────────────────────────
|
||||
install_global_links() {
|
||||
@@ -189,7 +189,7 @@ SERVICE_NAME="gunicorn-${DOMAIN}"
|
||||
SERVICE_FILE="/etc/systemd/system/${SERVICE_NAME}.service"
|
||||
|
||||
if [ ! -d "$WEBDIR" ]; then
|
||||
error "Domain directory not found → $WEBDIR"
|
||||
error "Domain directory not found: $WEBDIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user