doing 1.0.17 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8488b18e8f56269941a0179b2c0c9699b63b0e9704d379add7a0b474c0c5b032
4
- data.tar.gz: f94eaf8652cc1e0c0436620aee40654d9e01c10f147ccf842430416f48f73a51
3
+ metadata.gz: a196efa7539ea75803e860bb9f2085433f4810eedf380da90ecf3f73a0981049
4
+ data.tar.gz: 620c726d10967fb0b7f8ad1256ae6709ec7eb475d1cca75f55941f3436686321
5
5
  SHA512:
6
- metadata.gz: b441df20808e3f6e0822236acc873032cfffe6b4c6c083f8781a714ca502442e73f8abcb6b1e1da1e912e9985016d20c2aca1c0abd1780d68f28d3718c769e53
7
- data.tar.gz: 59e911790a16a38f98da04ab502376eef8e41232ce74456d7db2ba1fff8b9e474702d85743b76e5788b470c4a9128254990dc428d4ba60f74eb9908cccc0e9d3
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
- --[no-]notes - Output notes if included in the template (default: enabled)
282
- --version - Display the program version
283
- --help - Show help message and usage summary
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
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '1.0.17'
2
+ VERSION = '1.0.18'
3
3
  end
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
- last_color = output.scan(/(\e\[[\d;]+m)[^\e]+@/)[-1][0]
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[0;40m"
1180
- color['bgred'] = "\033[0;41m"
1181
- color['bggreen'] = "\033[0;42m"
1182
- color['bgyellow'] = "\033[0;43m"
1183
- color['bgblue'] = "\033[0;44m"
1184
- color['bgmagenta'] = "\033[0;45m"
1185
- color['bgcyan'] = "\033[0;46m"
1186
- color['bgwhite'] = "\033[0;47m"
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra