Text stylizer for Python. Mainly useful for CLI output.
Project description
fortext
Text stylizer for Python. Mainly useful for CLI output.
Table of Contents
Getting Started
Prerequisites
-
Install or update the pip package manager.
python3 -m pip install --upgrade pip
-
It's also recommended to use a virtual environment.
- Linux / MacOS
python3 -m venv venv-name source venv/bin/activate
- Windows
python3 -m venv venv-name venv/Scripts/activate
- Linux / MacOS
Installation
Use pip to install fortext
.
python3 -m pip install --upgrade fortext
Install the required dependencies as listed on requirements.txt.
python3 -m pip install -r requirements.txt
Usage
print(style('Hi, human.', fg='#ff0000'))
print(style('RGB tuple or list also works.', fg=(0, 255, 0)))
print(style('You can also use predefined colors.', bg=Bg.BLACK))
print(style('Want to be bold?.', frmt=[Frmt.BOLD]))
print(
style('Want to go all in?',
fg='#ff0000', bg=Bg.BLACK,
frmt=[Frmt.BOLD, Frmt.UNDERLINE, Frmt.ITALIC]))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fortext-0.0.1.tar.gz
(5.0 kB
view hashes)