dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 3962ff6c25a4dd6d46532f672549d4497666833b
parent d81a5400a0776904e2ae758894dc324ae5bcd392
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Thu,  6 May 2021 18:19:55 +0200

linkhandler: only use go-readability if it's installed

Diffstat:
Mscripts/linkhandler | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/linkhandler b/scripts/linkhandler @@ -24,7 +24,11 @@ case "$1" in w3m -config ~/.config/w3m/config "$1" ;; http://*|https://*) # everything else gets filtered through readability - go-readability "$1" | w3m -config ~/.config/w3m/config -T text/html + if command -v go-readability >/dev/null 2>&1; then + go-readability "$1" | w3m -config ~/.config/w3m/config -T text/html + else + w3m -config ~/.config/w3m/config -T text/html "$1" + fi ;; '!http'*) os=$(uname -s | tr '[:upper:]' '[:lower:]')