-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Leovalcante/develop
Develop
- Loading branch information
Showing
9 changed files
with
320 additions
and
56 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
venv/ | ||
build/ | ||
dist/ | ||
*.egg-info | ||
*.egg-info | ||
*__pycache__* |
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,5 +1,5 @@ | ||
__name__ = "random-password-generator" | ||
__name__ = "random-password-generator-cli" | ||
__name_desc__ = "Random Password Generator" | ||
__version__ = "1.0.0" | ||
__description__ = "Utility command line tool to generate random entropic password" | ||
__version__ = "0.0.1" | ||
__description__ = "Command line tool utility to generate random entropic password" | ||
__url__ = "https://github.com/Leovalcante/random-password-generator" |
Binary file not shown.
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,113 @@ | ||
import click | ||
|
||
|
||
class Prints: | ||
"""Prints class PRINTS messages in various format""" | ||
@staticmethod | ||
def emphasis(msg: str) -> None: | ||
""" | ||
Print emphasis messages. | ||
:param str msg: message to print | ||
:return: None | ||
""" | ||
click.echo(click.style(msg, fg="cyan")) | ||
|
||
@staticmethod | ||
def error(msg: str) -> None: | ||
""" | ||
Print error messages. | ||
:param str msg: message to print | ||
:return: None | ||
""" | ||
click.echo(click.style(msg, fg="red")) | ||
|
||
@staticmethod | ||
def info(msg: str) -> None: | ||
""" | ||
Print standard messages. | ||
:param str msg: message to print | ||
:return: None | ||
""" | ||
click.echo(msg) | ||
|
||
@staticmethod | ||
def verbose(msg: str, vrb: bool) -> None: | ||
""" | ||
Print verbose messages if verbose is enabled. | ||
:param str msg: message to print | ||
:param bool vrb: verbose value | ||
:return: None | ||
""" | ||
if vrb: | ||
click.echo(click.style(msg, fg="magenta")) | ||
|
||
@staticmethod | ||
def warning(msg: str) -> None: | ||
""" | ||
Print warning messages. | ||
:param str msg: message to print | ||
:return: None | ||
""" | ||
click.echo(click.style(msg, fg="bright_yellow", bold=True)) | ||
|
||
|
||
class Echoes: | ||
"""Echoes class RETURNS messages in various format""" | ||
@staticmethod | ||
def emphasis(msg: str) -> str: | ||
""" | ||
Print emphasis messages. | ||
:param str msg: message to print | ||
:return str: colored msg | ||
""" | ||
return click.style(msg, fg="cyan") | ||
|
||
@staticmethod | ||
def error(msg: str) -> str: | ||
""" | ||
Print error messages. | ||
:param str msg: message to print | ||
:return str: colored message | ||
""" | ||
return click.style(msg, fg="red") | ||
|
||
@staticmethod | ||
def info(msg: str) -> str: | ||
""" | ||
Print standard messages. | ||
:param str msg: message to print | ||
:return str: colored message | ||
""" | ||
return msg | ||
|
||
@staticmethod | ||
def verbose(msg: str, vrb: bool) -> str: | ||
""" | ||
Print verbose messages if verbose is enabled. | ||
:param str msg: message to print | ||
:param bool vrb: verbose value | ||
:return str: colored message | ||
""" | ||
if vrb: | ||
return click.style(msg, fg="magenta") | ||
|
||
return "" | ||
|
||
@staticmethod | ||
def warning(msg: str) -> str: | ||
""" | ||
Print warning messages. | ||
:param str msg: message to print | ||
:return: None | ||
""" | ||
return click.style(msg, fg="bright_yellow", bold=True) |
Oops, something went wrong.