doing 1.0.42 → 1.0.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/bin/doing +87 -66
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +697 -668
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79bbbd412d3baf3354d88cb70c55aacf028e2260cfcb901bb0e66fac4ed4722a
|
4
|
+
data.tar.gz: 75e8f05005c05439aa3be05c51386745451ae83e8d1a3ec09aa9507286567864
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6fb1bb5d8f742bbd39232a4227361e47832968be2ffbc073eb454b6151f81222d91bbe062f4f430a03297d72d71562741915fd7cd0b8609d941e87774901308
|
7
|
+
data.tar.gz: 753d152c469b588f18545ef1bde93e5e8e0591b0b4f7558ed0bfc69e55041c37e6aa8c378ea61f1bd4b7a10d4081ff76f5ae0a1983db72ebd7a5f0d666d237be
|
data/README.md
CHANGED
@@ -393,10 +393,11 @@ Note that you can include a tag with synonyms in the whitelist as well to tag it
|
|
393
393
|
|
394
394
|
#### Adding entries:
|
395
395
|
|
396
|
-
now, did
|
397
|
-
later
|
398
|
-
done
|
399
|
-
meanwhile
|
396
|
+
now, did - Add an entry
|
397
|
+
later - Add an item to the Later section
|
398
|
+
done - Add a completed item with @done(date). No argument finishes last entry.
|
399
|
+
meanwhile - Finish any @meanwhile tasks and optionally create a new one
|
400
|
+
again, resume - Duplicate the last entry as new entry (without @done tag)
|
400
401
|
|
401
402
|
The `doing now` command can accept `-s section_name` to send the new entry straight to a non-default section. It also accepts `--back=AMOUNT` to let you specify a start date in the past using "natural language." For example, `doing now --back=25m ENTRY` or `doing now --back="yesterday 3:30pm" ENTRY`.
|
402
403
|
|
data/bin/doing
CHANGED
@@ -44,7 +44,7 @@ default_value false
|
|
44
44
|
switch [:stdout], :default_value => false, :negatable => false
|
45
45
|
|
46
46
|
desc 'Exclude auto tags and default tags'
|
47
|
-
switch [:x
|
47
|
+
switch [:x, :noauto], :default_value => false
|
48
48
|
|
49
49
|
desc 'Use a specific configuration file'
|
50
50
|
default_value false
|
@@ -52,37 +52,37 @@ flag [:config_file]
|
|
52
52
|
|
53
53
|
|
54
54
|
# desc 'Wrap notes at X chars (0 for no wrap)'
|
55
|
-
# flag [:w
|
55
|
+
# flag [:w, :wrapwidth], :must_match => /^\d+$/, :type => Integer
|
56
56
|
|
57
57
|
desc 'Specify a different doing_file'
|
58
58
|
flag [:f, :doing_file]
|
59
59
|
|
60
60
|
desc 'Add an entry'
|
61
61
|
arg_name 'entry'
|
62
|
-
command [:now
|
62
|
+
command [:now, :next] do |c|
|
63
63
|
c.desc 'Section'
|
64
64
|
c.arg_name 'section_name'
|
65
65
|
c.default_value wwid.current_section
|
66
|
-
c.flag [:s
|
66
|
+
c.flag [:s, :section], :default_value => wwid.current_section
|
67
67
|
|
68
68
|
c.desc "Edit entry with #{ENV['EDITOR']}"
|
69
|
-
c.switch [:e
|
69
|
+
c.switch [:e, :editor]
|
70
70
|
|
71
71
|
c.desc 'Backdate start time [4pm|20m|2h|yesterday noon]'
|
72
|
-
c.flag [:back]
|
72
|
+
c.flag [:b, :back]
|
73
73
|
|
74
74
|
c.desc 'Timed entry, marks last entry in section as @done'
|
75
75
|
c.default_value false
|
76
|
-
c.switch [:f
|
76
|
+
c.switch [:f, :finish_last], :negatable => false, :default_value => false
|
77
77
|
|
78
78
|
c.desc 'Note'
|
79
79
|
c.arg_name 'note_text'
|
80
|
-
c.flag [:n
|
80
|
+
c.flag [:n, :note]
|
81
81
|
|
82
82
|
# c.desc "Edit entry with specified app"
|
83
83
|
# c.arg_name 'editor_app'
|
84
84
|
# c.default_value wwid.config.has_key?('editor_app') && wwid.config['editor_app'] ? wwid.config['editor_app'] : false
|
85
|
-
# c.flag [:a
|
85
|
+
# c.flag [:a, :app]
|
86
86
|
|
87
87
|
c.action do |global_options,options,args|
|
88
88
|
if options[:back]
|
@@ -163,7 +163,7 @@ command :note do |c|
|
|
163
163
|
if input
|
164
164
|
title, note = wwid.format_input(input)
|
165
165
|
if note
|
166
|
-
wwid.note_last(section, note, true)
|
166
|
+
wwid.note_last(section, note, replace: true)
|
167
167
|
else
|
168
168
|
raise "No note content"
|
169
169
|
end
|
@@ -174,14 +174,14 @@ command :note do |c|
|
|
174
174
|
if args.length > 0
|
175
175
|
title, note = wwid.format_input(args.join(" "))
|
176
176
|
note.insert(0, title)
|
177
|
-
wwid.note_last(section, note, options[:r])
|
177
|
+
wwid.note_last(section, note, replace: options[:r])
|
178
178
|
elsif STDIN.stat.size > 0
|
179
179
|
title, note = wwid.format_input(STDIN.read)
|
180
180
|
note.insert(0, title)
|
181
|
-
wwid.note_last(section, note, options[:r])
|
181
|
+
wwid.note_last(section, note, replace: options[:r])
|
182
182
|
else
|
183
183
|
if options[:r]
|
184
|
-
wwid.note_last(section, [], true)
|
184
|
+
wwid.note_last(section, [], replace: true)
|
185
185
|
else
|
186
186
|
raise "You must provide content when adding a note"
|
187
187
|
end
|
@@ -206,7 +206,7 @@ command :meanwhile do |c|
|
|
206
206
|
c.switch [:a, :archive], :default_value => false
|
207
207
|
|
208
208
|
c.desc 'Backdate start date for new entry to date string [4pm|20m|2h|yesterday noon]'
|
209
|
-
c.flag [:back]
|
209
|
+
c.flag [:b, :back]
|
210
210
|
|
211
211
|
c.desc 'Note'
|
212
212
|
c.arg_name 'note_text'
|
@@ -280,7 +280,7 @@ command :later do |c|
|
|
280
280
|
c.flag [:a, :app]
|
281
281
|
|
282
282
|
c.desc 'Backdate start time to date string [4pm|20m|2h|yesterday noon]'
|
283
|
-
c.flag [:back]
|
283
|
+
c.flag [:b, :back]
|
284
284
|
|
285
285
|
c.desc 'Note'
|
286
286
|
c.arg_name 'note_text'
|
@@ -327,14 +327,14 @@ end
|
|
327
327
|
|
328
328
|
desc 'Add a completed item with @done(date). No argument finishes last entry.'
|
329
329
|
arg_name 'entry'
|
330
|
-
command [:done
|
330
|
+
command [:done, :did] do |c|
|
331
331
|
c.desc 'Remove @done tag'
|
332
332
|
c.default_value false
|
333
333
|
c.switch [:r, :remove], :negatable => false, :default_value => false
|
334
334
|
|
335
335
|
c.desc 'Include date'
|
336
336
|
c.default_value true
|
337
|
-
c.switch [:
|
337
|
+
c.switch [:date], :negatable => true, :default_value => true
|
338
338
|
|
339
339
|
c.desc 'Immediately archive the entry'
|
340
340
|
c.default_value false
|
@@ -351,15 +351,15 @@ command [:done,:did] do |c|
|
|
351
351
|
|
352
352
|
c.desc 'Section'
|
353
353
|
c.default_value wwid.current_section
|
354
|
-
c.flag [:s
|
354
|
+
c.flag [:s, :section], :default_value => wwid.current_section
|
355
355
|
|
356
356
|
c.desc "Edit entry with #{ENV['EDITOR']}"
|
357
|
-
c.switch [:e
|
357
|
+
c.switch [:e, :editor]
|
358
358
|
|
359
359
|
# c.desc "Edit entry with specified app"
|
360
360
|
# c.arg_name 'editor_app'
|
361
361
|
# c.default_value wwid.config.has_key?('editor_app') && wwid.config['editor_app'] ? wwid.config['editor_app'] : false
|
362
|
-
# c.flag [:a
|
362
|
+
# c.flag [:a, :app]
|
363
363
|
|
364
364
|
c.action do |global_options,options,args|
|
365
365
|
took = 0
|
@@ -438,14 +438,13 @@ long_desc 'Marks the last X entries with a @done tag and current date. Does not
|
|
438
438
|
arg_name 'count'
|
439
439
|
command :finish do |c|
|
440
440
|
c.desc 'Include date'
|
441
|
-
c.default_value true
|
442
|
-
c.switch [:d,:date], :default_value => true
|
441
|
+
c.switch [:date], :negatable => true, :default_value => true
|
443
442
|
|
444
443
|
c.desc 'Backdate completed date to date string [4pm|20m|2h|yesterday noon]'
|
445
|
-
c.flag [:b
|
444
|
+
c.flag [:b, :back]
|
446
445
|
|
447
446
|
c.desc 'Set the completed date to the start date plus XX[hmd]'
|
448
|
-
c.flag [:t
|
447
|
+
c.flag [:t, :took]
|
449
448
|
|
450
449
|
c.desc 'Auto-generate finish dates from next entry\'s start time. Automatically generate completion dates 1 minute before next start date. --auto overrides the --date and --back parameters.'
|
451
450
|
c.default_value false
|
@@ -453,11 +452,11 @@ command :finish do |c|
|
|
453
452
|
|
454
453
|
c.desc 'Archive entries'
|
455
454
|
c.default_value false
|
456
|
-
c.switch [:a
|
455
|
+
c.switch [:a, :archive], :negatable => false, :default_value => false
|
457
456
|
|
458
457
|
c.desc 'Section'
|
459
458
|
c.default_value wwid.current_section
|
460
|
-
c.flag [:s
|
459
|
+
c.flag [:s, :section], :default_value => wwid.current_section
|
461
460
|
|
462
461
|
c.action do |global_options,options,args|
|
463
462
|
|
@@ -488,6 +487,21 @@ command :finish do |c|
|
|
488
487
|
end
|
489
488
|
end
|
490
489
|
|
490
|
+
desc 'Repeat last entry as new entry'
|
491
|
+
arg_name 'section'
|
492
|
+
command [:again, :resume] do |c|
|
493
|
+
c.desc 'Section'
|
494
|
+
c.flag [:s, :section], :default_value => "All"
|
495
|
+
|
496
|
+
c.desc 'Note'
|
497
|
+
c.arg_name 'note_text'
|
498
|
+
c.flag [:n, :note]
|
499
|
+
|
500
|
+
c.action do |global_options, options, args|
|
501
|
+
wwid.restart_last({ section: options[:s], note: options[:n] })
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
491
505
|
desc 'Tag last entry'
|
492
506
|
arg_name 'tag1 [tag2...]'
|
493
507
|
command :tag do |c|
|
@@ -555,14 +569,14 @@ command :tag do |c|
|
|
555
569
|
end
|
556
570
|
|
557
571
|
desc 'Mark last entry as highlighted'
|
558
|
-
command :mark do |c|
|
572
|
+
command [:mark, :flag] do |c|
|
559
573
|
c.desc 'Section'
|
560
574
|
c.default_value wwid.current_section
|
561
|
-
c.flag [:s
|
575
|
+
c.flag [:s, :section], :default_value => wwid.current_section
|
562
576
|
|
563
577
|
c.desc 'Remove mark'
|
564
578
|
c.default_value false
|
565
|
-
c.switch [:r
|
579
|
+
c.switch [:r, :remove], :negatable => false, :default_value => false
|
566
580
|
|
567
581
|
|
568
582
|
c.action do |global_options,options,args|
|
@@ -577,28 +591,30 @@ arg_name '[section|@tags]'
|
|
577
591
|
command :show do |c|
|
578
592
|
c.desc 'Tag boolean (AND,OR,NONE)'
|
579
593
|
c.default_value "OR"
|
580
|
-
c.flag [:b
|
594
|
+
c.flag [:b, :bool], :default_value => "OR"
|
581
595
|
|
582
596
|
c.desc 'Max count to show'
|
583
597
|
c.default_value 0
|
584
|
-
c.flag [:c
|
598
|
+
c.flag [:c, :count], :default_value => 0
|
585
599
|
|
586
600
|
c.desc 'Age (oldest/newest)'
|
587
601
|
c.default_value 'newest'
|
588
|
-
c.flag [:a
|
602
|
+
c.flag [:a, :age], :default_value => 'newest'
|
589
603
|
|
590
604
|
c.desc 'Sort order (asc/desc)'
|
591
605
|
c.default_value 'asc'
|
592
|
-
c.flag [:s
|
606
|
+
c.flag [:s, :sort], :default_value => 'asc'
|
593
607
|
|
594
608
|
c.desc %{
|
595
|
-
Date range to show, or a single day to filter date on.
|
609
|
+
Date range to show, or a single day to filter date on.
|
610
|
+
Date range argument should be quoted. Date specifications can be natural language.
|
611
|
+
To specify a range, use "to" or "through": `doing show --from "monday to friday"`
|
596
612
|
}
|
597
|
-
c.flag [:f
|
613
|
+
c.flag [:f, :from]
|
598
614
|
|
599
615
|
c.desc 'Show time intervals on @done tasks'
|
600
616
|
c.default_value true
|
601
|
-
c.switch [:t
|
617
|
+
c.switch [:t, :times], :default_value => true
|
602
618
|
|
603
619
|
c.desc 'Show intervals with totals at the end of output'
|
604
620
|
c.default_value false
|
@@ -616,7 +632,7 @@ command :show do |c|
|
|
616
632
|
c.switch [:only_timed], :default_value => false, :negatable => false
|
617
633
|
|
618
634
|
c.desc 'Output to export format (csv|html|json)'
|
619
|
-
c.flag [:o
|
635
|
+
c.flag [:o, :output]
|
620
636
|
c.action do |global_options,options,args|
|
621
637
|
|
622
638
|
tag_filter = false
|
@@ -681,19 +697,24 @@ command :show do |c|
|
|
681
697
|
end
|
682
698
|
|
683
699
|
desc 'Search for entries'
|
684
|
-
long_desc '
|
700
|
+
long_desc <<-'EODESC'
|
701
|
+
Search all sections (or limit to a single section) for entries matching text or regular expression. Normal strings are fuzzy matched.
|
702
|
+
|
703
|
+
To search with regular expressions, single quote the string and surround with slashes: `doing search '/\bm.*?x\b/'`
|
704
|
+
EODESC
|
705
|
+
|
685
706
|
arg_name 'search_pattern'
|
686
|
-
command [:grep
|
707
|
+
command [:grep, :search] do |c|
|
687
708
|
c.desc 'Section'
|
688
709
|
c.default_value "all"
|
689
|
-
c.flag [:s
|
710
|
+
c.flag [:s, :section], :default_value => "All"
|
690
711
|
|
691
712
|
c.desc 'Output to export format (csv|html|json)'
|
692
|
-
c.flag [:o
|
713
|
+
c.flag [:o, :output]
|
693
714
|
|
694
715
|
c.desc 'Show time intervals on @done tasks'
|
695
716
|
c.default_value true
|
696
|
-
c.switch [:t
|
717
|
+
c.switch [:t, :times], :default_value => true
|
697
718
|
|
698
719
|
c.desc 'Show intervals with totals at the end of output'
|
699
720
|
c.default_value false
|
@@ -728,11 +749,11 @@ arg_name 'count'
|
|
728
749
|
command :recent do |c|
|
729
750
|
c.desc 'Section'
|
730
751
|
c.default_value "All"
|
731
|
-
c.flag [:s
|
752
|
+
c.flag [:s, :section], :default_value => "All"
|
732
753
|
|
733
754
|
c.desc 'Show time intervals on @done tasks'
|
734
755
|
c.default_value true
|
735
|
-
c.switch [:t
|
756
|
+
c.switch [:t, :times], :default_value => true
|
736
757
|
|
737
758
|
c.desc 'Show intervals with totals at the end of output'
|
738
759
|
c.default_value false
|
@@ -769,11 +790,11 @@ command :today do |c|
|
|
769
790
|
c.desc 'Specify a section'
|
770
791
|
c.arg_name 'section_name'
|
771
792
|
c.default_value "All"
|
772
|
-
c.flag [:s
|
793
|
+
c.flag [:s, :section], :default_value => 'All'
|
773
794
|
|
774
795
|
c.desc 'Show time intervals on @done tasks'
|
775
796
|
c.default_value true
|
776
|
-
c.switch [:t
|
797
|
+
c.switch [:t, :times], :default_value => true
|
777
798
|
|
778
799
|
c.desc 'Show time totals at the end of output'
|
779
800
|
c.default_value false
|
@@ -787,7 +808,7 @@ command :today do |c|
|
|
787
808
|
c.flag [:tag_sort], :default_value => default
|
788
809
|
|
789
810
|
c.desc 'Output to export format (csv|html|json)'
|
790
|
-
c.flag [:o
|
811
|
+
c.flag [:o, :output]
|
791
812
|
|
792
813
|
c.action do |global_options,options,args|
|
793
814
|
|
@@ -806,11 +827,11 @@ command :on do |c|
|
|
806
827
|
c.desc 'Section'
|
807
828
|
c.arg_name 'section_name'
|
808
829
|
c.default_value 'All'
|
809
|
-
c.flag [:s
|
830
|
+
c.flag [:s, :section], :default_value => 'All'
|
810
831
|
|
811
832
|
c.desc 'Show time intervals on @done tasks'
|
812
833
|
c.default_value true
|
813
|
-
c.switch [:t
|
834
|
+
c.switch [:t, :times], :default_value => true
|
814
835
|
|
815
836
|
c.desc 'Show time totals at the end of output'
|
816
837
|
c.default_value false
|
@@ -824,7 +845,7 @@ command :on do |c|
|
|
824
845
|
c.flag [:tag_sort], :default_value => default
|
825
846
|
|
826
847
|
c.desc 'Output to export format (csv|html|json)'
|
827
|
-
c.flag [:o
|
848
|
+
c.flag [:o, :output]
|
828
849
|
|
829
850
|
c.action do |global_options,options,args|
|
830
851
|
|
@@ -858,14 +879,14 @@ command :yesterday do |c|
|
|
858
879
|
c.desc 'Specify a section'
|
859
880
|
c.arg_name 'section_name'
|
860
881
|
c.default_value "All"
|
861
|
-
c.flag [:s
|
882
|
+
c.flag [:s, :section], :default_value => 'All'
|
862
883
|
|
863
884
|
c.desc 'Output to export format (csv|html|json)'
|
864
|
-
c.flag [:o
|
885
|
+
c.flag [:o, :output]
|
865
886
|
|
866
887
|
c.desc 'Show time intervals on @done tasks'
|
867
888
|
c.default_value true
|
868
|
-
c.switch [:t
|
889
|
+
c.switch [:t, :times], :default_value => true
|
869
890
|
|
870
891
|
c.desc 'Show time totals at the end of output'
|
871
892
|
c.default_value false
|
@@ -889,7 +910,7 @@ desc 'Show the last entry'
|
|
889
910
|
command :last do |c|
|
890
911
|
c.desc 'Specify a section'
|
891
912
|
c.default_value "All"
|
892
|
-
c.flag [:s
|
913
|
+
c.flag [:s, :section]
|
893
914
|
|
894
915
|
c.action do |global_options,options,args|
|
895
916
|
puts wwid.last(true,options[:s]).strip
|
@@ -900,7 +921,7 @@ desc 'List sections'
|
|
900
921
|
command :sections do |c|
|
901
922
|
c.desc 'List in single column'
|
902
923
|
c.default_value false
|
903
|
-
c.switch [:c
|
924
|
+
c.switch [:c, :column], :default_value => false
|
904
925
|
|
905
926
|
c.action do |global_options,options,args|
|
906
927
|
joiner = options[:c] ? "\n" : "\t"
|
@@ -951,17 +972,17 @@ desc 'Display a user-created view'
|
|
951
972
|
arg_name 'view_name'
|
952
973
|
command :view do |c|
|
953
974
|
c.desc 'Section (override view settings)'
|
954
|
-
c.flag [:s
|
975
|
+
c.flag [:s, :section]
|
955
976
|
|
956
977
|
c.desc 'Count to display (override view settings)'
|
957
|
-
c.flag [:c
|
978
|
+
c.flag [:c, :count], :must_match => /^\d+$/, :type => Integer
|
958
979
|
|
959
980
|
c.desc 'Output to export format (csv|html|json)'
|
960
|
-
c.flag [:o
|
981
|
+
c.flag [:o, :output]
|
961
982
|
|
962
983
|
c.desc 'Show time intervals on @done tasks'
|
963
984
|
c.default_value true
|
964
|
-
c.switch [:t
|
985
|
+
c.switch [:t, :times], :default_value => true
|
965
986
|
|
966
987
|
c.desc 'Show intervals with totals at the end of output'
|
967
988
|
c.default_value false
|
@@ -1039,7 +1060,7 @@ desc 'List available custom views'
|
|
1039
1060
|
command :views do |c|
|
1040
1061
|
c.desc 'List in single column'
|
1041
1062
|
c.default_value false
|
1042
|
-
c.switch [:c
|
1063
|
+
c.switch [:c, :column], :default_value => false
|
1043
1064
|
|
1044
1065
|
c.action do |global_options,options,args|
|
1045
1066
|
joiner = options[:c] ? "\n" : "\t"
|
@@ -1053,15 +1074,15 @@ default_value wwid.current_section
|
|
1053
1074
|
command :archive do |c|
|
1054
1075
|
c.desc 'Count to keep (ignored if archiving by tag)'
|
1055
1076
|
c.default_value 5
|
1056
|
-
c.flag [:k
|
1077
|
+
c.flag [:k, :keep], :default_value => 5, :must_match => /^\d+$/, :type => Integer
|
1057
1078
|
|
1058
1079
|
c.desc 'Move entries to'
|
1059
1080
|
c.default_value "Archive"
|
1060
|
-
c.flag [:t
|
1081
|
+
c.flag [:t, :to], :default_value => "Archive"
|
1061
1082
|
|
1062
1083
|
c.desc 'Tag boolean'
|
1063
1084
|
c.default_value "AND"
|
1064
|
-
c.flag [:b
|
1085
|
+
c.flag [:b, :bool], :default_value => "AND"
|
1065
1086
|
|
1066
1087
|
c.action do |global_options,options,args|
|
1067
1088
|
if args.length > 0
|
@@ -1130,7 +1151,7 @@ desc 'Edit the configuration file'
|
|
1130
1151
|
command :config do |c|
|
1131
1152
|
c.desc 'Editor to use'
|
1132
1153
|
c.default_value ENV['EDITOR']
|
1133
|
-
c.flag [:e
|
1154
|
+
c.flag [:e, :editor], :default_value => nil
|
1134
1155
|
|
1135
1156
|
if `uname` =~ /Darwins/
|
1136
1157
|
c.desc 'Application to use'
|
@@ -1169,7 +1190,7 @@ desc 'Undo the last change to the doing_file'
|
|
1169
1190
|
command :undo do |c|
|
1170
1191
|
c.desc 'Specify alternate doing file'
|
1171
1192
|
c.default_value wwid.doing_file
|
1172
|
-
c.flag [:f
|
1193
|
+
c.flag [:f, :file], :default_value => wwid.doing_file
|
1173
1194
|
|
1174
1195
|
c.action do |global_options,options,args|
|
1175
1196
|
file = options[:f] || wwid.doing_file
|
@@ -1212,7 +1233,7 @@ post do |global,command,options,args|
|
|
1212
1233
|
if global[:stdout]
|
1213
1234
|
$stdout.print wwid.results.join("\n")
|
1214
1235
|
else
|
1215
|
-
|
1236
|
+
warn wwid.results.join("\n")
|
1216
1237
|
end
|
1217
1238
|
end
|
1218
1239
|
|