bleep-it-0.2.2
توضیحات
Text filtering tool
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | bleep-it-0.2.2 |
| نام | bleep-it |
| نسخه کتابخانه | 0.2.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Marseel Eeso |
| ایمیل نویسنده | marseeleeso@gmail.com |
| آدرس صفحه اصلی | https://github.com/Marseel-E/bleep-it |
| آدرس اینترنتی | https://pypi.org/project/bleep-it/ |
| مجوز | - |

# Bleep-it
Text filtering tool
# :clipboard: Table Of Content
[Installation](#installation)
[Quickstart](#quickstart)
[Documentation](#documentation)
[Bleep-it Tools](#bleep-it-tools)
[License](LICENSE)
# Installation
```cmd
pip install bleep-it
:: for Latest (unstable)
pip install git+https://github.com/Marseel-E/bleep-it
```
# Quickstart
```py
import asyncio
import bleep
async def main():
while True:
text = input("text: ")
filtered_text = await bleep.filter(text=text, strickness=2)
print("filtered_text:", filtered_text)
if __name__ == '__main__':
asyncio.run(main())
```
# Documentation
### `async` filter
```py
await filter(text, strickness=2, action=Censor())
```
This function is a [coroutine](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Filters the text given and returns the filtered test.
#### Parameters
- text ( [str](https://docs.python.org/3/library/stdtypes.html#str) ) - The text to be filtered.
- strickness ( [int](https://docs.python.org/3/library/functions.html#int) ) - The level of strickness of the filtering.
- action ( [Censor](#censor) | [Remove](#remove) ) - The action to take when filtering a word.
#### Returns
The filtered text.
#### Return type
[str](https://docs.python.org/3/library/stdtypes.html#str)
<hr />
### `class` Censor
Sensors the filtered word.
#### Methods
- `async` generate
#### `await generate(word)`
This function is a [coroutine](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Generates the censorship to replace the word with.
##### Parameters
- word ( [str](https://docs.python.org/3/library/stdtypes.html#str) ) - The word to be censored.
##### Returns
The censored replacement for the word.
##### Return type
[str](https://docs.python.org/3/library/stdtypes.html#str)
<hr />
### `class` Remove
Removes the filtered word from the text.
# Bleep-it Tools
[Bleep-it Tools](https://github.com/Marseel-E/bleep-it-tools) is an extension for Bleep-it that allows you to
- [x] Create custom words.
- [ ] ~~Generate other languages.~~ `soon`
### :scroll: [License](LICENSE)
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9 | Python |
نحوه نصب
نصب پکیج whl bleep-it-0.2.2:
pip install bleep-it-0.2.2.whl
نصب پکیج tar.gz bleep-it-0.2.2:
pip install bleep-it-0.2.2.tar.gz