initial commit for colored_output

This commit is contained in:
ksyasuda 2023-08-09 19:36:01 -07:00
parent 06eb4c4fec
commit 970787d52d
No known key found for this signature in database
7 changed files with 85 additions and 0 deletions

10
colored_output/.gitignore vendored Executable file
View File

@ -0,0 +1,10 @@
.DS_Store
.idea
*.log
tmp/
env/*
dist/*
__pycache__*
*.egg-info
*.whl
*.gz

0
colored_output/LICENSE Executable file
View File

0
colored_output/README.md Executable file
View File

6
colored_output/pyprojects.toml Executable file
View File

@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=50",
"wheel"
]
build-backend = "setuptools.build_meta"

29
colored_output/setup.py Executable file
View File

@ -0,0 +1,29 @@
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="colored-output",
version="0.0.1",
author="Kyle Yasuda",
author_email="suda@sudacode.com",
description="Colors",
long_description=long_description,
long_description_content_type="text/markdown",
url="",
project_urls={
"Bug Tracker": "",
},
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
python_requires=">=3.6",
install_requires=[""],
test_requires=["pytest", "pylint", "pycodestyle", "pydocstyle"],
dependency_links=[""],
include_package_data=True,
)

View File

@ -0,0 +1 @@
from .colored_output import colors

View File

@ -0,0 +1,39 @@
class colors:
"""Helper class for coloring output"""
class text:
reset = '\033[0m'
bold = '\033[01m'
disable = '\033[02m'
underline = '\033[04m'
reverse = '\033[07m'
strikethrough = '\033[09m'
invisible = '\033[08m'
options = ['reset', 'bold', 'disable', 'underline',
'reverse', 'strikethrough', 'invisible']
class fg:
black = '\033[30m'
red = '\033[31m'
green = '\033[32m'
orange = '\033[33m'
blue = '\033[34m'
purple = '\033[35m'
cyan = '\033[36m'
lightgrey = '\033[37m'
darkgrey = '\033[90m'
lightred = '\033[91m'
lightgreen = '\033[92m'
yellow = '\033[93m'
lightblue = '\033[94m'
pink = '\033[95m'
lightcyan = '\033[96m'
class bg:
black = '\033[40m'
red = '\033[41m'
green = '\033[42m'
orange = '\033[43m'
blue = '\033[44m'
purple = '\033[45m'
cyan = '\033[46m'
lightgrey = '\033[47m'