to-html 0.1.5: A tool to convert terminal output with ANSI colors to HTML (github.com)
from aloso@programming.dev to rust@programming.dev on 30 Nov 2023 19:37
https://programming.dev/post/6624654

l just released a new version of to-html. I created to-html a few years ago for my blog. It is very easy to use: When you want to include the output of a command on a website, run it with to-html:

to-html "cargo clippy"

Then copy and paste the output into your website. to-html comes with some options to customize its output. Starting with this release, you can create a configuration file, so you don’t need to repeat the same CLI arguments every time you use to-html. This release also adds shell completions, a way to customize terminal colors via CSS, and a flag to not print the shell prompt. A big thank you to the contributors who implemented these features!

#rust

threaded - newest

rutrum@lm.paradisus.day on 30 Nov 2023 22:20 collapse

Cool project! I love CLI widgets like these. I’ve made a couple! Something that would be cool for this project is a way to pipe a script in, like cat script.sh | to-html and it read the file line by line. But that could be difficult! Last I knew, clap doesn’t make that functionality very easy to validate! Again, great idea and I hope this gets shared with more people.

aloso@programming.dev on 01 Dec 2023 09:03 collapse

Thanks!

Piping in a shell script should be doable, it just hasn’t been requested yet.