-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
256 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,53 @@ | ||
# colorText | ||
# textColor | ||
|
||
This is a easy to use Python Library which allows you to make your Terminal outputs more colorful and therefore easyer to understand. | ||
This is an easy to use Python library which allows you to make your terminal outputs more colorful and therefore easier to read and understand. | ||
|
||
It currently only works with Python3 | ||
|
||
The creator is Jannik Ramrath (R2-D2-JR) | ||
The creator and maintainer is Jannik Ramrath (jramrath) | ||
|
||
GitHub: https://github.com/R2-D2-JR/textColor | ||
GitHub: https://github.com/jramrath/textColor | ||
|
||
PiPy: https://pypi.org/project/textColor/ | ||
|
||
|
||
# Installation | ||
|
||
This library is hosted on [pypi.org](https://pypi.org/project/textColor/). You can install it with **pip**: | ||
|
||
`pip install textColor` | ||
|
||
|
||
# Usage | ||
|
||
To use this library, you first have to import it: | ||
``` | ||
from textColor import tc | ||
``` | ||
|
||
To print colored text do the following: | ||
``` | ||
print(tc.green("GREEN")) # 'GREEN' will be green | ||
print(tc.green("RED")) # 'RED' will be red | ||
print(tc.green("BLUE")) # 'BLUE' will be blue | ||
print(tc.green("YELLOW")) # 'YELLOW' will be yellow | ||
``` | ||
|
||
You can also use special 'pre-fixes': | ||
``` | ||
print(tc.input("Name: ")) # will output '[?] Name: ' while '[?]' is yellow | ||
print(tc.info("Info")) # will output '[-] Info' while '[-]' is blue | ||
print(tc.error("ERROR")) # will output '[!] ERROR' while '[!]' is red | ||
print(tc.output("Success")) # will output '[>] Success' while '[>]' is green | ||
``` | ||
|
||
|
||
|
||
# License | ||
|
||
This library was published under the **GNU General Public License**. For more information take a look at the **LICENSE** file. | ||
|
||
|
||
# Contributing | ||
|
||
If you've found a bug or a typo, feel free to open an Issue on GitHub. Already have a solution? Make a Pull request and I'll take a look at your changes. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from textColor import tc | ||
|
||
def test(): | ||
print("Starting test ...") | ||
|
||
print(tc.green("This should be green")) | ||
print(tc.red("This should be red")) | ||
print(tc.blue("This should be blue")) | ||
print(tc.yellow("This should be yellow")) | ||
|
||
print(tc.input("INPUT")) | ||
print(tc.info("INFO")) | ||
print(tc.error("ERROR")) | ||
print(tc.output("OUTPUT")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
#__init__.py | ||
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
def green(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;32;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[2;32;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
def red(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;31;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[1;31;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
def blue(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;34;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[1;34;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
def yellow(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;33;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[1;33;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
|
||
def input(text): | ||
return "\033[1;33;49m" + "[?]" + " \033[0;37;49m" + str(text) | ||
|
||
def info(text): | ||
return "\033[1;34;49m" + "[-]" + " \033[0;37;49m" + str(text) | ||
|
||
def error(text): | ||
return "\033[1;31;49m" + "[!]" + " \033[0;37;49m" + str(text) | ||
|
||
def output(text): | ||
return "\033[1;32;49m" + "[>]" + " \033[0;37;49m" + str(text) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
def green(colorText, whiteText="", space=True): | ||
if space: | ||
return "\033[1;32;40m" + str(colorText) + " \033[0;37;40m" + str(whiteText) | ||
else: | ||
return "\033[2;32;40m" + str(colorText) + "\033[0;37;40m" + str(whiteText) | ||
|
||
def red(colorText, whiteText="", space=True): | ||
if space: | ||
return "\033[1;31;40m" + str(colorText) + " \033[0;37;40m" + str(whiteText) | ||
else: | ||
return "\033[1;31;40m" + str(colorText) + "\033[0;37;40m" + str(whiteText) | ||
|
||
def blue(colorText, whiteText="", space=True): | ||
if space: | ||
return "\033[1;34;40m" + str(colorText) + " \033[0;37;40m" + str(whiteText) | ||
else: | ||
return "\033[1;34;40m" + str(colorText) + "\033[0;37;40m" + str(whiteText) | ||
|
||
def yellow(colorText, whiteText="", space=True): | ||
if space: | ||
return "\033[1;33;40m" + str(colorText) + " \033[0;37;40m" + str(whiteText) | ||
else: | ||
return "\033[1;33;40m" + str(colorText) + "\033[0;37;40m" + str(whiteText) | ||
|
||
|
||
def input(text): | ||
return "\033[1;33;40m" + "[?]" + " \033[0;37;40m" + str(text) | ||
|
||
def info(text): | ||
return "\033[1;34;40m" + "[-]" + " \033[0;37;40m" + str(text) | ||
|
||
def error(text): | ||
return "\033[1;31;40m" + "[!]" + " \033[0;37;40m" + str(text) | ||
|
||
def output(text): | ||
return "\033[1;32;40m" + "[>]" + " \033[0;37;40m" + str(text) |
Binary file not shown.
Binary file renamed
BIN
+13.9 KB
dist/textColor-0.0.1-py3-none-any.whl → dist/textColor-0.1.0-py3-none-any.whl
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from textColor import tc | ||
|
||
def test(): | ||
print("Starting test ...") | ||
|
||
print(tc.green("This should be green")) | ||
print(tc.red("This should be red")) | ||
print(tc.blue("This should be blue")) | ||
print(tc.yellow("This should be yellow")) | ||
|
||
print(tc.input("INPUT")) | ||
print(tc.info("INFO")) | ||
print(tc.error("ERROR")) | ||
print(tc.output("OUTPUT")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,70 @@ | ||
Metadata-Version: 2.1 | ||
Name: textColor | ||
Version: 0.0.1 | ||
Summary: The purpose of this Library is to add easy acces to colored output in the Terminal with Python3 | ||
Home-page: https://github.com/R2-D2-JR/textColor | ||
Version: 2.0.0 | ||
Summary: This is an easy to use Python library which allows you to make your terminal outputs more colorful and therefore easier to read and understand | ||
Home-page: https://github.com/jramrath/textColor | ||
Author: Jannik Ramrath | ||
Author-email: jannik.ramrath@gmail.com | ||
Author-email: textcolor@ramrath.anonaddy.me | ||
License: UNKNOWN | ||
Description: # colorText | ||
|
||
This is a easy to use Python Library which allows you to make your Terminal outputs more colorful and therefore easyer to understand. | ||
|
||
It currently only works with Python3 | ||
|
||
The creator is Jannik Ramrath (R2-D2-JR) | ||
|
||
GitHub: https://github.com/R2-D2-JR/textColor | ||
Platform: UNKNOWN | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) | ||
Classifier: Operating System :: OS Independent | ||
Requires-Python: >=3.6 | ||
Description-Content-Type: text/markdown | ||
License-File: LICENSE | ||
|
||
# textColor | ||
|
||
This is an easy to use Python library which allows you to make your terminal outputs more colorful and therefore easier to read and understand. | ||
|
||
It currently only works with Python3 | ||
|
||
The creator and maintainer is Jannik Ramrath (jramrath) | ||
|
||
GitHub: https://github.com/jramrath/textColor | ||
|
||
PiPy: https://pypi.org/project/textColor/ | ||
|
||
|
||
# Installation | ||
|
||
This library is hosted on [pypi.org](https://pypi.org/project/textColor/). You can install it with **pip**: | ||
|
||
`pip install textColor` | ||
|
||
|
||
# Usage | ||
|
||
To use this library, you first have to import it: | ||
``` | ||
from textColor import tc | ||
``` | ||
|
||
To print colored text do the following: | ||
``` | ||
print(tc.green("GREEN")) # 'GREEN' will be green | ||
print(tc.green("RED")) # 'RED' will be red | ||
print(tc.green("BLUE")) # 'BLUE' will be blue | ||
print(tc.green("YELLOW")) # 'YELLOW' will be yellow | ||
``` | ||
|
||
You can also use special 'pre-fixes': | ||
``` | ||
print(tc.input("Name: ")) # will output '[?] Name: ' while '[?]' is yellow | ||
print(tc.info("Info")) # will output '[-] Info' while '[-]' is blue | ||
print(tc.error("ERROR")) # will output '[!] ERROR' while '[!]' is red | ||
print(tc.output("Success")) # will output '[>] Success' while '[>]' is green | ||
``` | ||
|
||
|
||
|
||
# License | ||
|
||
This library was published under the **GNU General Public License**. For more information take a look at the **LICENSE** file. | ||
|
||
|
||
# Contributing | ||
|
||
If you've found a bug or a typo, feel free to open an Issue on GitHub. Already have a solution? Make a Pull request and I'll take a look at your changes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
test | ||
textColor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
#__init__.py | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
def green(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;32;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[2;32;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
def red(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;31;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[1;31;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
def blue(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;34;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[1;34;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
def yellow(text, whiteText="", space=True): | ||
if space: | ||
return "\033[1;33;49m" + str(text) + " \033[0;37;49m" + str(whiteText) | ||
else: | ||
return "\033[1;33;49m" + str(text) + "\033[0;37;49m" + str(whiteText) | ||
|
||
|
||
def input(text): | ||
return "\033[1;33;49m" + "[?]" + " \033[0;37;49m" + str(text) | ||
|
||
def info(text): | ||
return "\033[1;34;49m" + "[-]" + " \033[0;37;49m" + str(text) | ||
|
||
def error(text): | ||
return "\033[1;31;49m" + "[!]" + " \033[0;37;49m" + str(text) | ||
|
||
def output(text): | ||
return "\033[1;32;49m" + "[>]" + " \033[0;37;49m" + str(text) |