all repos — shlide @ bd9835c3ee3fd4abdbf3e82d08fd8410c96404ad

slide deck presentation tool written in pure bash

improve centering on highlighted slides
Akshay nerdypepper@tuta.io
Mon, 03 Feb 2020 00:04:59 +0530
commit

bd9835c3ee3fd4abdbf3e82d08fd8410c96404ad

parent

ccc315bc69282c88dcb29fb3a187eacd53caf5b3

2 files changed, 7 insertions(+), 4 deletions(-)

jump to
M example/1-hi.txtexample/1-hi.txt

@@ -1,8 +1,8 @@

HI THERE -Welcome to ${GRN}shlide${RST}. Here are a few bullet points: +Welcome to ${GRN}shlide${RST}. ${YLW}Here${RST} are a few bullet points: - first point - second point * sub point - * another sub point + * ${RED}another${RST} sub point
M shlideshlide

@@ -20,9 +20,12 @@ printf '%s\n' "${#lines[@]}"

} longest_line() { - max=0 IFS= + max=0 + local IFS= while read -r line; do - if [ "${#line}" -gt "$max" ]; then max="${#line}"; fi + l=$(ansi_filter $(colorify "$line")) + echo "$l" >> log.txt + if [ "${#l}" -gt "$max" ]; then max="${#l}"; fi done < "$1" printf '%s\n' "$max" }