the command line now uses the crayons Python library in order to have colored strings in the terminal.

This commit is contained in:
Cédric Bonhomme 2017-02-20 14:16:41 +01:00
parent 263e287559
commit 6215c03939
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
4 changed files with 25 additions and 26 deletions

View file

@ -25,6 +25,8 @@ __date__ = "$Date: 2016/03/18 $"
__revision__ = "$Date: 2016/08/04 $"
__license__ = "GPLv3"
import crayons
try:
from stegano import lsbset
from stegano.lsbset import generators
@ -120,4 +122,7 @@ elif arguments.command == 'list-generators':
import inspect
all_generators = inspect.getmembers(generators, inspect.isfunction)
for generator in all_generators:
print(generator[0], generator[1].__doc__)
print('Generator id:\n {}\nDesciption:\n {}'.format(
crayons.green(generator[0]),
generator[1].__doc__))
print('')