-
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
7 changed files
with
127 additions
and
29 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
Binary file not shown.
Binary file renamed
BIN
+14.3 KB
dist/textcolor-3.0.1-py3-none-any.whl → dist/textcolor-3.1.0-py3-none-any.whl
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Uploading to PyPi | ||
|
||
More info [here](https://packaging.python.org/en/latest/tutorials/packaging-projects/). | ||
|
||
Remove all old distribution files in 'dist/' | ||
|
||
Make sure you have the latest version of 'build': | ||
|
||
> python3 -m pip install --upgrade build | ||
In the same directory as 'pyproject.toml': | ||
|
||
> python3 -m build | ||
Now that the distribution files have been generated, make sure twine is up to date: | ||
|
||
> python3 -m pip install --upgrade twine | ||
Again, in the same directory as 'pyproject.toml': | ||
|
||
> python3 -m twine upload dist/* | ||
> | ||
> username: \_\_token__ | ||
> | ||
> password: \<API token from pypi> |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build" | |
|
||
[project] | ||
name = "textColor" | ||
version = "3.0.1" | ||
version = "3.1.0" | ||
authors = [ | ||
{ name="Jannik Ramrath", email="[email protected]" }, | ||
] | ||
|
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,36 +1,113 @@ | ||
### | ||
|
||
|
||
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): | ||
### | ||
|
||
|
||
def g(*args, **kwargs): | ||
return green(*args, **kwargs) | ||
|
||
|
||
def r(*args, **kwargs): | ||
return green(*args, **kwargs) | ||
|
||
|
||
def b(*args, **kwargs): | ||
return green(*args, **kwargs) | ||
|
||
|
||
def y(*args, **kwargs): | ||
return green(*args, **kwargs) | ||
|
||
|
||
### | ||
|
||
|
||
def prompt(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) | ||
return "\033[1;32;49m" + "[>]" + " \033[0;37;49m" + str(text) | ||
|
||
|
||
# backwards compatibility only: | ||
def input(text): | ||
return prompt(text) | ||
|
||
|
||
### | ||
|
||
|
||
def err(*args, **kwargs): | ||
return error(*args, **kwargs) | ||
|
||
|
||
def out(*args, **kwargs): | ||
return output(*args, **kwargs) | ||
|
||
|
||
### | ||
|
||
|
||
def pPrompt(text): | ||
print(prompt(text)) | ||
|
||
|
||
def pInfo(text): | ||
print(info(text)) | ||
|
||
|
||
def pError(text): | ||
print(error(text)) | ||
|
||
|
||
def pOutput(text): | ||
print(output(text)) | ||
|
||
|
||
### | ||
|
||
|
||
def pErr(*args, **kwargs): | ||
return pError(*args, **kwargs) | ||
|
||
|
||
def pOut(*args, **kwargs): | ||
return pOutput(*args, **kwargs) |