#!/bin/rc # 2016-10-17T19:57:29-0400 # Use with https://github.com/mattn/twty rfork en cd $home aux/stub -d $home/.config aux/stub -d $home/.config/twty bind -c $home/lib/twty.notreallysl $home/.config/twty if(~ $#* 0){ tweet=`{cat} if(! ~ $#tweet 0){ twty $"tweet exit } } fn format{ while(line=`{read}){ # old twty # echo $"line | tcs -t html | htmlfmt -l 9000 | uhtml echo $"line | sed 's/(\[0m|\[0;32;1m|\[0;37m)//g' echo } } if(~ $#* 0) twty | format if not{ switch($1){ case -d while(){ Kill twty | rc {twty | format} & sleep 60 } case -* twty $*(1-) | format case * twty $"* } }