modify text box dimensions to accommodate longer station names
This commit is contained in:
parent
9a31c72f60
commit
8d313e16f1
|
@ -256,15 +256,15 @@ print_cvag_schedule()
|
|||
MYOUTPUT[$j]="${MYOUTPUT[$j]}\n\n\
|
||||
\t\t┌─────────────────────────┬────────────────────────────────┐ \n\
|
||||
\t\t│ ${STATION_NAME[$THIS_STATION_ID]}$(printf "%-$((24-${#STATION_NAME[$THIS_STATION_ID]}))s" "")│ Stand: $THISDATE $CACHE_WARN │\n\
|
||||
\t\t├────────────────────┬────┴┬───────────────────────────────┤\n"
|
||||
\t\t├─────────────┬─────┬─────┴────────────────────────────────┤\n"
|
||||
for ((i=0; i<"${#STATION_LINES[*]}"; i++)); do
|
||||
MILLIS=$((${STATION_ACTUAL_DEPARTURE[$i]} - STATION_NOW)); [ "$MILLIS" -lt 0 ] && MILLIS=0
|
||||
SEKS=$((MILLIS / 1000)); MINS=$((SEKS / 60)); SEKS=$((SEKS % 60))
|
||||
MYOUTPUT[$j]="${MYOUTPUT[$j]}\
|
||||
\t\t│$(printf "%-$((3-${#MINS}))s" "")$MINS min $(printf "%-$((2-${#SEKS}))s" "")$SEKS s │ $(printf "%-$((3-${#STATION_LINES[$i]}))s" "")${STATION_LINES[$i]} │ ${STATION_DESTINATIONS[$i]}$(printf "%-$((29-${#STATION_DESTINATIONS[$i]}))s" "") │\\n"
|
||||
\t\t│$(printf "%-$((3-${#MINS}))s" "")$MINS min $(printf "%-$((2-${#SEKS}))s" "")$SEKS s │ $(printf "%-$((3-${#STATION_LINES[$i]}))s" "")${STATION_LINES[$i]} │ ${STATION_DESTINATIONS[$i]}$(printf "%-$((36-${#STATION_DESTINATIONS[$i]}))s" "") │\\n"
|
||||
done
|
||||
MYOUTPUT[$j]="${MYOUTPUT[$j]}\
|
||||
\t\t└────────────────────┴─────┴───────────────────────────────┘"
|
||||
\t\t└─────────────┴─────┴──────────────────────────────────────┘"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue