Closed Mrodent closed 7 years ago
The HtmlAnsiOutputStream turns ansi escape sequences into html markup, but I'm not sure how useful is it. If it does not suit your needs but looks reusable in your case, you could provide some PR, else implement your own AnsiOutputStream.
For available markup "words", you can have a look at https://github.com/fusesource/jansi/blob/master/jansi/src/main/java/org/fusesource/jansi/AnsiRenderer.java#L130-L178
The markup words are converted to upper case and compared to the enum.
Hi, just discovered this library... it looks great.
But dare I say the minimal documentation is just a little TOO minimal? OK, it's not a big library, but for example, I'm wondering what HtmlAnsiOutputStream actually does... Having googled unsuccessfully I'm now contemplating examining the source code. Why is it called "HTML", for example? At the moment I have a project where currently I'm outputting to the console (and want colour), but in future will almost certainly be outputting to a browser ... so it makes sense to construct output in HTML markup and then convert using Jsoup and Jansi for terminal output.
But I currently have no idea whether HtmlAnsiOutputStream can help with this... a "Jansi 101" would be helpful ... or a tiny bit more Javadoc commentary perhaps?
And... for example, trying to use
ansi().render( "@|red,bold blah blah|@")...
where might I find a list of the available markup "words"... ?I mean, I tried
System.out.println( ansi().render("@|red,bold,italic Hello|@ @|green World|@") );
... which worked But then I triedSystem.out.println( ansi().render("@|red,bold,italic,blink Hello|@ @|green World|@") );
... which didn't: