feat: Refactor help command output for improved readability and formatting

This commit is contained in:
Peter Wood
2026-03-07 10:59:00 -05:00
parent 2bae9bc6ce
commit 8e7e22a1a3

View File

@@ -775,27 +775,27 @@ show_help() {
echo -e "${BOLD}${WHITE}Usage:${RESET} ${CYAN}${SCRIPT_NAME}${RESET} ${YELLOW}<command>${RESET}" echo -e "${BOLD}${WHITE}Usage:${RESET} ${CYAN}${SCRIPT_NAME}${RESET} ${YELLOW}<command>${RESET}"
echo "" echo ""
echo -e "${BOLD}${WHITE}Available Commands:${RESET}" echo -e "${BOLD}${WHITE}Available Commands:${RESET}"
echo -e " ${GREEN}${BOLD}start${RESET} ${ROCKET} Start Plex Media Server" printf " ${GREEN}${BOLD}%-18s${RESET} %s %s\n" "start" "${ROCKET}" "Start Plex Media Server"
echo -e " ${YELLOW}${BOLD}stop${RESET} ${STOP_SIGN} Stop Plex Media Server" printf " ${YELLOW}${BOLD}%-18s${RESET} %s %s\n" "stop" "${STOP_SIGN}" "Stop Plex Media Server"
echo -e " ${BLUE}${BOLD}restart${RESET} ${RECYCLE} Restart Plex Media Server" printf " ${BLUE}${BOLD}%-18s${RESET} %s %s\n" "restart" "${RECYCLE}" "Restart Plex Media Server"
echo -e " ${CYAN}${BOLD}status${RESET} ${INFO} Show detailed service status" printf " ${CYAN}${BOLD}%-18s${RESET} %s %s\n" "status" "${INFO}" "Show detailed service status"
echo -e " ${PURPLE}${BOLD}scan${RESET} ${SPARKLES} Library scanner operations" printf " ${PURPLE}${BOLD}%-18s${RESET} %s %s\n" "scan" "${SPARKLES}" "Library scanner operations"
echo -e " ${RED}${BOLD}repair${RESET} [!] Repair database corruption issues" printf " ${RED}${BOLD}%-18s${RESET} %s %s\n" "repair" "[!]" "Repair database corruption issues"
echo -e " ${RED}${BOLD}nuclear${RESET} [!!] Nuclear database recovery (last resort)" printf " ${RED}${BOLD}%-18s${RESET} %s %s\n" "nuclear" "[!!]" "Nuclear database recovery (last resort)"
echo -e " ${CYAN}${BOLD}backups${RESET} [#] List and manage database backup files" printf " ${CYAN}${BOLD}%-18s${RESET} %s %s\n" "backups" "[#]" "List and manage database backup files"
echo -e " ${GREEN}${BOLD}install-dbrepair${RESET} Install or update DBRepair tool" printf " ${GREEN}${BOLD}%-18s${RESET} %s %s\n" "install-dbrepair" "[+]" "Install or update DBRepair tool"
echo -e " ${PURPLE}${BOLD}help${RESET} [*] Show this help message" printf " ${PURPLE}${BOLD}%-18s${RESET} %s %s\n" "help" "${HOURGLASS}" "Show this help message"
echo "" echo ""
echo -e "${DIM}${WHITE}Examples:${RESET}" echo -e "${DIM}${WHITE}Examples:${RESET}"
echo -e " ${DIM}${SCRIPT_NAME} start # Start the Plex service${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} start" "Start the Plex service"
echo -e " ${DIM}${SCRIPT_NAME} status # Show current status${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} status" "Show current status"
echo -e " ${DIM}${SCRIPT_NAME} scan # Launch library scanner interface${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} scan" "Launch library scanner interface"
echo -e " ${DIM}${SCRIPT_NAME} repair # Fix database issues${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} repair" "Fix database issues"
echo -e " ${DIM}${SCRIPT_NAME} nuclear # Complete database replacement${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} nuclear" "Complete database replacement"
echo -e " ${DIM}${SCRIPT_NAME} backups # List and manage DB backups${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} backups" "List and manage DB backups"
echo -e " ${DIM}${SCRIPT_NAME} backups delete # Interactive backup deletion${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} backups delete" "Interactive backup deletion"
echo -e " ${DIM}${SCRIPT_NAME} backups delete --name foo # Delete by name pattern${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} backups delete --name foo" "Delete by name pattern"
echo -e " ${DIM}${SCRIPT_NAME} install-dbrepair # Install/update DBRepair${RESET}" printf " ${DIM}%-40s # %s${RESET}\n" "${SCRIPT_NAME} install-dbrepair" "Install/update DBRepair"
echo "" echo ""
} }