nikki 0.5.2 → 0.5.3

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
  SHA1:
3
- metadata.gz: ea6c3fbdef3033405967dbb776f8e7ccee6e1d66
4
- data.tar.gz: 5cd97d3694bb90b344c32f587a90a5588f4f30c6
3
+ metadata.gz: 9095ed9114a29ee556f7bdcfe72151f6c5edc79f
4
+ data.tar.gz: b3bf286f987f69057f127a39d3803c3c4432f154
5
5
  SHA512:
6
- metadata.gz: 0ed300ecd2c51e4c51320fd04c93c943dcf358c3a3db304d82bd5838dfea24017b79dd8564120d1bb265f154a8d99782271c7fa920ba9f925703c6b75c1bd3fc
7
- data.tar.gz: 79fb38bed057c4af7f44e40f668803a3d6c8db91569e3962f24a9bfa0ed4ccb9c467d9d4356fbba53544775a7f5324d4b3cbb815b67c5df0656f0a2479a6a251
6
+ metadata.gz: f85104c04cf8466163cdf791693c5637d89fe4132e67a23dfb8dddcc220c6b4d2dd4a8837a69944b0ba0d2b97c435347589ec99b274716b1f71951758d6f3e3d
7
+ data.tar.gz: 40304f691b4540f3717064caf6b8c2a85cb8225f4e27f3b095413a2af5c585a15c2c0a2e7e5bd490773b46901523c2003ffd7abd529fffb19a21f28089b23a38
data/.tags ADDED
@@ -0,0 +1,6 @@
1
+ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
2
+ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
3
+ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
4
+ !_TAG_PROGRAM_NAME Exuberant Ctags //
5
+ !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
6
+ !_TAG_PROGRAM_VERSION 5.8 //
data/.travis.yml CHANGED
@@ -1 +1,3 @@
1
- ruby: 2.1.2
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.1
data/README.md CHANGED
@@ -29,6 +29,7 @@ Or install it yourself as:
29
29
  nikki help [COMMAND] # Describe available commands or one specific command
30
30
  nikki new ENTRY # Creates a new entry in the Nikki journal.
31
31
  nikki open # Open current year's journal file in editor.
32
+ nikki publish YEAR # Save a MultiMarkdown-formatted version of a Nikki journal.
32
33
  nikki setup # Creates new Nikki and config files.
33
34
 
34
35
  ## Examples
data/doc/Generator.html CHANGED
@@ -209,7 +209,31 @@ the heavy lifting for Nikki. It&#39;s a bit of a “God” object. Sorries.</p>
209
209
  <li class="public ">
210
210
  <span class="summary_signature">
211
211
 
212
- <a href="#new-instance_method" title="#new (instance method)">- (Hash) <strong>new</strong>(*entry) </a>
212
+ <a href="#missed-instance_method" title="#missed (instance method)">- (Object) <strong>missed</strong>(entry) </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ <span class="summary_desc"><div class='inline'>
227
+ <p>Creates a new entry for yesterday.</p>
228
+ </div></span>
229
+
230
+ </li>
231
+
232
+
233
+ <li class="public ">
234
+ <span class="summary_signature">
235
+
236
+ <a href="#new-instance_method" title="#new (instance method)">- (Hash) <strong>new</strong>(entry, update = nil) </a>
213
237
 
214
238
 
215
239
 
@@ -362,18 +386,18 @@ with one big description list.</p>
362
386
  <pre class="lines">
363
387
 
364
388
 
365
- 72
366
- 73
367
- 74
368
- 75
369
- 76
370
- 77
371
- 78
372
- 79
373
- 80</pre>
389
+ 85
390
+ 86
391
+ 87
392
+ 88
393
+ 89
394
+ 90
395
+ 91
396
+ 92
397
+ 93</pre>
374
398
  </td>
375
399
  <td>
376
- <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 72</span>
400
+ <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 85</span>
377
401
 
378
402
  <span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
379
403
  <span class='id identifier rubyid_settings'>settings</span> <span class='op'>=</span> <span class='id identifier rubyid_read_config'>read_config</span>
@@ -422,6 +446,62 @@ with one big description list.</p>
422
446
 
423
447
  </ul>
424
448
 
449
+ </div><table class="source_code">
450
+ <tr>
451
+ <td>
452
+ <pre class="lines">
453
+
454
+
455
+ 68
456
+ 69
457
+ 70</pre>
458
+ </td>
459
+ <td>
460
+ <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 68</span>
461
+
462
+ <span class='kw'>def</span> <span class='id identifier rubyid_ls'>ls</span>
463
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_latest'>latest</span>
464
+ <span class='kw'>end</span></pre>
465
+ </td>
466
+ </tr>
467
+ </table>
468
+ </div>
469
+
470
+ <div class="method_details ">
471
+ <h3 class="signature " id="missed-instance_method">
472
+
473
+ - (<tt>Object</tt>) <strong>missed</strong>(entry)
474
+
475
+
476
+
477
+
478
+
479
+ </h3><div class="docstring">
480
+ <div class="discussion">
481
+
482
+ <p>Creates a new entry for yesterday</p>
483
+
484
+
485
+ </div>
486
+ </div>
487
+ <div class="tags">
488
+ <p class="tag_title">Parameters:</p>
489
+ <ul class="param">
490
+
491
+ <li>
492
+
493
+ <span class='name'>entry</span>
494
+
495
+
496
+ <span class='type'>(<tt>String</tt>)</span>
497
+
498
+
499
+
500
+ </li>
501
+
502
+ </ul>
503
+
504
+
425
505
  </div><table class="source_code">
426
506
  <tr>
427
507
  <td>
@@ -435,8 +515,8 @@ with one big description list.</p>
435
515
  <td>
436
516
  <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 55</span>
437
517
 
438
- <span class='kw'>def</span> <span class='id identifier rubyid_ls'>ls</span>
439
- <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_latest'>latest</span>
518
+ <span class='kw'>def</span> <span class='id identifier rubyid_missed'>missed</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='rparen'>)</span>
519
+ <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
440
520
  <span class='kw'>end</span></pre>
441
521
  </td>
442
522
  </tr>
@@ -446,7 +526,7 @@ with one big description list.</p>
446
526
  <div class="method_details ">
447
527
  <h3 class="signature " id="new-instance_method">
448
528
 
449
- - (<tt>Hash</tt>) <strong>new</strong>(*entry)
529
+ - (<tt>Hash</tt>) <strong>new</strong>(entry, update = nil)
450
530
 
451
531
 
452
532
 
@@ -480,7 +560,7 @@ task in OmniFocus at the end.</p>
480
560
 
481
561
  <li>
482
562
 
483
- <span class='name'>--entry</span>
563
+ <span class='name'>entry</span>
484
564
 
485
565
 
486
566
  <span class='type'>(<tt>String</tt>)</span>
@@ -490,6 +570,24 @@ task in OmniFocus at the end.</p>
490
570
  &mdash;
491
571
  <div class='inline'>
492
572
  <p>entry to add to the journal</p>
573
+ </div>
574
+
575
+ </li>
576
+
577
+ <li>
578
+
579
+ <span class='name'>update</span>
580
+
581
+
582
+ <span class='type'>(<tt>String</tt>)</span>
583
+
584
+
585
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
586
+
587
+
588
+ &mdash;
589
+ <div class='inline'>
590
+ <p>International date for update</p>
493
591
  </div>
494
592
 
495
593
  </li>
@@ -521,7 +619,6 @@ task in OmniFocus at the end.</p>
521
619
  <pre class="lines">
522
620
 
523
621
 
524
- 33
525
622
  34
526
623
  35
527
624
  36
@@ -532,16 +629,27 @@ task in OmniFocus at the end.</p>
532
629
  41
533
630
  42
534
631
  43
535
- 44</pre>
632
+ 44
633
+ 45
634
+ 46
635
+ 47
636
+ 48
637
+ 49
638
+ 50</pre>
536
639
  </td>
537
640
  <td>
538
- <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 33</span>
641
+ <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 34</span>
539
642
 
540
- <span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_entry'>entry</span><span class='rparen'>)</span>
643
+ <span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='comma'>,</span> <span class='id identifier rubyid_update'>update</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
541
644
  <span class='id identifier rubyid_settings'>settings</span> <span class='op'>=</span> <span class='id identifier rubyid_read_config'>read_config</span>
542
- <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='symbol'>:updated</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_today'>today</span>
543
- <span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
544
- <span class='id identifier rubyid_entry_hash'>entry_hash</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_today'>today</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_entry'>entry</span> <span class='rbrace'>}</span>
645
+ <span class='kw'>if</span> <span class='id identifier rubyid_update'>update</span>
646
+ <span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_update'>update</span><span class='rparen'>)</span>
647
+ <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='symbol'>:updated</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span>
648
+ <span class='kw'>else</span>
649
+ <span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='id identifier rubyid_today'>today</span>
650
+ <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='symbol'>:updated</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_today'>today</span>
651
+ <span class='kw'>end</span>
652
+ <span class='id identifier rubyid_entry_hash'>entry_hash</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_date'>date</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_entry'>entry</span> <span class='rbrace'>}</span>
545
653
  <span class='id identifier rubyid_journal'>journal</span> <span class='op'>=</span> <span class='id identifier rubyid_read_file'>read_file</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_entry_hash'>entry_hash</span><span class='rparen'>)</span>
546
654
  <span class='id identifier rubyid_write_file'>write_file</span><span class='lparen'>(</span><span class='id identifier rubyid_journal'>journal</span><span class='rparen'>)</span>
547
655
  <span class='id identifier rubyid_open'>open</span> <span class='kw'>unless</span> <span class='id identifier rubyid_updated_yesterday?'>updated_yesterday?</span>
@@ -580,12 +688,12 @@ task in OmniFocus at the end.</p>
580
688
  <pre class="lines">
581
689
 
582
690
 
583
- 48
584
- 49
585
- 50</pre>
691
+ 61
692
+ 62
693
+ 63</pre>
586
694
  </td>
587
695
  <td>
588
- <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 48</span>
696
+ <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 61</span>
589
697
 
590
698
  <span class='kw'>def</span> <span class='id identifier rubyid_open'>open</span>
591
699
  <span class='backtick'>%x{</span><span class='tstring_content'>open -a &quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_editor'>editor</span><span class='embexpr_end'>}</span><span class='tstring_content'>&quot; </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_file'>file</span><span class='embexpr_end'>}</span><span class='tstring_end'>}</span></span>
@@ -643,14 +751,14 @@ now, it seems good enough.</p>
643
751
  <pre class="lines">
644
752
 
645
753
 
646
- 87
647
- 88
648
- 89
649
- 90
650
- 91</pre>
754
+ 100
755
+ 101
756
+ 102
757
+ 103
758
+ 104</pre>
651
759
  </td>
652
760
  <td>
653
- <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 87</span>
761
+ <pre class="code"><span class="info file"># File 'lib/nikki.rb', line 100</span>
654
762
 
655
763
  <span class='kw'>def</span> <span class='id identifier rubyid_publish'>publish</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
656
764
  <span class='id identifier rubyid_md_path'>md_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>nikki_markdown_</span><span class='embexpr_beg'>#{</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='embexpr_end'>}</span><span class='tstring_content'>.md</span><span class='tstring_end'>&quot;</span></span>
@@ -712,7 +820,7 @@ now, it seems good enough.</p>
712
820
  </div>
713
821
 
714
822
  <div id="footer">
715
- Generated on Tue Sep 9 16:01:49 2014 by
823
+ Generated on Tue Sep 30 15:46:41 2014 by
716
824
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
717
825
  0.8.7.4 (ruby-2.1.2).
718
826
  </div>
data/doc/Nikki.html CHANGED
@@ -128,7 +128,7 @@
128
128
 
129
129
  </div>
130
130
  </dt>
131
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.5.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
131
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.5.2</span><span class='tstring_end'>&quot;</span></span></pre></dd>
132
132
 
133
133
  </dl>
134
134
 
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
 
146
146
  <div id="footer">
147
- Generated on Tue Sep 9 16:01:49 2014 by
147
+ Generated on Tue Sep 30 15:46:41 2014 by
148
148
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
149
149
  0.8.7.4 (ruby-2.1.2).
150
150
  </div>
data/doc/_index.html CHANGED
@@ -128,7 +128,7 @@
128
128
  </div>
129
129
 
130
130
  <div id="footer">
131
- Generated on Tue Sep 9 16:01:49 2014 by
131
+ Generated on Tue Sep 30 15:46:41 2014 by
132
132
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
133
133
  0.8.7.4 (ruby-2.1.2).
134
134
  </div>
data/doc/file.README.html CHANGED
@@ -111,6 +111,7 @@
111
111
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_help'>help</span> <span class='lbracket'>[</span><span class='const'>COMMAND</span><span class='rbracket'>]</span> <span class='comment'># Describe available commands or one specific command
112
112
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_new'>new</span> <span class='const'>ENTRY</span> <span class='comment'># Creates a new entry in the Nikki journal.
113
113
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_open'>open</span> <span class='comment'># Open current year&#39;s journal file in editor.
114
+ </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_publish'>publish</span> <span class='const'>YEAR</span> <span class='comment'># Save a MultiMarkdown-formatted version of a Nikki journal.
114
115
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_setup'>setup</span> <span class='comment'># Creates new Nikki and config files.
115
116
  </span></code></pre>
116
117
 
@@ -139,7 +140,7 @@
139
140
  </div></div>
140
141
 
141
142
  <div id="footer">
142
- Generated on Tue Sep 9 16:01:49 2014 by
143
+ Generated on Tue Sep 30 15:46:41 2014 by
143
144
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
144
145
  0.8.7.4 (ruby-2.1.2).
145
146
  </div>
data/doc/index.html CHANGED
@@ -111,6 +111,7 @@
111
111
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_help'>help</span> <span class='lbracket'>[</span><span class='const'>COMMAND</span><span class='rbracket'>]</span> <span class='comment'># Describe available commands or one specific command
112
112
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_new'>new</span> <span class='const'>ENTRY</span> <span class='comment'># Creates a new entry in the Nikki journal.
113
113
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_open'>open</span> <span class='comment'># Open current year&#39;s journal file in editor.
114
+ </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_publish'>publish</span> <span class='const'>YEAR</span> <span class='comment'># Save a MultiMarkdown-formatted version of a Nikki journal.
114
115
  </span><span class='id identifier rubyid_nikki'>nikki</span> <span class='id identifier rubyid_setup'>setup</span> <span class='comment'># Creates new Nikki and config files.
115
116
  </span></code></pre>
116
117
 
@@ -139,7 +140,7 @@
139
140
  </div></div>
140
141
 
141
142
  <div id="footer">
142
- Generated on Tue Sep 9 16:01:49 2014 by
143
+ Generated on Tue Sep 30 15:46:41 2014 by
143
144
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
144
145
  0.8.7.4 (ruby-2.1.2).
145
146
  </div>
data/doc/method_list.html CHANGED
@@ -68,24 +68,30 @@
68
68
 
69
69
 
70
70
  <li class="r1 ">
71
- <span class='object_link'><a href="Generator.html#new-instance_method" title="Generator#new (method)">#new</a></span>
71
+ <span class='object_link'><a href="Generator.html#missed-instance_method" title="Generator#missed (method)">#missed</a></span>
72
72
  <small>Generator</small>
73
73
  </li>
74
74
 
75
75
 
76
76
  <li class="r2 ">
77
- <span class='object_link'><a href="Generator.html#open-instance_method" title="Generator#open (method)">#open</a></span>
77
+ <span class='object_link'><a href="Generator.html#new-instance_method" title="Generator#new (method)">#new</a></span>
78
78
  <small>Generator</small>
79
79
  </li>
80
80
 
81
81
 
82
82
  <li class="r1 ">
83
- <span class='object_link'><a href="Generator.html#publish-instance_method" title="Generator#publish (method)">#publish</a></span>
83
+ <span class='object_link'><a href="Generator.html#open-instance_method" title="Generator#open (method)">#open</a></span>
84
84
  <small>Generator</small>
85
85
  </li>
86
86
 
87
87
 
88
88
  <li class="r2 ">
89
+ <span class='object_link'><a href="Generator.html#publish-instance_method" title="Generator#publish (method)">#publish</a></span>
90
+ <small>Generator</small>
91
+ </li>
92
+
93
+
94
+ <li class="r1 ">
89
95
  <span class='object_link'><a href="Generator.html#setup-instance_method" title="Generator#setup (method)">#setup</a></span>
90
96
  <small>Generator</small>
91
97
  </li>
@@ -131,7 +131,7 @@
131
131
  </div>
132
132
 
133
133
  <div id="footer">
134
- Generated on Tue Sep 9 16:01:49 2014 by
134
+ Generated on Tue Sep 30 15:46:41 2014 by
135
135
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
136
136
  0.8.7.4 (ruby-2.1.2).
137
137
  </div>
@@ -184,7 +184,7 @@
184
184
  </div>
185
185
 
186
186
  <div id="footer">
187
- Generated on Tue Sep 9 16:01:49 2014 by
187
+ Generated on Tue Sep 30 15:46:41 2014 by
188
188
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
189
189
  0.8.7.4 (ruby-2.1.2).
190
190
  </div>
@@ -123,7 +123,7 @@
123
123
  </div>
124
124
 
125
125
  <div id="footer">
126
- Generated on Tue Sep 9 16:01:49 2014 by
126
+ Generated on Tue Sep 30 15:46:41 2014 by
127
127
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
128
128
  0.8.7.4 (ruby-2.1.2).
129
129
  </div>
@@ -119,7 +119,7 @@
119
119
  </div>
120
120
 
121
121
  <div id="footer">
122
- Generated on Tue Sep 9 16:01:49 2014 by
122
+ Generated on Tue Sep 30 15:46:41 2014 by
123
123
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
124
  0.8.7.4 (ruby-2.1.2).
125
125
  </div>
data/lib/nikki/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Sets version for RubyGems
2
2
  module Nikki
3
3
  # Sets version for RubyGems
4
- VERSION = "0.5.2"
4
+ VERSION = "0.5.3"
5
5
  end
data/lib/nikki.rb CHANGED
@@ -19,7 +19,8 @@ class Generator < Thor
19
19
 
20
20
  desc "new ENTRY", "Creates a new entry in the Nikki journal."
21
21
  # Add entry to journal
22
- # @param --entry [String] entry to add to the journal
22
+ # @param entry [String] entry to add to the journal
23
+ # @param update [String] International date for update
23
24
  # @return [Hash] Returns a Hash which is then saved in a YAML file.
24
25
  # @example
25
26
  # "nikki new 'This is a thing I learned today!'"
@@ -30,11 +31,16 @@ class Generator < Thor
30
31
  # and merging the hash of entries, and then saves the YAML back again.
31
32
  # There's also a method to check off a corresponding task in OmniFocus at the
32
33
  # end.
33
- def new(*entry)
34
+ def new(entry, update=nil)
34
35
  settings = read_config
35
- settings[:updated] = today
36
- entry = entry.join(" ")
37
- entry_hash = { today => entry }
36
+ if update
37
+ date = Date.parse(update)
38
+ settings[:updated] = date
39
+ else
40
+ date = today
41
+ settings[:updated] = today
42
+ end
43
+ entry_hash = { date => entry }
38
44
  journal = read_file.merge(entry_hash)
39
45
  write_file(journal)
40
46
  open unless updated_yesterday?
@@ -43,6 +49,13 @@ class Generator < Thor
43
49
  puts latest
44
50
  end
45
51
 
52
+ desc "missed", "Create new entry for yesterday"
53
+ # Creates a new entry for yesterday
54
+ # @param entry [String]
55
+ def missed(entry)
56
+ new(entry, (Date.today-1).to_s)
57
+ end
58
+
46
59
  desc "open", "Open current year's journal file in editor."
47
60
  # Open Nikki journal in configured text editor
48
61
  def open
@@ -162,6 +175,10 @@ class Generator < Thor
162
175
  Date.today
163
176
  end
164
177
 
178
+ def yesterday
179
+ Date.today-1
180
+ end
181
+
165
182
  def months_with_names
166
183
  {1=>{:name=>"January"},
167
184
  2=>{:name=>"February"},
@@ -211,7 +228,7 @@ class Generator < Thor
211
228
  %x{osascript <<-APPLESCRIPT
212
229
  tell application "OmniFocus"
213
230
  tell default document
214
- set nikki_task to first remaining task of flattened context "House" whose name is "Record what I learned today"
231
+ set nikki_task to first remaining task of flattened context "Home" whose name is "Record what I learned today"
215
232
  set completed of nikki_task to true
216
233
  end tell
217
234
  end tell
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nikki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Pittman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-09 00:00:00.000000000 Z
11
+ date: 2014-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -104,6 +104,7 @@ extra_rdoc_files: []
104
104
  files:
105
105
  - ".gitignore"
106
106
  - ".rspec"
107
+ - ".tags"
107
108
  - ".travis.yml"
108
109
  - Gemfile
109
110
  - License.txt