First pass at link announcing.

This commit is contained in:
Storm Dragon committed 2016-09-04 17:22:05 -04:00
1 parent 4f525e713f
commit 3fcf1c280f
4 files changed
+25 -5

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
[ -f functions.sh ] && source functions.sh
for l in $3 ; do
if [[ "$l" =~ http://|https://|www\.* ]]; then
pageTitle="$(curl -s "$l" | grep "<title>" | sed 's#\(</\|</\)title>##g')"
shortLink="${l#*://}"
shortLink="${shortLink%%/*}"
msg "$2" "$pageTitle at $shortLink"
fi
done