ansifmt-0.1.0
توضیحات
ANSI escape sequences to format printed strings
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ansifmt-0.1.0 |
| نام | ansifmt |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Khalid |
| ایمیل نویسنده | khalid.y96@outlook.com |
| آدرس صفحه اصلی | https://github.com/khalid151/AnsiFmt |
| آدرس اینترنتی | https://pypi.org/project/ansifmt/ |
| مجوز | - |
# AnsiFmt
ANSI escape sequences to format strings that are printed to terminal.
## Usage
```python
import AnsiFmt as fmt
string = "Hello, world"
# Print the string with underline
print(fmt.underline(string))
# Set it to have red background
print(fmt.bg(string, 1))
# Color can be either an integer, a hex color string or a tuple of (red, green, blue)
print(fmt.fg(string, '#3cde2f'))
# Formats can be nested since each function returns a formatted string
print(fmt.bg(fmt.fg(fmt.bold(string), 4), 15))
```

## Functions
- `bg(str, color)`
- `fg(str, color)`
- `blink(str)`
- `bold(str)`
- `dim(str)`
- `double_underline(str)`
- `hide(str)`
- `invert(str)`
- `italic(str)`
- `overline(str)`
- `strike(str)`
- `underline(str)`
`color` can either be an integer of ANSI color codes, a hex color string, or a tuple of (red, green, blue) values.
نحوه نصب
نصب پکیج whl ansifmt-0.1.0:
pip install ansifmt-0.1.0.whl
نصب پکیج tar.gz ansifmt-0.1.0:
pip install ansifmt-0.1.0.tar.gz