diff --git a/fakenews b/fakenews new file mode 100755 index 0000000..268cab0 --- /dev/null +++ b/fakenews @@ -0,0 +1,25 @@ +#!/bin/bash + +######################################################### +# fakenews ## +# create an html digest of watched twitter accounts ## +# with https://codemadness.org/git/tscrape/ and gawk ## +######################################################### + +# keep one twitter account per line in here +accountsfile=".fakenews" +outfile="/tmp/fakenews_out.html" + +echo 'News' > $outfile + +while read account; do + echo "

$account

" >> $outfile + curl -H 'User-Agent:' -s "https://twitter.com/$account" | + tscrape | + awk -F '\t' '{$1 = strftime("%d-%m-%Y %H:%M:%S",$1); print "
" $6 "
" $4 " " $1 "
"}' | + sed 's/https:[^ ]*/&<\/a>/g' >> $outfile + echo "
" >> $outfile +done < "$accountsfile" + +echo '' >> $outfile +xdg-open $outfile