adding verbosity..

This commit is contained in:
q
2016-10-30 12:33:10 +02:00
parent 2c7b94acce
commit 4219c41ff3
4 changed files with 15 additions and 10 deletions

View File

@@ -98,3 +98,6 @@ class code:
return self.custom_match.sub('\033[\\2',s)
def custom_nocolor(self,s):
return self.custom_match.sub('',s)
def get_keys(self):
return self.color_keys

View File

@@ -11,14 +11,15 @@ __version__ = "0.2"
''' Rules modified from mistune project '''
def setup_options():
bc=ansi.code()
''' Create command line options '''
usage='''
Markdown syntax color in ansi codes.
Special syntaxes:
* Colors: insert string ${C}, where C is one of KRGBYMCWkrgbymcwSUZ
* Any ANSI control code: ${3A}, ${1;34;42m}, etc..
Colors: insert string ${C}, where C is one of %s.
Any ANSI control code: ${3A}, ${1;34;42m}, etc..
'''
'''%(" ".join(bc.get_keys()))
parser=ArgumentParser(description=usage,
epilog=__author__)

View File

@@ -32,9 +32,9 @@ def setup_options():
usage='''
Color notation renderer in ANSI codes
Special syntaxes:
* Colors: insert string ${C}, where C is one of KRGBYMCWkrgbymcwSUZ
* Colors: insert string ${X}, where X is one of %s.
'''
'''%(" ".join(bc.get_keys()))
parser=ArgumentParser(description=usage,
formatter_class=argparse.RawDescriptionHelpFormatter,