carbon icon indicating copy to clipboard operation
carbon copied to clipboard

ANSI escape code support

Open craigfe opened this issue 4 years ago • 4 comments

I maintain various command-line tools that produce coloured output with ANSI escape codes. Every time I change the output format, I manually update various terminal screenshots on the project READMEs. I've been looking into using carbon to automate this process (and produce much nicer screenshots!).

This may be considered outside the scope for carbon, but it'd be really great to be able to generate images of files containing arbitrary ANSI escapes (rather than doing syntax highlighting on the file). This would allow using carbon to generate screenshots of terminal interactions as well as code snippets.

What do you think?

craigfe avatar May 21 '20 10:05 craigfe

I'm open to supporting it!

mfix22 avatar May 22 '20 05:05 mfix22

@mfix22 @CraigFe Integrating something like this: https://github.com/rburns/ansi-to-html seems like the way to go.

Edit: https://www.npmjs.com/package/ansicolor might work as well.

InnovativeInventor avatar Dec 26 '20 01:12 InnovativeInventor

Hey @mfix22 👋

I wanted to contribute to the project (as a long time user of the app) and saw this issue open and labeled as a good first issue. Since I didn't make any PR to carbon previously, I would probably need some guidance on how to start with this one. Can you confirm that issue is still open (with no work being done) and is up for grabs? 🙂

If so, can you please provide more info on where one could start in order to successfully implement this?

Many thanks! 🎉

ognjenjevremovic avatar Mar 05 '21 17:03 ognjenjevremovic

Hey @mfix22 👋

I wanted to contribute to the project (as a long time user of the app) and saw this issue open and labeled as a good first issue. Since I didn't make any PR to carbon previously, I would probably need some guidance on how to start with this one. Can you confirm that issue is still open (with no work being done) and is up for grabs? 🙂

If so, can you please provide more info on where one could start in order to successfully implement this?

Many thanks! 🎉

@ognjenjevremovic feel free to open a PR to implement this feature 👍

mfix22 avatar Feb 09 '22 01:02 mfix22