diff options
author | hut <hut@lavabit.com> | 2011-02-15 01:24:04 +0000 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-02-15 01:24:04 +0000 |
commit | 98f3d9581026f6cbd6827f21b126873b8fad4813 (patch) | |
tree | effbfb9f6b8f11e13ab38380818b683651b90f05 /ranger | |
parent | d008817c6d3ea828e12bed2c271c9ae36f80cbda (diff) | |
download | ranger-98f3d9581026f6cbd6827f21b126873b8fad4813.tar.gz |
data.scope: Applied Yubao's patch
Diffstat (limited to 'ranger')
-rwxr-xr-x | ranger/data/scope.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index 754b54d0..ba8b78bc 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -41,12 +41,13 @@ case "$extension" in exit 1;; # PDF documents: pdf) - pdftotext -q "$path" - | head -n $maxln - success && exit 3 || exit 1;; + pdftotext -l 10 -nopgbrk -q "$path" - | head -n $maxln | fmt -s -w $width + success && exit 0 || exit 1;; # HTML Pages: htm|html|xhtml) - have lynx && lynx -dump "$path" | head -n $maxln && exit 5 - have elinks && elinks -dump "$path" | head -n $maxln && exit 5 + have w3m && w3m -dump "$path" | head -n $maxln | fmt -s -w $width && exit 5 + have lynx && lynx -dump "$path" | head -n $maxln | fmt -s -w $width && exit 5 + have elinks && elinks -dump "$path" | head -n $maxln | fmt -s -w $width && exit 5 ;; # fall back to highlight/cat if theres no lynx/elinks esac |