Ask Your Question

TUI (curses) interface for libreoffice?

asked 2018-02-09 14:21:36 +0100

staalmannen gravatar image


I was just thinking about something: Would it be possible to make a TUI interface for libreoffice so that it could work similar to command line browsers like (e)links (with menus accessible via keyboard)? Bonus points if it would have different key binding "personalities" for different preferences (vim, emacs, nano, ...).

I think this could be quite nice since you could both read and edit documents without an X11/wayland session (could be a competitor to pandoc etc as document reader for users of CLI e-mail clients like mutt).

Some people also prefer TUI to richer GUIs since it is a more distraction-free environment (the most famous example is probably George RR Martin who reportedly writes his books with WordStar 4.0 on DOS ...).

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-02-09 15:54:44 +0100

Jim K gravatar image

updated 2018-02-09 15:55:44 +0100

Several solutions for viewing documents in plain text are described at, including my answer:

libreoffice --cat "Untitled 1.odt" --headless | less

This produces plain text.

LibreOffice text uses graphical rendering engines such as HarfBuzz and graphite. I don't think that would be possible in a terminal. And without that rendering, the document will look significantly different.

You could write a TUI viewer for the ODT format. It's a zip file, and most of the important information is stored in content.xml. Your application could use LibreOffice to convert files to ODT first for reading, to handle other formats such as DOC, DOCX, RTF and so on.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-02-09 14:21:36 +0100

Seen: 31 times

Last updated: Feb 09