Skip to content

Commit 3eb064e

Browse files
committed
chore: update UI helper functions and documentation
- Enhanced help header and footer functions with customizable line and center characters for improved visual clarity. - Updated `dnp` script description for better readability by reorganizing and rephrasing key points. - Adjusted command order in help output to maintain consistency. Issue 648
1 parent 700e12a commit 3eb064e

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

src/bin/dnp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ DOCUMENTATION_BUFFER_DNP=$( cat <<'EOF'
77
# A tool for managing Docker-based robotic projects
88
#
99
# What it does:
10-
# • Provide a dockerized environment for [Local|remote] development, deployment, CI-testings and runing slurm jobs
10+
# • Provide a containerized environment for development (local and remote), deployment,
11+
# continuous integration, runing slurm jobs and publishing source code for release.
1112
# • Support l4t/arm64 (jetson), darwin/arm64 (Mac OsX) and linux/x86 os and architecture
1213
# • Support nvidia GPU through nvidia-docker on both l4t/arm64 and linux/x86
1314
#
@@ -20,9 +21,9 @@ DOCUMENTATION_BUFFER_DNP=$( cat <<'EOF'
2021
# up Start containers
2122
# down Stop containers
2223
# run Run a command in a container
24+
# project Super project commands
2325
# config Show configuration
2426
# version Show DNP version
25-
# project Super project commands
2627
# help Show this help message
2728
#
2829
# Run 'dnp COMMAND --help' for more information on a command.

src/lib/commands/up.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function dnp::up_command() {
5555
# n2st::print_formated_script_header "${header_footer_name}" "${MSG_LINE_CHAR_BUILDER_LVL1}"
5656

5757
# ....Load dependencies........................................................................
58-
source "${DNP_LIB_PATH}/core/utils/load_super_project_config.bash" || return 1
58+
source "${DNP_LIB_PATH}/core/utils/load_super_project_config.bash" || return 1lysse962
5959
source "${DNP_LIB_PATH}/core/execute/up_and_attach.bash" || return 1
6060

6161
# ....Begin....................................................................................

src/lib/core/utils/ui.bash

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,27 @@ MSG_END_FORMAT="\033[0m"
1515
n2st::print_msg "test" 2>/dev/null >/dev/null || { echo -e "${MSG_ERROR_FORMAT}[DNP error]${MSG_END_FORMAT} The N2ST lib is not loaded!" ; exit 1 ; }
1616

1717
# ====Help/doc=====================================================================================
18+
_DNP_HELP_LINE_CHAR="."
19+
_DNP_HELP_LINE_CHAR="" # Note: This is not an 'dash' char. UTF-8: E2 94 80
20+
#_DNP_HELP_LINE_CHAR="━"
21+
#_DNP_HELP_LINE_CHAR="═" # Note: This is not an 'equal' char. UTF-8: E2 95 90
22+
#_DNP_HELP_LINE_CENTER_CHAR="▼"
23+
_DNP_HELP_LINE_CENTER_CHAR="❄︎"
1824
function dnp:help_header() {
1925
echo -n -e "${MSG_DIMMED_FORMAT}"
20-
n2st::draw_horizontal_line_across_the_terminal_window "-"
21-
# n2st::draw_horizontal_line_across_the_terminal_window "." | sed 's/.../\/../'
22-
# n2st::echo_centering_str "❄︎" "${MSG_DIMMED_FORMAT}" "."
23-
# n2st::echo_centering_str "" "${MSG_DIMMED_FORMAT}" "."
26+
# echo -e "▶︎"
27+
n2st::draw_horizontal_line_across_the_terminal_window "${_DNP_HELP_LINE_CHAR}"
28+
# n2st::draw_horizontal_line_across_the_terminal_window "${_DNP_HELP_LINE_CHAR}" | sed 's/───/\/──/'
29+
# n2st::echo_centering_str "❄${_DNP_HELP_LINE_CENTER_CHAR}" "${MSG_DIMMED_FORMAT}" "${_DNP_HELP_LINE_CHAR}"
2430
echo -n -e "${MSG_END_FORMAT}"
2531
}
2632

2733
function dnp::help_footer() {
2834
echo -n -e "${MSG_DIMMED_FORMAT}"
29-
n2st::draw_horizontal_line_across_the_terminal_window "-" | sed 's/----------$/-----❄︎---/'
30-
# n2st::draw_horizontal_line_across_the_terminal_window "." | sed 's/..........$/.....❄︎.../'
31-
# n2st::echo_centering_str "❄︎" "${MSG_DIMMED_FORMAT}" "-"
32-
# n2st::echo_centering_str "" "${MSG_DIMMED_FORMAT}" "."
35+
# n2st::draw_horizontal_line_across_the_terminal_window "${_DNP_HELP_LINE_CHAR}"
36+
# n2st::draw_horizontal_line_across_the_terminal_window "" | sed 's/──────$/─❄︎───/'
37+
# n2st::draw_horizontal_line_across_the_terminal_window " " | sed 's/ $/ ◀︎/'
38+
n2st::echo_centering_str "${_DNP_HELP_LINE_CENTER_CHAR}" "${MSG_DIMMED_FORMAT}" "${_DNP_HELP_LINE_CHAR}"
3339
echo -n -e "${MSG_END_FORMAT}"
3440
}
3541

0 commit comments

Comments
 (0)