Suppose the CLI application my_bin produces an output in terminal which consists of colored text, Unicode symbols and emojis.
How can I convert the output to a svg or an image on Ubuntu?
For example, curl "v2.wttr.in/Berlin" output is like this in the terminal:
How can I convert it to an image file (e.g. vectored image file, png, svg, etc)?
Update:
I need a solution that doesn't actually need rendering the output of the command in a terminal window. So it should work in background without having to utilize X or Wayland to capture its view.
Tried
curl "v2.wttr.in/Berlin" | pbmtext | pnmtopng > out.png
This does not render colors or emojisTried
pango-view --font='mono' -qo out.png <(curl v2.wttr.in/Berlin)
It renders emojis but does not render terminal escape codes for colors.
