Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
qexat committed Apr 14, 2024
1 parent 51ec4f6 commit e14fe14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion src/anstrip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

Expand Down

0 comments on commit e14fe14

Please sign in to comment.