I am capturing output from a TTY but it is full of ANSI escape codes, many of which move the cursor and rewrite part of the screen. I would like to be able to feed this string into a parser and have it resolve all the rewrites...
I have tried a couple of libraries such as anser but it looks to me like it just strips the ansi instead of resolving cursor moves when I call ansiToText
. Any advice?