Turning text into doc or rtf

Tim Chase blinux.list at thechases.com
Wed Feb 3 15:52:11 UTC 2016


On February  3, 2016, John J. Boyer wrote:
> I have a need to submit text documents created with nano in doc or
> rtf format. Is there a utility that will do this? Of course I can
> always format documents in html. Is there a utility that will
> convert html to doc or rtf?

Check out pandoc, the Swiss-army knife of document conversion:

  $ pandoc -o output.docx input.html
  $ pandoc -o output.rtf input.html

It takes multiple input formats as well, so if you're not like me (I
prefer to write raw HTML) and you prefer to write in Markdown or some
other markup syntax, you can check those out as well:

  $ pandoc -o output.docx -f markdown input.txt

The whole list of known formats are in the man-page under the "-f"
option.

It should be readily available in most repos.

-tim






More information about the Blinux-list mailing list