Skip to content

Commit

Permalink
Add sample output
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Mar 30, 2018
1 parent e1f15ce commit 0aa536f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ cargo install pipecolor
$ cat sample/access_log | pipecolor -c ./sample/pipecolor.toml
```

<a><img src="https://raw.githubusercontent.com/dalance/pipecolor/master/sample/access_log.svg"/></a>

Filenames can be specified.

```
Expand Down Expand Up @@ -72,7 +74,9 @@ By this, some colorize rules can be switched dynamically.

`formats.lines.pat` is a regular expression to specify colorize lines.
If the expression is matched, the matched line is colorize to colors specified by `formats.lines.colors`.

`formats.lines.colors` is an array of colors, the first color is used to colorize the whole line.
The rest colors are used to colorize the captured group in the expression.
In the example, the whole line is colorized to `White`, the first group captured by `(.*?)` is colorized to `LightGreen`.

`formats.lines.tokens` specifies the special tokens to be colorized in the matched line.
38 changes: 38 additions & 0 deletions sample/access_log.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0aa536f

Please sign in to comment.