doing 1.0.68 → 1.0.69
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/bin/doing +24 -4
- data/lib/doing/helpers.rb +1 -0
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +3 -1
- 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: bf5235acbab516c74ea7ff28c610dcbc49b9d9f108056c1b3c60ac0100bd9ec5
|
4
|
+
data.tar.gz: ca6abc5bd66a950d78ab16aabc781660b0ea5ee3f6dc50bb8a9fd0b986cce21e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9f62baa0a4348212c54c1f9f3aa5bca041d81bc5061221310a85747b05c0b9b7af9036d309fcffd78e192a7a415f462ceeb96f8c276cef320249651f4890d35
|
7
|
+
data.tar.gz: cc61feaf78e9a3d6865bbb3d5fecdff00659b9b00a7430971012bfca0856e45ee87efd864dde603a7a6e6abf6a571f01f0e8d60afbbb7ebe060364f65c908b6b
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ _Side note:_ I actually use the library behind this utility as part of another s
|
|
29
29
|
|
30
30
|
## Installation
|
31
31
|
|
32
|
-
The current version of `doing` is <!--VER-->1.0.
|
32
|
+
The current version of `doing` is <!--VER-->1.0.68<!--END VER-->.
|
33
33
|
|
34
34
|
$ [sudo] gem install doing
|
35
35
|
|
@@ -464,6 +464,7 @@ You can also include a `--no-date` switch to add `@done` without a finish date,
|
|
464
464
|
|
465
465
|
By default `doing finish` works on a single entry, the last entry or the most recent entry matching a `--tag` or `--search` query. Specifying `doing finish 10` would finish any unfinished entries within the last 10 entries. In the case of `--tag` or `--search` queries, the count serves as the maximum number of matches doing will act on, sorted in reverse date order (most recent first). A count of 0 will disable the limit entirely, acting on all matching entries.
|
466
466
|
|
467
|
+
Both `finish` and `cancel` accept `--unfinished` as an argument. This causes them to act on the last entry not already marked @done, no matter how far back it's dated or how many @done entries come after it. You can use `doing finish --unfinished X -s SECTION` to finish the last X unfinished entries in SECTION.
|
467
468
|
|
468
469
|
##### Tagging and Autotagging
|
469
470
|
|
data/bin/doing
CHANGED
@@ -446,6 +446,9 @@ command :cancel do |c|
|
|
446
446
|
c.arg_name 'BOOLEAN'
|
447
447
|
c.flag [:bool], must_match: /(?:and|all|any|or|not|none)/i, default_value: 'AND'
|
448
448
|
|
449
|
+
c.desc 'Cancel last entry (or entries) not already marked @done'
|
450
|
+
c.switch %i[u unfinished], negatable: false, default_value: false
|
451
|
+
|
449
452
|
c.action do |_global_options, options, args|
|
450
453
|
section = wwid.guess_section(options[:s]) || options[:s].cap_first
|
451
454
|
|
@@ -478,7 +481,8 @@ command :cancel do |c|
|
|
478
481
|
sequential: false,
|
479
482
|
tag: tags,
|
480
483
|
tag_bool: options[:bool],
|
481
|
-
tags: ['done']
|
484
|
+
tags: ['done'],
|
485
|
+
unfinished: options[:unfinished]
|
482
486
|
}
|
483
487
|
wwid.tag_last(opts)
|
484
488
|
end
|
@@ -512,6 +516,9 @@ command :finish do |c|
|
|
512
516
|
c.arg_name 'BOOLEAN'
|
513
517
|
c.flag [:bool], must_match: /(?:and|all|any|or|not|none)/i, default_value: 'AND'
|
514
518
|
|
519
|
+
c.desc 'Finish last entry (or entries) not already marked @done'
|
520
|
+
c.switch %i[u unfinished], negatable: false, default_value: false
|
521
|
+
|
515
522
|
c.desc %(Auto-generate finish dates from next entry's start time.
|
516
523
|
Automatically generate completion dates 1 minute before next start date.
|
517
524
|
--auto overrides the --date and --back parameters.)
|
@@ -574,7 +581,8 @@ command :finish do |c|
|
|
574
581
|
sequential: options[:auto],
|
575
582
|
tag: tags,
|
576
583
|
tag_bool: options[:bool],
|
577
|
-
tags: ['done']
|
584
|
+
tags: ['done'],
|
585
|
+
unfinished: options[:unfinished]
|
578
586
|
}
|
579
587
|
wwid.tag_last(opts)
|
580
588
|
end
|
@@ -648,6 +656,9 @@ command :tag do |c|
|
|
648
656
|
c.desc 'Remove given tag(s)'
|
649
657
|
c.switch %i[r remove], negatable: false, default_value: false
|
650
658
|
|
659
|
+
c.desc 'Tag last entry (or entries) not marked @done'
|
660
|
+
c.switch %i[u unfinished], negatable: false, default_value: false
|
661
|
+
|
651
662
|
c.desc 'Autotag entries based on autotag configuration in ~/.doingrc'
|
652
663
|
c.switch %i[a autotag], negatable: false, default_value: false
|
653
664
|
|
@@ -691,7 +702,8 @@ command :tag do |c|
|
|
691
702
|
date: options[:date],
|
692
703
|
remove: options[:r],
|
693
704
|
section: section,
|
694
|
-
tags: tags
|
705
|
+
tags: tags,
|
706
|
+
unfinished: options[:unfinished]
|
695
707
|
}
|
696
708
|
wwid.tag_last(opts)
|
697
709
|
end
|
@@ -706,9 +718,17 @@ command [:mark, :flag] do |c|
|
|
706
718
|
c.desc 'Remove mark'
|
707
719
|
c.switch %i[r remove], negatable: false, default_value: false
|
708
720
|
|
721
|
+
c.desc 'Mark last entry not marked @done'
|
722
|
+
c.switch %i[u unfinished], negatable: false, default_value: false
|
723
|
+
|
709
724
|
c.action do |_global_options, options, _args|
|
710
725
|
mark = wwid.config['marker_tag'] || 'flagged'
|
711
|
-
wwid.tag_last({
|
726
|
+
wwid.tag_last({
|
727
|
+
remove: options[:r],
|
728
|
+
section: options[:s],
|
729
|
+
tags: [mark],
|
730
|
+
unfinished: options[:unfinished]
|
731
|
+
})
|
712
732
|
end
|
713
733
|
end
|
714
734
|
|
data/lib/doing/helpers.rb
CHANGED
data/lib/doing/version.rb
CHANGED
data/lib/doing/wwid.rb
CHANGED
@@ -781,6 +781,7 @@ class WWID
|
|
781
781
|
opt[:autotag] ||= false
|
782
782
|
opt[:back] ||= false
|
783
783
|
opt[:took] ||= nil
|
784
|
+
opt[:unfinished] ||= false
|
784
785
|
|
785
786
|
sec_arr = []
|
786
787
|
|
@@ -816,10 +817,11 @@ class WWID
|
|
816
817
|
items.map! do |item|
|
817
818
|
break if idx == count
|
818
819
|
|
820
|
+
finished = opt[:unfinished] && item.has_tags?('done', :and)
|
819
821
|
tag_match = opt[:tag].nil? || opt[:tag].empty? ? true : item.has_tags?(opt[:tag], opt[:tag_bool])
|
820
822
|
search_match = opt[:search].nil? || opt[:search].empty? ? true : item.matches_search?(opt[:search])
|
821
823
|
|
822
|
-
if tag_match && search_match
|
824
|
+
if tag_match && search_match && !finished
|
823
825
|
if opt[:autotag]
|
824
826
|
new_title = autotag(item['title']) if @auto_tag
|
825
827
|
if new_title == item['title']
|