ranger is a nice cli file manager. But I have trouble opening .odt files. I've installed odt2txt, and it works in mc, and and as command:
I have tried editing .config/range/scope.sh, and added this chunk to extensions:
Code: Select all
# OpenDocument
odt|ods|odp|sxw)
# Preview as text conversion
try odt2txt "$path" - && { dump | trim; exit 5; } || exit 1;;
The format is the same as in other expansions, as I figured. When I select a .odt file in ranger, display flashes so quickly that I can't read it, and then ranger opens .odt source in vim.
EDIT:
changing above line to:
Code: Select all
try odt2txt "$path" && { dump | trim; exit 0; } || exit 0;;
was the solution, now I can read .odt files in ranger too