diff --git a/README.md b/README.md new file mode 100644 index 0000000..4ec2be4 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# anstrip + +anstrip is a minimal library to strip ANSI sequences from strings. + +It provides: + +- `PATTERN`, the regex pattern used by the functions of anstrip +- `strip`, a function to remove all the escape sequences from a string +- `auto_strip`, a function that is similar to `strip`, except that it only removes if the output is a TTY +- `auto_print`, a function that is `print` but with sequence auto-stripping +- `printed_length`, a function that returns the length of the string as seen on the screen diff --git a/src/anstrip/__init__.py b/src/anstrip/__init__.py index 42b3d81..54fed24 100644 --- a/src/anstrip/__init__.py +++ b/src/anstrip/__init__.py @@ -2,9 +2,10 @@ anstrip is a minimal library to strip ANSI sequences from strings. It provides: -- the regex pattern used by the functions of anstrip +- `PATTERN`, the regex pattern used by the functions of anstrip - `strip`, a function to remove all the escape sequences from a string - `auto_strip`, a function that is similar to `strip`, except that it only removes if the output is a TTY +- `auto_print`, a function that is `print` but with sequence auto-stripping - `printed_length`, a function that returns the length of the string as seen on the screen """