typrtail
Tail or cat a file: make it look like someone is typing them.
For some processes I was monitoring, this was far more entertaining than just watching a tail -f
.
user@host ~$ tail -f /var/log/messages | typrtail
user@host ~$ wget -q -O - http://www.gutenberg.org/files/730/730.txt | head -n 20 | typrtail
Installation
user@host ~$ gem install typrtail
Configuration
typrtail
looks for $HOME/.typrtailrc
and if it exists, loads it. This file
is plain ruby, you can override any of the parameters any way you like…have
it your way.
# override some defaults, be faster with more errors!
$speed_adjust = 0.35 # was 1.0
$typo_prob = 35
$min_typo_prob = 15
# stop more abruptly when we hit a typo
$time_to_recognize_typo = 0.4 # was 0.3
FAQ
What good is this?
Come on, it’s just for fun.
Why’d you do this?
I was overworked and needed an escape.
Doesn’t this already exist?
Yeah, I’m sure it does, they’re probably better too, I needed a break.
It’s too slow, can you make it faster?
Yes, you can. It’s a plain Ruby program, open it up and take a look at the top, there are a lot of constants (yes, globals – gasp globals! I know, how awful!) that control things like the typing speed. Have at ’em!