Saving the Terminal to HTML
When copy-pasting some text from my terminal to an email, I’m often annoyed that all I get is the text, losing all the ANSI colors and formatting. If you’re using a newer release of the GNOME desktop, for example Ubuntu 18.04, you’ll notice that when right-clicking in its Terminal, you can use “Copy as HTML”. But what if you want that HTML formatting for terminal output in other environments?
Originally, I was looking for something that would format the ANSI formatting of logs produced by GNU Screen, or with the script command.