You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently had to "clean" a log file from ANSI codes.
Couldn't find a quick solution for this in bash, so I turned to rich-cli, but wit no luck either.
Thankfully rich (the library) has just the right trick for that. I can use Text.from_ansi and print it however I want (stripped from codes).
I was wondering if this Text.from_ansi would be useful to expose here in this tool.
It could maybe have a --ansi option and then for my use case one could use it like so:
I recently had to "clean" a log file from ANSI codes.
Couldn't find a quick solution for this in bash, so I turned to rich-cli, but wit no luck either.
Thankfully
rich
(the library) has just the right trick for that. I can useText.from_ansi
and print it however I want (stripped from codes).I was wondering if this
Text.from_ansi
would be useful to expose here in this tool.It could maybe have a
--ansi
option and then for my use case one could use it like so:rich --ansi text_with_ansi_codes.txt > text_stripped.txt
Not sure if this option would be useful for anything else (you could probably only adjust alignment, style and maybe export to html/svg) 🤔 ?
Anyway, does this make sense?
The text was updated successfully, but these errors were encountered: