I'm trying to export a word document as HTML from LibreOffice on Linux. I'd like to take that output and be able to clean it up:
- Strip out any tags that are not on a white list that I specify (I really want to preserve
litags, but not much else).
- Remove unneeded attributes, especially
- Remove any comments
- Pretty print the result
- I'd like to be able to run it on the command line on Linux to pipe a file through it, although I'd be open to using a GUI program or finding a website that offered this as a service.