dbcli / cli_helpers

Python helpers for common CLI tasks
http://cli-helpers.rtfd.io/
BSD 3-Clause "New" or "Revised" License
92 stars 29 forks source link

Move strip_ansi to main utils #41

Closed jayvdb closed 6 years ago

jayvdb commented 6 years ago

It is useful to be able to strip the ansi emitted by other cli tools, in order to parse the output.

@coala needs something like that for https://github.com/coala/coala/issues/5281 , and we're looking for existing libraries which might do the trick for us.

meeuw commented 6 years ago

Hm that sounds like a good idea, we also have some stripping in: https://github.com/dbcli/mycli/blob/master/test/features/steps/wrappers.py#L13 https://github.com/dbcli/pgcli/blob/master/tests/features/steps/wrappers.py#L12 https://github.com/dbcli/mssql-cli/blob/master/tests/features/steps/wrappers.py#L12

So it would be nice if we could generalize this in cli_helpers!