| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::colorplus; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
50281
|
use 5.006; |
|
|
1
|
|
|
|
|
3
|
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
15
|
|
|
5
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
55
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
App::colorplus - The great new App::colorplus! |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.31 |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.31'; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
colorplus |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 VERSION |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
0.31 (2018-07-10) |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
colorplus [-0] [-n N|-3|-4] [-c colorname] [-e N[,N[,N..]]] [-l N] [-s REGEX] [-t N] [-/ char] |
|
32
|
|
|
|
|
|
|
colorplus [--help [opt|en]] [--version] |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Put colors (ASCII color escape sequnces) parts on text data such as numerical parts, |
|
37
|
|
|
|
|
|
|
columns cyclically, text matching specific regular expressions. Useful to look around |
|
38
|
|
|
|
|
|
|
CSV/TSV files with a pager LESS (less -R). |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 OPTIONS |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=over 4 |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=item B<-0> |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Remove colors (remove all the ASCII color escape sequences). |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item B<-n> N |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Put colors on numerical characters. Every neighboring N digits from the bottom of a numerical |
|
51
|
|
|
|
|
|
|
character sequence has a same color. Cyan, green, yellow are used to colorize. |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item B<-3> |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Same as the specification B<-n 3>. |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item B<-4> |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Same as the specification B<-n 4>. |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item B<-c> colorname |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Speficy the colorname. It can be "blue", "red", "yellow", and also "on_while", "underline" and so on. |
|
64
|
|
|
|
|
|
|
See the ASCII color escape sequences. |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item B<-e> N,N,... |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Any operation by "colorplus" is exemplified on the lines specified by the number(s) beginning from 1. |
|
69
|
|
|
|
|
|
|
-0 is also cancelled on the specified lines, thus in this case, the input color on the specified line |
|
70
|
|
|
|
|
|
|
will survive. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item B<-l> N |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
One line from every N lines are colored. The default color : "on_blue". |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item B<-s> REGEX |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
The matched charcter string by the regular expression specified will be colored. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item B<-t> N |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Every neighboring N column(s) has a same color such as "untouched" and "on_blue". |
|
83
|
|
|
|
|
|
|
"On_blue" can be changed by the colorname specified by "-b". |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item B<-/> string |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
The column delimiter. Default value is a tab character (\x{09}). IF '' (empty string) is |
|
88
|
|
|
|
|
|
|
specified, each character in the input text is regarded as a column. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item B<--help> |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Show this help. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item B<--help ja> |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Show Japanese help manual. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item B<--version> |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Show the version of this program. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=back |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 EXAMPLE |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
B # Every number is colorized 3 digits by 3 digits. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
B # Every 5 columns is cyclically colorized. |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
B "hello" B<-b> bright_yellow # Specific character string is colorized. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 AUTHOR |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Toshiyuki Shimono |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 BUGS |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
|
121
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
|
122
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 SUPPORT |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
perldoc App::colorplus |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
You can also look for information at: |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=over 4 |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
L |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
L |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item * CPAN Ratings |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
L |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item * Search CPAN |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
L |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=back |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
Copyright 2018 "Toshiyuki Shimono". |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify |
|
165
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
|
166
|
|
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or |
|
167
|
|
|
|
|
|
|
(at your option) any later version. |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
|
170
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
171
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
172
|
|
|
|
|
|
|
GNU General Public License for more details. |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
|
175
|
|
|
|
|
|
|
along with this program. If not, see L. |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=cut |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
1; # End of App::colorplus |