From 2f13552fb2492c034166e4db00dfd1929e850609 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sat, 14 Nov 2020 21:46:05 +0000 Subject: [PATCH] Removed the pandoc dependency from the link trigger. --- triggers/link/link.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/triggers/link/link.sh b/triggers/link/link.sh index 93bdc86..fe35d9f 100755 --- a/triggers/link/link.sh +++ b/triggers/link/link.sh @@ -3,7 +3,7 @@ for l in $3 ; do text="${l#:}" if [[ "${text}" =~ http://|https://|www\..* ]]; then -pageTitle="$(curl -L -s --connect-timeout 5 "$text" | sed -n -e 'H;${x;s!.*]*>\(.*\).*!\1!;T;s!.*\(.*\).*!\1!p}' | pandoc -t plain | tr '[:space:]' ' ')" +pageTitle="$(curl -L -s --connect-timeout 5 "$text" | sed -n -e 'H;${x;s!.*]*>\(.*\).*!\1!;T;s!.*\(.*\).*!\1!p}' | w3m -dump -T text/html | tr '[:space:]' ' ')" pageTitle="$(echo "$pageTitle" | tr -cd '[:print:]')" if [[ ${#pageTitle} -gt 1 ]]; then msg "$2" "$pageTitle"