From 970787d52d83e0afafd48f4fb9717bf4f15b4543 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Wed, 9 Aug 2023 19:36:01 -0700 Subject: [PATCH] initial commit for colored_output --- colored_output/.gitignore | 10 +++++ colored_output/LICENSE | 0 colored_output/README.md | 0 colored_output/pyprojects.toml | 6 +++ colored_output/setup.py | 29 ++++++++++++++ colored_output/src/colored_output/__init__.py | 1 + .../src/colored_output/colored_output.py | 39 +++++++++++++++++++ 7 files changed, 85 insertions(+) create mode 100755 colored_output/.gitignore create mode 100755 colored_output/LICENSE create mode 100755 colored_output/README.md create mode 100755 colored_output/pyprojects.toml create mode 100755 colored_output/setup.py create mode 100755 colored_output/src/colored_output/__init__.py create mode 100755 colored_output/src/colored_output/colored_output.py diff --git a/colored_output/.gitignore b/colored_output/.gitignore new file mode 100755 index 0000000..d573725 --- /dev/null +++ b/colored_output/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +.idea +*.log +tmp/ +env/* +dist/* +__pycache__* +*.egg-info +*.whl +*.gz diff --git a/colored_output/LICENSE b/colored_output/LICENSE new file mode 100755 index 0000000..e69de29 diff --git a/colored_output/README.md b/colored_output/README.md new file mode 100755 index 0000000..e69de29 diff --git a/colored_output/pyprojects.toml b/colored_output/pyprojects.toml new file mode 100755 index 0000000..afbfa5c --- /dev/null +++ b/colored_output/pyprojects.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=50", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/colored_output/setup.py b/colored_output/setup.py new file mode 100755 index 0000000..f822483 --- /dev/null +++ b/colored_output/setup.py @@ -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, + ) diff --git a/colored_output/src/colored_output/__init__.py b/colored_output/src/colored_output/__init__.py new file mode 100755 index 0000000..39553c5 --- /dev/null +++ b/colored_output/src/colored_output/__init__.py @@ -0,0 +1 @@ +from .colored_output import colors diff --git a/colored_output/src/colored_output/colored_output.py b/colored_output/src/colored_output/colored_output.py new file mode 100755 index 0000000..7bba755 --- /dev/null +++ b/colored_output/src/colored_output/colored_output.py @@ -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'