Thursday, December 18, 2014

Slow reader.


When I was young, we were fortunate that one of the classes we had to attend was learning to speed read. To have access to that software today can be very expensive. Here, we can sort of emulate that old software with a simple shell file program.



You can also build a teleprompter so you can create your own sort newsreader setup. Then you can have your own news show so the video can be uploaded to say Youtube or the like.



The code is very short and works extremely wel with short paragraphs. To invoke the software you will need the name of the file to be read and the delay to be used to determine the speed of the text to be displayed. You might want to start with .5 and then you can adjust as needed.


$ ./asciitextrdr.sh  asciifile2bread .5

[code]
#!/bin/sh

# A program to slowly cat file or standard input.

if [ "$1" ] ; then
    file="$1"
else
    file="-"
fi
cat "$file" | while read c ; do
echo  "$c"
sleep  $2
done

]/code]

No comments:

Post a Comment