New tiny project: Markterm
A while back I saw glow and I wondered ... how hard could it be to write that?
I mean, it looks impressive! It renders markdown to a terminal!
Well, it's not all that hard if you have a nice markdown parser you can hack, so I spent a couple of hours and wrote it.
It's called markterm and it ... well, it's done?
You can use it as a library from Crystal, or you can use the markterm binary.
It can syntax highlight code (as long as you have chroma installed), it does the right thing when piped to another program, and it tries to look good but not gaudy.
What will I use it for?
Showing CLI program's help. I am using docopt lately and the format of the docopt input is almost markdown. With a bit of flair it can be both, and using markterm I can show it in a terminal in a much nicer way than usual.
Extra: why am I starting so many projects lately?
- Because it makes me happy
- Because in most cases it's not code that will need maintenance. I expect markterm to just work for the next 10 years without me touching it, if needed.
- Because I can