Name | anstrip JSON |
Version |
0.2.2
JSON |
| download |
home_page | None |
Summary | anstrip is a minimal library to strip ANSI sequences from strings. |
upload_time | 2024-05-04 14:44:13 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 Qexat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
ansi
escape sequence
sgr
ecma
strip
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# anstrip
[![PyPI](https://img.shields.io/pypi/v/anstrip)](https://pypi.org/project/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
- `print`, a function that is similar to the built-in `print` but with sequence auto-stripping
- `printed_length`, a function that returns the length of the string as seen on the screen
Raw data
{
"_id": null,
"home_page": null,
"name": "anstrip",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ansi, escape sequence, SGR, ECMA, strip",
"author": null,
"author_email": "Qexat <contact@qexat.com>",
"download_url": "https://files.pythonhosted.org/packages/ca/46/6793b9564f5132cae98d9bfef46f73f3b5f160265d1c9aeea84726af3365/anstrip-0.2.2.tar.gz",
"platform": null,
"description": "# anstrip\n\n[![PyPI](https://img.shields.io/pypi/v/anstrip)](https://pypi.org/project/anstrip/)\n\nanstrip is a minimal library to strip ANSI sequences from strings.\n\nIt provides:\n\n- `PATTERN`, the regex pattern used by the functions of anstrip\n- `strip`, a function to remove all the escape sequences from a string\n- `auto_strip`, a function that is similar to `strip`, except that it only removes if the output is a TTY\n- `print`, a function that is similar to the built-in `print` but with sequence auto-stripping\n- `printed_length`, a function that returns the length of the string as seen on the screen\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Qexat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "anstrip is a minimal library to strip ANSI sequences from strings.",
"version": "0.2.2",
"project_urls": {
"source": "https://github.com/qexat/anstrip"
},
"split_keywords": [
"ansi",
" escape sequence",
" sgr",
" ecma",
" strip"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "32cdef72268605e99026d43a2ce523a9cddd1416285e35f8f2c4fbaa384696d6",
"md5": "fd407200ac93a14e2c2c880712c45b1a",
"sha256": "52d19b8c2d83ed60afbb0306bd88377d87832b69a78966e8357e32e6e9973032"
},
"downloads": -1,
"filename": "anstrip-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd407200ac93a14e2c2c880712c45b1a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 5558,
"upload_time": "2024-05-04T14:44:11",
"upload_time_iso_8601": "2024-05-04T14:44:11.766607Z",
"url": "https://files.pythonhosted.org/packages/32/cd/ef72268605e99026d43a2ce523a9cddd1416285e35f8f2c4fbaa384696d6/anstrip-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ca466793b9564f5132cae98d9bfef46f73f3b5f160265d1c9aeea84726af3365",
"md5": "8367c3b55c1de669df45189835eb876f",
"sha256": "eb959e44d2513d4453c576ed0c15e49bc278dc5175cff78a9dcb551c6341af6e"
},
"downloads": -1,
"filename": "anstrip-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "8367c3b55c1de669df45189835eb876f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4253,
"upload_time": "2024-05-04T14:44:13",
"upload_time_iso_8601": "2024-05-04T14:44:13.291561Z",
"url": "https://files.pythonhosted.org/packages/ca/46/6793b9564f5132cae98d9bfef46f73f3b5f160265d1c9aeea84726af3365/anstrip-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-04 14:44:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "qexat",
"github_project": "anstrip",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "anstrip"
}