05-presentation.txt (694B)
1 2 DIAPOSISHELL 3 How to write a presentation quickly? 4 5 ## Create the content 6 7 - Write the whole presentation in a single text file 8 - Use a hand-crafted markup language that is easy to analyse 9 10 ## Setup your slides 11 12 - Use csplit(1) to generate one text file per slide 13 14 csplit -f slide 05-presentation.txt \ 15 /^\#/ {$(($(grep -ce "^#" 05-presentation.txt)-1))} 16 17 - If necessary, apply a style to the extracted slides 18 19 find . -name "slide[0-9][0-9]" | while read -r i; do \ 20 sed -e 's/^## \(.\{1,\}\)$/[1;34m\1[m/' "${i}">"${i}.tmp"; \ 21 mv "${i}.tmp" "${i}"; \ 22 done 23 24 ## Run the presentation 25 26 diaposishell slide[0-9][0-9]