Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] ranger can't view .odt files

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
arzgi
Posts: 1183
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

[SOLVED] ranger can't view .odt files

#1 Post by arzgi »

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
    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 :D

Post Reply