#! /opt/bin/dash title="Quantum Computing & Cryptography" # slide separator pattern # br="
---
" # get last slide number # n=$(grep "$br" notes.html | wc -l) # previous file # en="$n" es=$(printf "%.4d" "$en") e="$es.html" # current file # fn="0" fs="0000" f="$fs.html" # next file # gn="1" gs="0001" g="$gs.html" # function to print arrows # w="width=20 height=22 align=middle alt=\"\"" # print_arrows() { echo " " } # function to print header # print_header() { echo "$title " print_arrows echo "  $title  " echo "
010000101110011010100111101101101110100110111111000010101000100110101001101110101101100010100111100000111111010010100001101000101011111111100010101100111111100000101011011110011010101101111111
" return m=0 while [ "$m" -le "$n" ]; do if [ "$m" -eq "$fn" ]; then echo "$m" else ms=$(printf "%.4d" "$m") echo "$m" fi m=$((m + 1)) done } rm -f 00*.html exec < "notes.html" echo "${0}: creating file $f" 1>&2 exec > "$f" print_header while read -r line do # echo "line = $line" 1>&2 # DEBUG line=$(echo "$line" | sed 's/^~/ /') if [ "$line" = "$br" ]; then echo "" # en="$fn"; es="$fs"; e="$f" fn="$gn"; fs="$gs"; f="$g" if [ "$gn" -eq "$n" ]; then gn="0" else gn=$((gn + 1)) fi gs=$(printf "%.4d" "$gn") g="$gs.html" # echo "${0}: creating file $f" 1>&2 exec > "$f" print_header elif [ "$line" = "" ]; then print_arrows else echo "$line" | sed 's/~/ /g' fi done echo "" exec 1>&2 weblint -x microsoft 00*.html #weblint 00*.html