aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgutmet <me.git@gutmet.org>2020-06-02 08:21:14 +0200
committergutmet <me.git@gutmet.org>2020-06-02 08:21:14 +0200
commit7caa57454c3863c8ccd9fc0a55882e294ed482c7 (patch)
tree59b8bfe5edae30b533685bc15296e1ded43d445b
parentf735872d701258a8699a1f8b593c759be85dff67 (diff)
downloadsnippets-7caa57454c3863c8ccd9fc0a55882e294ed482c7.tar.gz
twitter becomes more useless every day...
-rwxr-xr-xfakenews30
1 files changed, 0 insertions, 30 deletions
diff --git a/fakenews b/fakenews
deleted file mode 100755
index 82d29b4..0000000
--- a/fakenews
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-#########################################################
-# fakenews ##
-# create an html digest of watched twitter accounts ##
-# with https://codemadness.org/git/tscrape/ and gawk ##
-#########################################################
-
-cd
-# keep one twitter account per line in here
-accountsfile=".fakenews"
-outfile="/tmp/fakenews_out.html"
-numberOfTweets=5
-
-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..."
- echo "<h3>$account</h3><dl>" >> $outfile
- 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><a href=\"https://twitter.com/" $6 "/status/" $5 "\">" $1 "</a></small></dd>"}' |
- sed 's/\([^"]\)\(https:[^ ]*\)/\1<a href="\2">\2<\/a>/g' |
- sed 's/>\(https:[^<]*.jpg\)/>PIC/g' >> $outfile
- echo "</dl>" >> $outfile
-done < "$accountsfile"
-
-echo '</body></html>' >> $outfile
-xdg-open $outfile