The closest thing to what you’re looking for is wordgrinder
, a terminal-based word processor.
You can install it executing:
sudo apt install wordgrinder
Here is the official website of the project: https://cowlark.com/wordgrinder/
This is the Github repo: https://github.com/davidgiven/wordgrinder
And a quick Survival Guide: https://gist.github.com/davidgiven/1aba97e96a9b8f9b573b
If you check the Importing and Exporting sections you will find:
Importing
Imports basic content from ODT files. OpenDocument is complicated and hard to parse but WordGrinder will do its best to apply appropriate styles. Unsupported features are ignored.
Exporting
This produces an ODT file which can be read by LibreOffice and a variety of other major word processors. Character and paragraph styles are exported and are mapped to OpenDocument styles called P, H1, H2 etc.
Source: 16.04 – How to edit a .odt file from the terminal? – Ask Ubuntu