Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ center =================================================================

___ _ ___ _ _ _
| _ ) __ _ __| |_ / __| (_)__| |___ ___
| _ \/ _` (_-< ' \ \__ \ | / _` / -_|_-<
| _ \/ _' (_-< ' \ \__ \ | / _' / -_|_-<
|___/\__,_/__/_||_| |___/_|_\__,_\___/__/


Expand Down Expand Up @@ -38,7 +38,7 @@ Supported slide styles are:
• <b>Section<r> – 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
Expand Down Expand Up @@ -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.

___ __ ___________ __
/ _ )___ ____ / / / __/_ __/ | /| / /
/ _ / _ `(_-</ _ \ / _/ / / | |/ |/ /
/ _ / _ '(_-</ _ \ / _/ / / | |/ |/ /
/____/\_,_/___/_//_/ /_/ /_/ |__/|__/

<G>$<r> figlet -f smslant <G>$<r> figlet -f small

block ==================================================================
# Generated text by cmd
`ls -l`

section ================================================================
That's all folks!
16 changes: 15 additions & 1 deletion slides
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,6 +56,9 @@ restore_terminal() {
tput cnorm
}

remove_tmp_files() {
rm $TMP_FILE
}

read_slides() {
local i=0
Expand Down Expand Up @@ -369,5 +382,6 @@ while true; do
fi
done

remove_tmp_files
show_mouse_cursor
restore_terminal