diff --git a/example b/example index 8a1c7d4..59316dd 100644 --- a/example +++ b/example @@ -2,7 +2,7 @@ center ================================================================= ___ _ ___ _ _ _ | _ ) __ _ __| |_ / __| (_)__| |___ ___ -| _ \/ _` (_-< ' \ \__ \ | / _` / -_|_-< +| _ \/ _' (_-< ' \ \__ \ | / _' / -_|_-< |___/\__,_/__/_||_| |___/_|_\__,_\___/__/ @@ -38,7 +38,7 @@ Supported slide styles are: • Section – Chapter / section division slide code bash ============================================================== -# Uses `highlight` for code highlighting +# Uses 'highlight' for code highlighting for (( i = 0; i < nr_lines; i++ )); do for (( j = 0; j < filler; j++ )); do @@ -75,15 +75,19 @@ ASCII art ¯\_(ツ)_/¯ Also not to forget FontAwesome!    block ================================================================== -`figlet` and `showfigfonts` are good commands +'figlet' and 'showfigfonts' are good commands to create a nice looking ASCII art headings. ___ __ ___________ __ / _ )___ ____ / / / __/_ __/ | /| / / - / _ / _ `(_-$ figlet -f smslant $ figlet -f small +block ================================================================== +# Generated text by cmd +`ls -l` + section ================================================================ That's all folks! diff --git a/slides b/slides index 8e170b9..5997438 100755 --- a/slides +++ b/slides @@ -28,8 +28,18 @@ for (( i = 0; i < NR_FORMATTING; i += 2 )); do SED_REPLACE+=" -e s/${FORMATTING[i]}/${FORMATTING[i + 1]}/g" done -file="${1:-example}" +SED_REPLACE_CMD="s/\`\(.*\)\`/\1/e" +TMP_FILE="/tmp/file_replace_cmd" + +replace_commands() { + sed ${SED_REPLACE_CMD} "$file" > $TMP_FILE + if [ $? == 0 ]; then + file=$TMP_FILE + fi +} +file="${1:-example}" +replace_commands prepare_terminal() { # Get terminal values, clean terminal and remove cursor @@ -46,6 +56,9 @@ restore_terminal() { tput cnorm } +remove_tmp_files() { + rm $TMP_FILE +} read_slides() { local i=0 @@ -369,5 +382,6 @@ while true; do fi done +remove_tmp_files show_mouse_cursor restore_terminal