doing 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +50 -3
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +15 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a196efa7539ea75803e860bb9f2085433f4810eedf380da90ecf3f73a0981049
|
4
|
+
data.tar.gz: 620c726d10967fb0b7f8ad1256ae6709ec7eb475d1cca75f55941f3436686321
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ea8b06c7a10b05978785ad5cbc6cf61f898c221d433b863b8749a5c179620c2319196a171108081c24a8863b7cf9358f703e914c902d460fda2c4f86b56f753
|
7
|
+
data.tar.gz: 8139559b029d38a8802e6b4bb8a9ab8b2e309dd940dac7bf08ad5761771f808d047737fe87e666e630f7d579de73f19cc989bc6e9e1d502366b4173ac3b9a1b8
|
data/README.md
CHANGED
@@ -272,15 +272,57 @@ Outputs:
|
|
272
272
|
|
273
273
|
You can also specify a default output format for a view. Most of the optional output formats override the template specification (`html`, `csv`, `json`). If the `view` command is used with the `-o` flag, it will override what's specified in the file.
|
274
274
|
|
275
|
+
### Colors
|
276
|
+
|
277
|
+
You can use the following colors in view templates. Set a foreground color with a named color:
|
278
|
+
|
279
|
+
%black
|
280
|
+
%red
|
281
|
+
%green
|
282
|
+
%yellow
|
283
|
+
%blue
|
284
|
+
%magenta
|
285
|
+
%cyan
|
286
|
+
%white
|
287
|
+
|
288
|
+
You can also add a background color (`%bg[color]`) by placing one after the foreground color:
|
289
|
+
|
290
|
+
%white%bgblack
|
291
|
+
%black%bgred
|
292
|
+
...etc.
|
293
|
+
|
294
|
+
There are bold variants for both foreground and background colors
|
295
|
+
|
296
|
+
%boldblack
|
297
|
+
%boldred
|
298
|
+
... etc.
|
299
|
+
|
300
|
+
%boldbgblack
|
301
|
+
%boldbgred
|
302
|
+
... etc.
|
303
|
+
|
304
|
+
And a few special colors you'll just have to try out to see:
|
305
|
+
|
306
|
+
%softpurple
|
307
|
+
%hotpants
|
308
|
+
%knightrider
|
309
|
+
%flamingo
|
310
|
+
%yeller
|
311
|
+
%whiteboard
|
312
|
+
|
313
|
+
Any time you use one of the foreground colors it will reset the bold and background settings to their default automatically. You can force a reset to default terminal colors using `%default`.
|
314
|
+
|
275
315
|
## Usage
|
276
316
|
|
277
317
|
doing [global options] command [command options] [arguments...]
|
278
318
|
|
279
319
|
### Global options:
|
280
320
|
|
281
|
-
|
282
|
-
--
|
283
|
-
--
|
321
|
+
-f, --doing_file=arg - Specify a different doing_file (default: none)
|
322
|
+
--help - Show this message
|
323
|
+
--[no-]notes - Output notes if included in the template (default: enabled)
|
324
|
+
--stdout - Send results report to STDOUT instead of STDERR
|
325
|
+
--version - Display the program version
|
284
326
|
|
285
327
|
### Commands:
|
286
328
|
|
@@ -490,6 +532,11 @@ I'll try to document some of the code structure as I flesh it out. I'm currently
|
|
490
532
|
|
491
533
|
## Changelog
|
492
534
|
|
535
|
+
#### 1.0.18
|
536
|
+
|
537
|
+
- Fix `undefined method [] for nil class` error in `doing view`
|
538
|
+
- Loosened up the template color resetting a bit more
|
539
|
+
|
493
540
|
#### 1.0.17
|
494
541
|
|
495
542
|
- Add `--stdout` global option to send reporting to STDOUT instead of STDERR (for use with LaunchBar et al)
|
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -1051,7 +1051,12 @@ EOT
|
|
1051
1051
|
output.sub!(/%section/,item['section']) if item['section']
|
1052
1052
|
|
1053
1053
|
if opt[:tags_color]
|
1054
|
-
|
1054
|
+
escapes = output.scan(/(\e\[[\d;]+m)[^\e]+@/)
|
1055
|
+
if escapes.length > 0
|
1056
|
+
last_color = escapes[-1][0]
|
1057
|
+
else
|
1058
|
+
last_color = colors['default']
|
1059
|
+
end
|
1055
1060
|
output.gsub!(/\s(@[^ \(]+)/," #{colors[opt[:tags_color]]}\\1#{last_color}")
|
1056
1061
|
end
|
1057
1062
|
output.sub!(/%note/,note)
|
@@ -1176,14 +1181,14 @@ EOT
|
|
1176
1181
|
color['magenta'] = "\033[0;0;35m"
|
1177
1182
|
color['cyan'] = "\033[0;0;36m"
|
1178
1183
|
color['white'] = "\033[0;0;37m"
|
1179
|
-
color['bgblack'] = "\033[
|
1180
|
-
color['bgred'] = "\033[
|
1181
|
-
color['bggreen'] = "\033[
|
1182
|
-
color['bgyellow'] = "\033[
|
1183
|
-
color['bgblue'] = "\033[
|
1184
|
-
color['bgmagenta'] = "\033[
|
1185
|
-
color['bgcyan'] = "\033[
|
1186
|
-
color['bgwhite'] = "\033[
|
1184
|
+
color['bgblack'] = "\033[40m"
|
1185
|
+
color['bgred'] = "\033[41m"
|
1186
|
+
color['bggreen'] = "\033[42m"
|
1187
|
+
color['bgyellow'] = "\033[43m"
|
1188
|
+
color['bgblue'] = "\033[44m"
|
1189
|
+
color['bgmagenta'] = "\033[45m"
|
1190
|
+
color['bgcyan'] = "\033[46m"
|
1191
|
+
color['bgwhite'] = "\033[47m"
|
1187
1192
|
color['boldblack'] = "\033[1;30m"
|
1188
1193
|
color['boldred'] = "\033[1;31m"
|
1189
1194
|
color['boldgreen'] = "\033[0;1;32m"
|
@@ -1206,7 +1211,7 @@ EOT
|
|
1206
1211
|
color['flamingo'] = "\033[7;31;47m"
|
1207
1212
|
color['yeller'] = "\033[1;37;43m"
|
1208
1213
|
color['whiteboard'] = "\033[1;30;47m"
|
1209
|
-
color['default']="\033[0;39m"
|
1214
|
+
color['default'] = "\033[0;39m"
|
1210
1215
|
color
|
1211
1216
|
end
|
1212
1217
|
|