fakenews: link to post, less annoying link color
This commit is contained in:
parent
8668bbb375
commit
799212caa0
6
fakenews
6
fakenews
|
@ -11,7 +11,7 @@ accountsfile=".fakenews"
|
|||
outfile="/tmp/fakenews_out.html"
|
||||
numberOfTweets=5
|
||||
|
||||
echo '<html><head><title>News</title></head><body>' > $outfile
|
||||
echo '<html><head><title>News</title><style>a { color : black; } a:hover { color : red; } </style></head><body>' > $outfile
|
||||
|
||||
while read account; do
|
||||
echo "Fetching $account..."
|
||||
|
@ -19,8 +19,8 @@ while read account; do
|
|||
curl -H 'User-Agent:' -s "https://twitter.com/$account" |
|
||||
tscrape |
|
||||
head -n $numberOfTweets |
|
||||
awk -F '\t' '{$1 = strftime("%d-%m-%Y %H:%M:%S",$1); print "<dt>" $6 "</dt><dd>" $4 " <br><small>" $1 "</small></dd>"}' |
|
||||
sed 's/https:[^ ]*/<a href="&">&<\/a>/g' >> $outfile
|
||||
awk -F '\t' '{$1 = strftime("%d-%m-%Y %H:%M:%S",$1); print "<dt>" $6 "</dt><dd>" $4 " <br><small><a href=\"https://twitter.com/" $6 "/status/" $5 "\">" $1 "</a></small></dd>"}' |
|
||||
sed 's/[ ]\(https:[^ ]*\)/ <a href="\1">\1<\/a>/g' >> $outfile
|
||||
echo "</dl>" >> $outfile
|
||||
done < "$accountsfile"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user