Module and trigger updates and fixes.

This commit is contained in:
Storm Dragon
2016-09-08 12:16:59 -04:00
parent 37ee1352fd
commit 6580610e29
4 changed files with 8 additions and 5 deletions

View File

@ -2,11 +2,11 @@
curl="$(command -v curl)"
for l in $3 ; do
if [[ "$l" =~ http://|https://|www\.*.* ]]; then
pageTitle="$($curl -Ls "${l/#:/}" | grep "<title>" | html2text | tr '[:space:]' ' ')"
if [[ "${l#:}" =~ http://|https://|www\.*\.* ]]; then
pageTitle="$($curl -Ls "${l#:}" | grep "<title>" | html2text | tr -s '[:space:]' ' ')"
shortLink="${l#*://}"
shortLink="${shortLink%%/*}"
if ! [[ "$pageTitle" =~ \ + ]]; then
if [ ${#pageTitle} -gt 1 ]; then
msg "$2" "$pageTitle at $shortLink"
fi
fi