mirror of https://github.com/garabik/grc.git
Compare commits
6 Commits
bfc63e26a6
...
1ad25af01b
Author | SHA1 | Date |
---|---|---|
Jacob Menashe | 1ad25af01b | |
Radovan Garabík | d324edd803 | |
Radovan Garabík | 2c48356775 | |
Jake Menashe | a5ef099539 | |
Petr Menšík | fb349233b4 | |
Gianluca Gabrielli | 6965c30625 |
|
@ -104,7 +104,7 @@ To facilitate the use, command `grc` acts as frontend for `grcat`, automatically
|
|||
|
||||
etc...
|
||||
|
||||
`grc` will execute command command with optional parameters piping its stdout into `grcat`.
|
||||
`grc` will execute command with optional parameters piping its stdout into `grcat`.
|
||||
|
||||
Configuration file for `grcat` is determined by `/etc/grc.conf` or `~/.grc/grc.conf` file.
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ regexp=\s(\d+),\s+(\d+)\s
|
|||
colours=default,bright_yellow ,yellow
|
||||
=======
|
||||
# Date-Time => G1=Month G2=Day G3=Hour G4=Minutes G5=Year
|
||||
regexp=(?:(\w{2,3})\s([ 1-3]\d)|([ 1-3]\d\.?)\s(\w{2,3}))\s(?:([0-2]?\d)[\.:]([0-5]\d)(?=[\s,]|$)|\s*(\d{4}))
|
||||
regexp=(?:(\w{2,5})\s([ 1-3]\d)|([ 1-3]\d\.?)\s(\w{2,5}\.?))\s{1,3}(?:([0-2]?\d)[\.:]([0-5]\d)(?=[\s,]|$)|(\d{4}))
|
||||
colours=unchanged,cyan,cyan,cyan,cyan,cyan,cyan,bold magenta
|
||||
=======
|
||||
# root
|
||||
|
|
7
grcat
7
grcat
|
@ -101,11 +101,8 @@ for c in range(0, 256):
|
|||
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||
|
||||
def add2list(clist, m, patterncolour):
|
||||
for group in range(0, len(m.groups()) +1):
|
||||
if group < len(patterncolour):
|
||||
clist.append((m.start(group), m.end(group), patterncolour[group]))
|
||||
else:
|
||||
clist.append((m.start(group), m.end(group), patterncolour[0]))
|
||||
for group in range(len(m.groups())):
|
||||
clist.append((m.start(group+1), m.end(group+1), patterncolour[group]))
|
||||
|
||||
def get_colour(x):
|
||||
if x in colours:
|
||||
|
|
Loading…
Reference in New Issue