3

I know there are much better solutions for writing documents through the command line that are intended to be nicely formatted (markdown, LaTeX, troff, etc. ad infinitum), but I have not encountered any software for viewing RTF files on the command line.

Considering that terminals are capable of bold text, underlining, centered text, colored text, et. al., it would seem that it should be possible to convert the information in an RTF file into commands the terminal can understand and display.

Is this possible (perhaps even just with a Perl script) or are there technical barriers that make it impossible?

If it's possible, has such a software actually been created? (Preferably open source such that I could improve upon it at need?)

1

2 Answers 2

4

RTF files can (besides text) contain pictures and inserts which are not straightforward to render.

There have been a few programs named rtf2html, rtf2text (and rtf2txt) which you could evaluate for your needs. For html of course, you could use one of the text browsers. Beyond that, it's in the realm of opinion.

Here are a few possibilities:

0

You can use unrtf + lynx.

unrtf --html x.rtf > x.html
lynx --dump x.html > x.txt

This handles UTF-8 properly.

From a comment on this answer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .