Add minimal theme support, and "perm" as an example

This commit is contained in:
Johann Dreo 2013-03-22 21:19:02 +01:00
commit 6ef62a644f
2 changed files with 37 additions and 7 deletions

9
colout_perm.py Normal file
View file

@ -0,0 +1,9 @@
import colout
def theme( item ):
p="([rwxs-])"
reg="^([d-])"+p*9+"\s.*$"
colors="blue"+",green"*3+",yellow"*3+",red"*3
styles="normal"+ ",normal,italic,bold"*3
return colout.colorup( item, reg, colors, styles, True)