-
Notifications
You must be signed in to change notification settings - Fork 38
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
5 changed files
with
129 additions
and
52 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
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
from colored import fg, bg, attr | ||
from colored import colored as cobj | ||
|
||
# In developpement mode, for use | ||
# python ~/mygitcheck.py | ||
# python ~/mygitcheck.py | grep magenta | ||
|
||
defaultcolor = attr('reset') + fg('white') | ||
colortheme = { | ||
'default': defaultcolor, | ||
'prjchanged': attr('reset') + attr('bold') + fg('deep_pink_1a'), | ||
'prjremote': attr('reverse') + fg('light_cyan'), | ||
'prjname': attr('reset') + fg('chartreuse_1'), | ||
'reponame': attr('reset') + fg('light_goldenrod_2b'), | ||
'branchname': defaultcolor, | ||
'fileupdated': attr('reset') + fg('light_goldenrod_2b'), | ||
'remoteto': attr('reset') + fg('deep_sky_blue_3b'), | ||
'committo': attr('reset') + fg('violet'), | ||
'commitinfo': attr('reset') + fg('deep_sky_blue_3b'), | ||
'commitstate': attr('reset') + fg('deep_pink_1a'), | ||
'bell': "\a", | ||
'reset': "\033[2J\033[H" | ||
} | ||
|
||
|
||
def searchKeyByValue(search): | ||
"""Search keyname by value""" | ||
c = cobj(0) | ||
for key, value in c.paint.iteritems(): | ||
if value == str(search): | ||
return key | ||
|
||
def searchMaxColorName(): | ||
"""Search Max length colorname""" | ||
c = cobj(0) | ||
maxi = 0 | ||
for key, value in c.paint.iteritems(): | ||
lencolor = len(str(key)) | ||
maxi = max(lencolor, maxi) | ||
|
||
print "Lencolor: %s" % maxi | ||
|
||
if __name__ == "__main__": | ||
#searchMaxColorName() | ||
for idx in range(0, 255): | ||
print "%s%19s %s%s%s%s" % ( | ||
attr('reset') + fg(idx), | ||
searchKeyByValue(idx), | ||
'Normal', | ||
attr('reset') + fg(idx) + attr('bold') + 'Bold', | ||
attr('reset') + fg(idx) + attr('underlined') + 'Underline', | ||
attr('reset') + fg(idx) + attr('reverse') + 'Reverse', | ||
) |
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 @@ | ||
colored==1.2.1 |
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