ranger: doc, docx viewer and association

master
Pierre Neidhardt 2014-07-02 19:01:08 +02:00
parent bb20c94af9
commit 2bb126dc80
2 changed files with 4 additions and 2 deletions

View File

@ -167,8 +167,9 @@ ext od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f
ext od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
ext od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
ext docx?, has docx2txt.pl, terminal = docx2txt.pl "$@" - | "$PAGER"
ext docx?, has catdoc, terminal = catdoc "$@" | "$PAGER"
ext docx, has docx2txt.pl, terminal = docx2txt.pl "$@" - | "$PAGER"
ext doc, has antiword, terminal = antiword "$@" | "$PAGER"
ext doc, has catdoc, terminal = catdoc "$@" | "$PAGER"
ext djvu, has zathura, X, flag f = zathura -- "$@"
ext djvu, has evince, X, flag f = evince -- "$@"

View File

@ -76,6 +76,7 @@ case "$extension" in
try mediainfo "$path" && { dump | sed 's/ \+:/: /;' | trim | fmt -s -w $width; exit 4; } ;;
doc)
try antiword "$path" && { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
try catdoc "$path" && { dump | trim | fmt -s -w $width; exit 0; }
docx)
try docx2txt.pl "$path" - && { dump | trim | fmt -s -w $width; exit 0; }
try catdoc "$path" && { dump | trim | fmt -s -w $width; exit 0; }