[SOLVED] ranger can't view .odt files

If none of the more specific forums is the right place to ask

[SOLVED] ranger can't view .odt files

Postby arzgi » 2018-08-11 12:29

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:
Code: Select all
odx2txt file.odt

I have tried editing .config/range/scope.sh, and added this chunk to extensions:
Code: Select all
# OpenDocument
    # 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.


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 :D
Posts: 458
Joined: 2008-02-21 17:03
Location: Finland

Return to General Questions

Who is online

Users browsing this forum: No registered users and 11 guests