I want to convert the output of a shell command to HTML, regardless of what the command prints.
I've tried using txt2html and pandoc but the first will not keep lines of hypens, even with the --nounhipenation param, and also formatting tags like < h1 > to some lines.
with txt2html this output:
TEST: SimpleTest
-----------------------------------
All test completed in 1ms
Warning: No asserts run!
All assert(s) passed.
-----------------------------------
becomes:
<h1>TEST: SimpleTest</h1>
<p> All test completed in 1ms<br/>
Warning: No asserts run!<br/>
All assert(s) passed.
</p><hr/>
Notice the missing hypens and the spurious < h1 > < /h1 > and for some reason < hr/ > tags.
I would like it to output something like:
<p>TEST: SimpleTest<br/>
-----------------------------------<br/>
All test completed in 1ms<br/>
Warning: No asserts run!<br/>
All assert(s) passed.
-----------------------------------<br/>
</p>
I have done this before and the following has worked for me.
http://2partsmagic.com/util/text2html.jsp