doing 2.1.13 → 2.1.14
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/.yardoc/checksums +5 -5
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +7 -1
- data/README.md +1 -1
- data/bin/doing +91 -28
- data/docs/doc/Array.html +1 -1
- data/docs/doc/BooleanTermParser/Clause.html +1 -1
- data/docs/doc/BooleanTermParser/Operator.html +1 -1
- data/docs/doc/BooleanTermParser/Query.html +1 -1
- data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
- data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
- data/docs/doc/BooleanTermParser.html +1 -1
- data/docs/doc/Doing/Color.html +1 -1
- data/docs/doc/Doing/Completion.html +1 -1
- data/docs/doc/Doing/Configuration.html +1 -1
- data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
- data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
- data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
- data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
- data/docs/doc/Doing/Errors/NoResults.html +1 -1
- data/docs/doc/Doing/Errors/PluginException.html +1 -1
- data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
- data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
- data/docs/doc/Doing/Errors.html +1 -1
- data/docs/doc/Doing/Hooks.html +1 -1
- data/docs/doc/Doing/Item.html +117 -13
- data/docs/doc/Doing/Items.html +1 -1
- data/docs/doc/Doing/LogAdapter.html +1 -1
- data/docs/doc/Doing/Note.html +1 -1
- data/docs/doc/Doing/Pager.html +1 -1
- data/docs/doc/Doing/Plugins.html +1 -1
- data/docs/doc/Doing/Prompt.html +35 -1
- data/docs/doc/Doing/Section.html +1 -1
- data/docs/doc/Doing/TemplateString.html +1 -1
- data/docs/doc/Doing/Util/Backup.html +1 -1
- data/docs/doc/Doing/Util.html +1 -1
- data/docs/doc/Doing/WWID.html +7 -5
- data/docs/doc/Doing.html +2 -2
- data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
- data/docs/doc/GLI/Commands.html +1 -1
- data/docs/doc/GLI.html +1 -1
- data/docs/doc/Hash.html +1 -1
- data/docs/doc/PhraseParser/Operator.html +1 -1
- data/docs/doc/PhraseParser/PhraseClause.html +1 -1
- data/docs/doc/PhraseParser/Query.html +1 -1
- data/docs/doc/PhraseParser/QueryParser.html +1 -1
- data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
- data/docs/doc/PhraseParser/TermClause.html +1 -1
- data/docs/doc/PhraseParser.html +1 -1
- data/docs/doc/Status.html +1 -1
- data/docs/doc/String.html +1 -1
- data/docs/doc/Symbol.html +1 -1
- data/docs/doc/Time.html +1 -1
- data/docs/doc/_index.html +1 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/method_list.html +206 -198
- data/docs/doc/top-level-namespace.html +1 -1
- data/docs/index.md +1 -1
- data/doing.gemspec +1 -0
- data/doing.rdoc +41 -4
- data/lib/completion/_doing.zsh +11 -11
- data/lib/completion/doing.bash +15 -15
- data/lib/completion/doing.fish +10 -3
- data/lib/doing/item.rb +25 -0
- data/lib/doing/plugins/import/calendar_import.rb +13 -1
- data/lib/doing/plugins/import/doing_import.rb +12 -1
- data/lib/doing/plugins/import/timing_import.rb +13 -1
- data/lib/doing/prompt.rb +13 -1
- data/lib/doing/time.rb +2 -2
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +10 -5
- data/lib/doing.rb +1 -0
- metadata +21 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83151006df40e5509447d601aad17f68c0652923cd4444759568bdc510f809d8
|
|
4
|
+
data.tar.gz: 66cbfb07d1038a5ffa327911039d55aab88695f831735a7f78969ad1f216e3b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59bc1165eeab6e6e8e838e81afb226d978878c813627239b909b89a989a20e9318af5ec43d06b90558ad0ed7f4b6f0061f9ed5a96840e1d8a2e2cae5eb471045
|
|
7
|
+
data.tar.gz: 651ded056737cfab0e8ccae8885f8972fbf1a166315fc0b1952911d4884cd3ed8791f8dedaa3400f94c60c199d229bc409223c1426ed35ef3af55906cb8a3925
|
data/.yardoc/checksums
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
lib/doing/hash.rb c2960de9603dcf90be85ce423d9430de27f4f893
|
|
2
|
-
lib/doing/item.rb
|
|
2
|
+
lib/doing/item.rb be85c6274e7bb07f4dfd00f9d4fe3b93ee3d816c
|
|
3
3
|
lib/doing/note.rb bbadd9e34e6dc43a2af1110a5107f46c39d2547f
|
|
4
|
-
lib/doing/time.rb
|
|
4
|
+
lib/doing/time.rb 6e79c48949e48b8896b18b1856f179d04fd936f9
|
|
5
5
|
lib/doing/util.rb 33ad79455893213a0f2993edec0e158526657f09
|
|
6
|
-
lib/doing/wwid.rb
|
|
6
|
+
lib/doing/wwid.rb 5f3cedc2d4ac8761e869db9d9cc63e0ecfca9681
|
|
7
7
|
lib/doing/array.rb a17004c4811d239932254f9ed94a6eb10456c8e8
|
|
8
8
|
lib/doing/hooks.rb acf6e0615ccf1949f84915c979297845242c1205
|
|
9
9
|
lib/doing/items.rb 8cda7caaef10645893267262f5eee681e35046ce
|
|
10
10
|
lib/doing/pager.rb b58e478b0cb8d400ddb97988ba741e3a127b53c3
|
|
11
11
|
lib/doing/colors.rb 9a628d48c821313c502deedc5b61a046a2bf79ef
|
|
12
12
|
lib/doing/errors.rb af07e482a5389924edc2337749c81cda501098f0
|
|
13
|
-
lib/doing/prompt.rb
|
|
13
|
+
lib/doing/prompt.rb 075dc22031e0f1cd5b2a8dd4cb6e6c3b3dfd2c36
|
|
14
14
|
lib/doing/string.rb 7cbe3e0bd136c52f7b12d4d6133afe20fe204be2
|
|
15
15
|
lib/doing/symbol.rb 309799458a1bc715c2707307c9a62ab26086275e
|
|
16
16
|
lib/doing/section.rb 206e119cf818f1e76798753e611180fe77bc299a
|
|
17
|
-
lib/doing/version.rb
|
|
17
|
+
lib/doing/version.rb 9a591fb642591742cb202b30af1f46f206220021
|
|
18
18
|
lib/doing/cli_status.rb dbedd454c4cbbd0fed9ef30120f6ec85d18b9356
|
|
19
19
|
lib/doing/completion.rb c658e7dc7898fb022a21b2bd77bedb958ca3b067
|
|
20
20
|
lib/doing/log_adapter.rb 6cf0c9a405d17449643e54d35a04897b1da44eaf
|
data/.yardoc/object_types
CHANGED
|
Binary file
|
data/.yardoc/objects/root.dat
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
### 2.1.14
|
|
2
|
+
|
|
3
|
+
#### NEW
|
|
4
|
+
|
|
5
|
+
- All commands that accept --note now accept --ask, which requests input via readline after creating the note. Multiple lines are allowed, hit return twice to end editing. Works alongside --note and --editor
|
|
6
|
+
|
|
7
|
+
#### IMPROVED
|
|
8
|
+
|
|
9
|
+
- Implement --search and --from filtering for import plugins
|
|
10
|
+
- UTC format date strings in select menus for consistency (was relative date formatting)
|
|
11
|
+
- Don't populate the fzf search with --search, it's already filtered. Separated --query from --search if you do want to populate the query string in addition to --search filtering
|
|
12
|
+
- When showing relative dates, don't include the year if the date is the previous year but a later month than the current month (less than a year old)
|
|
13
|
+
- When using --editor while adding an entry, include any note specified on the command line or via --ask for further editing
|
|
14
|
+
|
|
1
15
|
### 2.1.13
|
|
2
16
|
|
|
3
17
|
#### NEW
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
doing (2.1.
|
|
4
|
+
doing (2.1.14)
|
|
5
5
|
chronic (~> 0.10, >= 0.10.2)
|
|
6
6
|
deep_merge (~> 1.2, >= 1.2.1)
|
|
7
7
|
gli (~> 2.19, >= 2.19.2)
|
|
@@ -12,6 +12,7 @@ PATH
|
|
|
12
12
|
tty-link (~> 0.1, >= 0.1.1)
|
|
13
13
|
tty-markdown (~> 0.7, >= 0.7.0)
|
|
14
14
|
tty-progressbar (~> 0.18, >= 0.18.2)
|
|
15
|
+
tty-reader (~> 0.9, >= 0.9.0)
|
|
15
16
|
tty-which (~> 0.5, >= 0.5.0)
|
|
16
17
|
|
|
17
18
|
GEM
|
|
@@ -131,6 +132,10 @@ GEM
|
|
|
131
132
|
tty-cursor (~> 0.7)
|
|
132
133
|
tty-screen (~> 0.8)
|
|
133
134
|
unicode-display_width (>= 1.6, < 3.0)
|
|
135
|
+
tty-reader (0.9.0)
|
|
136
|
+
tty-cursor (~> 0.7)
|
|
137
|
+
tty-screen (~> 0.8)
|
|
138
|
+
wisper (~> 2.0)
|
|
134
139
|
tty-screen (0.8.1)
|
|
135
140
|
tty-spinner (0.9.3)
|
|
136
141
|
tty-cursor (~> 0.7)
|
|
@@ -139,6 +144,7 @@ GEM
|
|
|
139
144
|
concurrent-ruby (~> 1.0)
|
|
140
145
|
unicode-display_width (2.1.0)
|
|
141
146
|
unicode_utils (1.4.0)
|
|
147
|
+
wisper (2.0.1)
|
|
142
148
|
yard (0.9.26)
|
|
143
149
|
zeitwerk (2.5.1)
|
|
144
150
|
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@ _If you're one of the rare people like me who find this useful, feel free to [bu
|
|
|
6
6
|
|
|
7
7
|
<!--README-->
|
|
8
8
|
|
|
9
|
-
The current version of `doing` is <!--VER-->2.1.
|
|
9
|
+
The current version of `doing` is <!--VER-->2.1.13<!--END VER-->.
|
|
10
10
|
|
|
11
11
|
Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
|
|
12
12
|
|
data/bin/doing
CHANGED
|
@@ -70,6 +70,12 @@ if settings.dig('plugins', 'command_path')
|
|
|
70
70
|
commands_from File.expand_path(settings.dig('plugins', 'command_path'))
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
class TagArray < Array; end
|
|
74
|
+
|
|
75
|
+
accept TagArray do |value|
|
|
76
|
+
value.gsub(/[, ]+/, ' ').split(' ').map { |tag| tag.sub(/^@/, '')}.map(&:strip)
|
|
77
|
+
end
|
|
78
|
+
|
|
73
79
|
program_desc 'A CLI for a What Was I Doing system'
|
|
74
80
|
program_long_desc %(Doing uses a TaskPaper-like formatting to keep a plain text
|
|
75
81
|
record of what you've been doing, complete with tag-based time tracking. The
|
|
@@ -139,7 +145,7 @@ command %i[again resume] do |c|
|
|
|
139
145
|
|
|
140
146
|
c.desc 'Repeat last entry matching tags. Combine multiple tags with a comma. Wildcards allowed (*, ?)'
|
|
141
147
|
c.arg_name 'TAG'
|
|
142
|
-
c.flag [:tag]
|
|
148
|
+
c.flag [:tag], type: TagArray
|
|
143
149
|
|
|
144
150
|
c.desc 'Repeat last entry matching search. Surround with
|
|
145
151
|
slashes for regex (e.g. "/query/"), start with a single quote for exact match ("\'query").'
|
|
@@ -170,16 +176,19 @@ command %i[again resume] do |c|
|
|
|
170
176
|
c.desc "Edit duplicated entry with #{Doing::Util.default_editor} before adding"
|
|
171
177
|
c.switch %i[e editor], negatable: false, default_value: false
|
|
172
178
|
|
|
173
|
-
c.desc '
|
|
179
|
+
c.desc 'Add a note'
|
|
174
180
|
c.arg_name 'TEXT'
|
|
175
181
|
c.flag %i[n note]
|
|
176
182
|
|
|
183
|
+
c.desc 'Prompt for note via multi-line input'
|
|
184
|
+
c.switch %i[ask], negatable: false, default_value: false
|
|
185
|
+
|
|
177
186
|
c.desc 'Select item to resume from a menu of matching entries'
|
|
178
187
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
179
188
|
|
|
180
189
|
c.action do |_global_options, options, _args|
|
|
181
190
|
options[:fuzzy] = false
|
|
182
|
-
tags = options[:tag].nil? ? [] : options[:tag]
|
|
191
|
+
tags = options[:tag].nil? ? [] : options[:tag]
|
|
183
192
|
|
|
184
193
|
options[:case] = options[:case].normalize_case
|
|
185
194
|
|
|
@@ -189,6 +198,11 @@ command %i[again resume] do |c|
|
|
|
189
198
|
options[:search] = search
|
|
190
199
|
end
|
|
191
200
|
|
|
201
|
+
note = Doing::Note.new(options[:note])
|
|
202
|
+
note.add(Doing::Prompt.request_lines(prompt: 'Add a note')) if options[:ask]
|
|
203
|
+
|
|
204
|
+
options[:note] = note
|
|
205
|
+
|
|
192
206
|
opts = options.dup
|
|
193
207
|
|
|
194
208
|
opts[:tag] = tags
|
|
@@ -216,7 +230,7 @@ command :cancel do |c|
|
|
|
216
230
|
|
|
217
231
|
c.desc 'Cancel the last X entries containing TAG. Separate multiple tags with comma (--tag=tag1,tag2). Wildcards allowed (*, ?)'
|
|
218
232
|
c.arg_name 'TAG'
|
|
219
|
-
c.flag [:tag]
|
|
233
|
+
c.flag [:tag], type: TagArray
|
|
220
234
|
|
|
221
235
|
c.desc 'Boolean (AND|OR|NOT) with which to combine multiple tag filters. Use PATTERN to parse + and - as booleans'
|
|
222
236
|
c.arg_name 'BOOLEAN'
|
|
@@ -260,7 +274,7 @@ command :cancel do |c|
|
|
|
260
274
|
if options[:tag].nil?
|
|
261
275
|
tags = []
|
|
262
276
|
else
|
|
263
|
-
tags = options[:tag]
|
|
277
|
+
tags = options[:tag]
|
|
264
278
|
end
|
|
265
279
|
|
|
266
280
|
raise InvalidArgument, 'Only one argument allowed' if args.length > 1
|
|
@@ -349,6 +363,9 @@ command %i[done did] do |c|
|
|
|
349
363
|
c.arg_name 'TEXT'
|
|
350
364
|
c.flag %i[n note]
|
|
351
365
|
|
|
366
|
+
c.desc 'Prompt for note via multi-line input'
|
|
367
|
+
c.switch %i[ask], negatable: false, default_value: false
|
|
368
|
+
|
|
352
369
|
c.desc 'Finish last entry not already marked @done'
|
|
353
370
|
c.switch %i[u unfinished], negatable: false, default_value: false
|
|
354
371
|
|
|
@@ -395,6 +412,7 @@ command %i[done did] do |c|
|
|
|
395
412
|
|
|
396
413
|
note = Doing::Note.new
|
|
397
414
|
note.add(options[:note]) if options[:note]
|
|
415
|
+
note.add(Doing::Prompt.request_lines(prompt: 'Add a note')) if options[:ask]
|
|
398
416
|
|
|
399
417
|
if options[:editor]
|
|
400
418
|
raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
|
|
@@ -539,7 +557,7 @@ command :finish do |c|
|
|
|
539
557
|
c.desc 'Finish the last X entries containing TAG.
|
|
540
558
|
Separate multiple tags with comma (--tag=tag1,tag2), combine with --bool. Wildcards allowed (*, ?).'
|
|
541
559
|
c.arg_name 'TAG'
|
|
542
|
-
c.flag [:tag]
|
|
560
|
+
c.flag [:tag], type: TagArray
|
|
543
561
|
|
|
544
562
|
c.desc 'Finish the last X entries matching search filter, surround with slashes for regex (e.g. "/query.*/"), start with single quote for exact match ("\'query")'
|
|
545
563
|
c.arg_name 'QUERY'
|
|
@@ -618,7 +636,7 @@ command :finish do |c|
|
|
|
618
636
|
if options[:tag].nil?
|
|
619
637
|
tags = []
|
|
620
638
|
else
|
|
621
|
-
tags = options[:tag]
|
|
639
|
+
tags = options[:tag]
|
|
622
640
|
end
|
|
623
641
|
|
|
624
642
|
raise InvalidArgument, 'Only one argument allowed' if args.length > 1
|
|
@@ -681,6 +699,9 @@ command :later do |c|
|
|
|
681
699
|
c.arg_name 'TEXT'
|
|
682
700
|
c.flag %i[n note]
|
|
683
701
|
|
|
702
|
+
c.desc 'Prompt for note via multi-line input'
|
|
703
|
+
c.switch %i[ask], negatable: false, default_value: false
|
|
704
|
+
|
|
684
705
|
c.action do |_global_options, options, args|
|
|
685
706
|
if options[:back]
|
|
686
707
|
date = options[:back].chronify(guess: :begin)
|
|
@@ -689,11 +710,16 @@ command :later do |c|
|
|
|
689
710
|
date = Time.now
|
|
690
711
|
end
|
|
691
712
|
|
|
713
|
+
ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : ''
|
|
714
|
+
|
|
692
715
|
if options[:editor] || (args.empty? && $stdin.stat.size.zero?)
|
|
693
716
|
raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
|
|
694
717
|
|
|
695
718
|
input += date.strftime('%F %R | ')
|
|
696
719
|
input += args.empty? ? '' : args.join(' ')
|
|
720
|
+
input += "\n#{options[:note]}" if options[:note]
|
|
721
|
+
input += "\n#{ask_note}" unless ask_note.empty?
|
|
722
|
+
|
|
697
723
|
input = wwid.fork_editor(input).strip
|
|
698
724
|
raise EmptyInput, 'No content' unless input && !input.empty?
|
|
699
725
|
|
|
@@ -706,6 +732,7 @@ command :later do |c|
|
|
|
706
732
|
d, title, note = wwid.format_input(args.join(' '))
|
|
707
733
|
date = d.nil? ? date : d
|
|
708
734
|
note.add(options[:note]) if options[:note]
|
|
735
|
+
note.add(ask_note) unless ask_note.empty?
|
|
709
736
|
wwid.add_item(title.cap_first, 'Later', { note: note, back: date })
|
|
710
737
|
wwid.write(wwid.doing_file)
|
|
711
738
|
elsif $stdin.stat.size.positive?
|
|
@@ -715,6 +742,7 @@ command :later do |c|
|
|
|
715
742
|
date = d
|
|
716
743
|
end
|
|
717
744
|
note.add(options[:note]) if options[:note]
|
|
745
|
+
note.add(ask_note) unless ask_note.empty?
|
|
718
746
|
wwid.add_item(title.cap_first, 'Later', { note: note, back: date })
|
|
719
747
|
wwid.write(wwid.doing_file)
|
|
720
748
|
else
|
|
@@ -754,7 +782,7 @@ command %i[mark flag] do |c|
|
|
|
754
782
|
c.desc 'Flag the last entry containing TAG.
|
|
755
783
|
Separate multiple tags with comma (--tag=tag1,tag2), combine with --bool. Wildcards allowed (*, ?).'
|
|
756
784
|
c.arg_name 'TAG'
|
|
757
|
-
c.flag [:tag]
|
|
785
|
+
c.flag [:tag], type: TagArray
|
|
758
786
|
|
|
759
787
|
c.desc 'Flag the last entry matching search filter, surround with slashes for regex (e.g. "/query.*/"), start with single quote for exact match ("\'query")'
|
|
760
788
|
c.arg_name 'QUERY'
|
|
@@ -799,7 +827,7 @@ command %i[mark flag] do |c|
|
|
|
799
827
|
if options[:tag].nil?
|
|
800
828
|
search_tags = []
|
|
801
829
|
else
|
|
802
|
-
search_tags = options[:tag]
|
|
830
|
+
search_tags = options[:tag]
|
|
803
831
|
end
|
|
804
832
|
|
|
805
833
|
if options[:interactive]
|
|
@@ -881,6 +909,9 @@ command :meanwhile do |c|
|
|
|
881
909
|
c.arg_name 'TEXT'
|
|
882
910
|
c.flag %i[n note]
|
|
883
911
|
|
|
912
|
+
c.desc 'Prompt for note via multi-line input'
|
|
913
|
+
c.switch %i[ask], negatable: false, default_value: false
|
|
914
|
+
|
|
884
915
|
c.action do |_global_options, options, args|
|
|
885
916
|
if options[:back]
|
|
886
917
|
date = options[:back].chronify(guess: :begin)
|
|
@@ -897,10 +928,15 @@ command :meanwhile do |c|
|
|
|
897
928
|
end
|
|
898
929
|
input = ''
|
|
899
930
|
|
|
931
|
+
ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : []
|
|
932
|
+
|
|
900
933
|
if options[:editor]
|
|
901
934
|
raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
|
|
902
935
|
input += date.strftime('%F %R | ')
|
|
903
936
|
input += args.join(' ') unless args.empty?
|
|
937
|
+
input += "\n#{options[:note]}" if options[:note]
|
|
938
|
+
input += "\n#{ask_note}" unless ask_note.empty?
|
|
939
|
+
|
|
904
940
|
input = wwid.fork_editor(input).strip
|
|
905
941
|
elsif !args.empty?
|
|
906
942
|
input = args.join(' ')
|
|
@@ -919,10 +955,9 @@ command :meanwhile do |c|
|
|
|
919
955
|
note = []
|
|
920
956
|
end
|
|
921
957
|
|
|
922
|
-
|
|
923
|
-
note.
|
|
924
|
-
|
|
925
|
-
note = nil
|
|
958
|
+
unless options[:editor]
|
|
959
|
+
note.add(options[:note]) if options[:note]
|
|
960
|
+
note.add(ask_note) unless ask_note.empty?
|
|
926
961
|
end
|
|
927
962
|
|
|
928
963
|
wwid.stop_start('meanwhile', { new_item: input, back: date, section: section, archive: options[:archive], note: note })
|
|
@@ -958,7 +993,7 @@ command :note do |c|
|
|
|
958
993
|
|
|
959
994
|
c.desc 'Add/remove note from last entry matching tag. Wildcards allowed (*, ?)'
|
|
960
995
|
c.arg_name 'TAG'
|
|
961
|
-
c.flag [:tag]
|
|
996
|
+
c.flag [:tag], type: TagArray
|
|
962
997
|
|
|
963
998
|
c.desc 'Add/remove note from last entry matching search filter, surround with slashes for regex (e.g. "/query.*/"), start with single quote for exact match ("\'query")'
|
|
964
999
|
c.arg_name 'QUERY'
|
|
@@ -988,6 +1023,9 @@ command :note do |c|
|
|
|
988
1023
|
c.desc 'Select item for new note from a menu of matching entries'
|
|
989
1024
|
c.switch %i[i interactive], negatable: false, default_value: false
|
|
990
1025
|
|
|
1026
|
+
c.desc 'Prompt for note via multi-line input'
|
|
1027
|
+
c.switch %i[ask], negatable: false, default_value: false
|
|
1028
|
+
|
|
991
1029
|
c.action do |_global_options, options, args|
|
|
992
1030
|
options[:fuzzy] = false
|
|
993
1031
|
if options[:section]
|
|
@@ -1014,8 +1052,9 @@ command :note do |c|
|
|
|
1014
1052
|
|
|
1015
1053
|
last_note = last_entry.note || Doing::Note.new
|
|
1016
1054
|
new_note = Doing::Note.new
|
|
1055
|
+
ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : ''
|
|
1017
1056
|
|
|
1018
|
-
if options[:editor] || (args.empty? && $stdin.stat.size.zero? && !options[:remove])
|
|
1057
|
+
if options[:editor] || (args.empty? && $stdin.stat.size.zero? && !options[:remove] && !options[:ask])
|
|
1019
1058
|
raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
|
|
1020
1059
|
|
|
1021
1060
|
input = !args.empty? ? args.join(' ') : ''
|
|
@@ -1026,7 +1065,9 @@ command :note do |c|
|
|
|
1026
1065
|
prev_input = last_entry.note || Doing::Note.new
|
|
1027
1066
|
end
|
|
1028
1067
|
|
|
1068
|
+
|
|
1029
1069
|
input = prev_input.add(input)
|
|
1070
|
+
input.add(ask_note) unless ask_note.empty?
|
|
1030
1071
|
|
|
1031
1072
|
input = wwid.fork_editor(prev_input.strip_lines.join("\n"), message: nil).strip
|
|
1032
1073
|
note = input
|
|
@@ -1037,9 +1078,12 @@ command :note do |c|
|
|
|
1037
1078
|
elsif $stdin.stat.size.positive?
|
|
1038
1079
|
new_note.add($stdin.read.strip)
|
|
1039
1080
|
else
|
|
1040
|
-
raise EmptyInput, 'You must provide content when adding a note' unless options[:remove]
|
|
1081
|
+
raise EmptyInput, 'You must provide content when adding a note' unless options[:remove] || !ask_note.empty?
|
|
1082
|
+
|
|
1041
1083
|
end
|
|
1042
1084
|
|
|
1085
|
+
new_note.add(ask_note) unless ask_note.empty?
|
|
1086
|
+
|
|
1043
1087
|
if last_note.equal?(new_note)
|
|
1044
1088
|
Doing.logger.debug('Skipped:', 'No note change')
|
|
1045
1089
|
else
|
|
@@ -1085,6 +1129,9 @@ command %i[now next] do |c|
|
|
|
1085
1129
|
c.arg_name 'TEXT'
|
|
1086
1130
|
c.flag %i[n note]
|
|
1087
1131
|
|
|
1132
|
+
c.desc 'Prompt for note via multi-line input'
|
|
1133
|
+
c.switch %i[ask], negatable: false, default_value: false
|
|
1134
|
+
|
|
1088
1135
|
# c.desc "Edit entry with specified app"
|
|
1089
1136
|
# c.arg_name 'editor_app'
|
|
1090
1137
|
# # c.flag [:a, :app]
|
|
@@ -1104,23 +1151,28 @@ command %i[now next] do |c|
|
|
|
1104
1151
|
options[:section] = settings['current_section']
|
|
1105
1152
|
end
|
|
1106
1153
|
|
|
1154
|
+
ask_note = options[:ask] ? Doing::Prompt.request_lines(prompt: 'Add a note') : ''
|
|
1155
|
+
|
|
1107
1156
|
if options[:editor] || (args.empty? && $stdin.stat.size.zero?)
|
|
1108
1157
|
raise MissingEditor, 'No EDITOR variable defined in environment' if Doing::Util.default_editor.nil?
|
|
1109
1158
|
|
|
1110
1159
|
input = date.strftime('%F %R | ')
|
|
1111
1160
|
input += args.join(' ') unless args.empty?
|
|
1161
|
+
input += "\n#{options[:note]}" if options[:note]
|
|
1162
|
+
input += "\n#{ask_note}" unless ask_note.empty?
|
|
1112
1163
|
input = wwid.fork_editor(input).strip
|
|
1113
1164
|
|
|
1114
1165
|
raise EmptyInput, 'No content' if input.empty?
|
|
1115
1166
|
|
|
1116
1167
|
date, title, note = wwid.format_input(input)
|
|
1117
|
-
|
|
1168
|
+
|
|
1118
1169
|
wwid.add_item(title.cap_first, section, { note: note, back: date, timed: options[:finish_last] })
|
|
1119
1170
|
wwid.write(wwid.doing_file)
|
|
1120
1171
|
elsif args.length.positive?
|
|
1121
1172
|
d, title, note = wwid.format_input(args.join(' '))
|
|
1122
1173
|
date = d.nil? ? date : d
|
|
1123
1174
|
note.add(options[:note]) if options[:note]
|
|
1175
|
+
note.add(ask_note) unless ask_note.empty?
|
|
1124
1176
|
wwid.add_item(title.cap_first, section, { note: note, back: date, timed: options[:finish_last] })
|
|
1125
1177
|
wwid.write(wwid.doing_file)
|
|
1126
1178
|
elsif $stdin.stat.size.positive?
|
|
@@ -1131,6 +1183,7 @@ command %i[now next] do |c|
|
|
|
1131
1183
|
date = d
|
|
1132
1184
|
end
|
|
1133
1185
|
note.add(options[:note]) if options[:note]
|
|
1186
|
+
note.add(ask_note) unless ask_note.empty?
|
|
1134
1187
|
wwid.add_item(title.cap_first, section, { note: note, back: date, timed: options[:finish_last] })
|
|
1135
1188
|
wwid.write(wwid.doing_file)
|
|
1136
1189
|
else
|
|
@@ -1283,7 +1336,11 @@ command :select do |c|
|
|
|
1283
1336
|
|
|
1284
1337
|
c.desc 'Initial search query for filtering. Matching is fuzzy. For exact matching, start query with a single quote, e.g. `--query "\'search"'
|
|
1285
1338
|
c.arg_name 'QUERY'
|
|
1286
|
-
c.flag %i[q query
|
|
1339
|
+
c.flag %i[q query]
|
|
1340
|
+
|
|
1341
|
+
c.desc 'Select from entries matching search filter, surround with slashes for regex (e.g. "/query.*/"), start with single quote for exact match ("\'query")'
|
|
1342
|
+
c.arg_name 'QUERY'
|
|
1343
|
+
c.flag [:search]
|
|
1287
1344
|
|
|
1288
1345
|
c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
|
|
1289
1346
|
c.arg_name 'QUERY'
|
|
@@ -1421,7 +1478,7 @@ command :tag do |c|
|
|
|
1421
1478
|
c.desc 'Tag the last X entries containing TAG.
|
|
1422
1479
|
Separate multiple tags with comma (--tag=tag1,tag2), combine with --bool. Wildcards allowed (*, ?).'
|
|
1423
1480
|
c.arg_name 'TAG'
|
|
1424
|
-
c.flag [:tag]
|
|
1481
|
+
c.flag [:tag], type: TagArray
|
|
1425
1482
|
|
|
1426
1483
|
c.desc 'Tag entries matching search filter, surround with slashes for regex (e.g. "/query.*/"), start with single quote for exact match ("\'query")'
|
|
1427
1484
|
c.arg_name 'QUERY'
|
|
@@ -1467,7 +1524,7 @@ command :tag do |c|
|
|
|
1467
1524
|
if options[:tag].nil?
|
|
1468
1525
|
search_tags = []
|
|
1469
1526
|
else
|
|
1470
|
-
search_tags = options[:tag]
|
|
1527
|
+
search_tags = options[:tag]
|
|
1471
1528
|
end
|
|
1472
1529
|
|
|
1473
1530
|
if options[:autotag]
|
|
@@ -1688,7 +1745,7 @@ command :last do |c|
|
|
|
1688
1745
|
|
|
1689
1746
|
c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?)'
|
|
1690
1747
|
c.arg_name 'TAG'
|
|
1691
|
-
c.flag [:tag]
|
|
1748
|
+
c.flag [:tag], type: TagArray
|
|
1692
1749
|
|
|
1693
1750
|
c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans'
|
|
1694
1751
|
c.arg_name 'BOOLEAN'
|
|
@@ -1725,7 +1782,7 @@ command :last do |c|
|
|
|
1725
1782
|
if options[:tag].nil?
|
|
1726
1783
|
options[:tag] = []
|
|
1727
1784
|
else
|
|
1728
|
-
options[:tag] = options[:tag]
|
|
1785
|
+
options[:tag] = options[:tag]
|
|
1729
1786
|
options[:bool] = options[:bool].normalize_bool
|
|
1730
1787
|
end
|
|
1731
1788
|
|
|
@@ -1855,7 +1912,7 @@ command :show do |c|
|
|
|
1855
1912
|
|
|
1856
1913
|
c.desc 'Tag filter, combine multiple tags with a comma. Use `--tag pick` for a menu of available tags. Wildcards allowed (*, ?). Added for compatibility with other commands'
|
|
1857
1914
|
c.arg_name 'TAG'
|
|
1858
|
-
c.flag [:tag]
|
|
1915
|
+
c.flag [:tag], type: TagArray
|
|
1859
1916
|
|
|
1860
1917
|
c.desc 'Perform a tag value query ("@done > two hours ago" or "@progress < 50"). May be used multiple times, combined with --bool'
|
|
1861
1918
|
c.arg_name 'QUERY'
|
|
@@ -1988,7 +2045,7 @@ command :show do |c|
|
|
|
1988
2045
|
section ||= 'All'
|
|
1989
2046
|
end
|
|
1990
2047
|
|
|
1991
|
-
tags.concat(options[:tag]
|
|
2048
|
+
tags.concat(options[:tag]) if options[:tag]
|
|
1992
2049
|
|
|
1993
2050
|
options[:times] = true if options[:totals]
|
|
1994
2051
|
|
|
@@ -3004,7 +3061,7 @@ command %i[archive move] do |c|
|
|
|
3004
3061
|
|
|
3005
3062
|
c.desc 'Tag filter, combine multiple tags with a comma. Wildcards allowed (*, ?). Added for compatibility with other commands'
|
|
3006
3063
|
c.arg_name 'TAG'
|
|
3007
|
-
c.flag [:tag]
|
|
3064
|
+
c.flag [:tag], type: TagArray
|
|
3008
3065
|
|
|
3009
3066
|
c.desc 'Tag boolean (AND|OR|NOT). Use PATTERN to parse + and - as booleans'
|
|
3010
3067
|
c.arg_name 'BOOLEAN'
|
|
@@ -3053,7 +3110,7 @@ command %i[archive move] do |c|
|
|
|
3053
3110
|
|
|
3054
3111
|
raise InvalidArgument, '--keep and --count can not be used together' if options[:keep] && options[:count]
|
|
3055
3112
|
|
|
3056
|
-
tags.concat(options[:tag]
|
|
3113
|
+
tags.concat(options[:tag]) if options[:tag]
|
|
3057
3114
|
|
|
3058
3115
|
search = nil
|
|
3059
3116
|
|
|
@@ -3113,7 +3170,7 @@ command :import do |c|
|
|
|
3113
3170
|
|
|
3114
3171
|
c.desc 'Tag all imported entries'
|
|
3115
3172
|
c.arg_name 'TAGS'
|
|
3116
|
-
c.flag
|
|
3173
|
+
c.flag %i[t tag]
|
|
3117
3174
|
|
|
3118
3175
|
c.desc 'Autotag entries'
|
|
3119
3176
|
c.switch :autotag, negatable: true, default_value: true
|
|
@@ -3148,6 +3205,12 @@ command :import do |c|
|
|
|
3148
3205
|
options[:section] = wwid.guess_section(options[:section]) || options[:section].cap_first
|
|
3149
3206
|
end
|
|
3150
3207
|
|
|
3208
|
+
if options[:search]
|
|
3209
|
+
search = options[:search]
|
|
3210
|
+
search.sub!(/^'?/, "'") if options[:exact]
|
|
3211
|
+
options[:search] = search
|
|
3212
|
+
end
|
|
3213
|
+
|
|
3151
3214
|
if options[:from]
|
|
3152
3215
|
date_string = options[:from]
|
|
3153
3216
|
if date_string =~ / (to|through|thru|(un)?til|-+) /
|
|
@@ -3156,7 +3219,7 @@ command :import do |c|
|
|
|
3156
3219
|
finish = dates[2].chronify(guess: :end)
|
|
3157
3220
|
else
|
|
3158
3221
|
start = date_string.chronify(guess: :begin)
|
|
3159
|
-
finish =
|
|
3222
|
+
finish = date_string.chronify(guess: :end)
|
|
3160
3223
|
end
|
|
3161
3224
|
raise InvalidTimeExpression, 'Unrecognized date string' unless start
|
|
3162
3225
|
dates = [start, finish]
|
data/docs/doc/Array.html
CHANGED
|
@@ -540,7 +540,7 @@ with</p>
|
|
|
540
540
|
</div>
|
|
541
541
|
|
|
542
542
|
<div id="footer">
|
|
543
|
-
Generated on
|
|
543
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
544
544
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
545
545
|
0.9.26 (ruby-3.0.1).
|
|
546
546
|
</div>
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
</div>
|
|
284
284
|
|
|
285
285
|
<div id="footer">
|
|
286
|
-
Generated on
|
|
286
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
287
287
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
288
288
|
0.9.26 (ruby-3.0.1).
|
|
289
289
|
</div>
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
</div>
|
|
163
163
|
|
|
164
164
|
<div id="footer">
|
|
165
|
-
Generated on
|
|
165
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
166
166
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
167
167
|
0.9.26 (ruby-3.0.1).
|
|
168
168
|
</div>
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
</div>
|
|
408
408
|
|
|
409
409
|
<div id="footer">
|
|
410
|
-
Generated on
|
|
410
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
411
411
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
412
412
|
0.9.26 (ruby-3.0.1).
|
|
413
413
|
</div>
|
|
@@ -125,7 +125,7 @@ parser. In order to do that, a new "clause" node is added to the parse
|
|
|
125
125
|
</div>
|
|
126
126
|
|
|
127
127
|
<div id="footer">
|
|
128
|
-
Generated on
|
|
128
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
129
129
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
130
130
|
0.9.26 (ruby-3.0.1).
|
|
131
131
|
</div>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<div id="footer">
|
|
117
|
-
Generated on
|
|
117
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
119
119
|
0.9.26 (ruby-3.0.1).
|
|
120
120
|
</div>
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
</div>
|
|
106
106
|
|
|
107
107
|
<div id="footer">
|
|
108
|
-
Generated on
|
|
108
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
109
109
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
110
110
|
0.9.26 (ruby-3.0.1).
|
|
111
111
|
</div>
|
data/docs/doc/Doing/Color.html
CHANGED
|
@@ -508,7 +508,7 @@ ANSI-sequences are stripped from the string.</p>
|
|
|
508
508
|
</div>
|
|
509
509
|
|
|
510
510
|
<div id="footer">
|
|
511
|
-
Generated on
|
|
511
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
512
512
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
513
513
|
0.9.26 (ruby-3.0.1).
|
|
514
514
|
</div>
|
|
@@ -206,7 +206,7 @@ stdout</p>
|
|
|
206
206
|
</div>
|
|
207
207
|
|
|
208
208
|
<div id="footer">
|
|
209
|
-
Generated on
|
|
209
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
210
210
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
211
211
|
0.9.26 (ruby-3.0.1).
|
|
212
212
|
</div>
|
|
@@ -1101,7 +1101,7 @@ matched, first match wins)</p>
|
|
|
1101
1101
|
</div>
|
|
1102
1102
|
|
|
1103
1103
|
<div id="footer">
|
|
1104
|
-
Generated on
|
|
1104
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
1105
1105
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1106
1106
|
0.9.26 (ruby-3.0.1).
|
|
1107
1107
|
</div>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
</div>
|
|
177
177
|
|
|
178
178
|
<div id="footer">
|
|
179
|
-
Generated on
|
|
179
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
180
180
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
181
181
|
0.9.26 (ruby-3.0.1).
|
|
182
182
|
</div>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
</div>
|
|
177
177
|
|
|
178
178
|
<div id="footer">
|
|
179
|
-
Generated on
|
|
179
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
180
180
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
181
181
|
0.9.26 (ruby-3.0.1).
|
|
182
182
|
</div>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
</div>
|
|
177
177
|
|
|
178
178
|
<div id="footer">
|
|
179
|
-
Generated on
|
|
179
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
180
180
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
181
181
|
0.9.26 (ruby-3.0.1).
|
|
182
182
|
</div>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
</div>
|
|
177
177
|
|
|
178
178
|
<div id="footer">
|
|
179
|
-
Generated on
|
|
179
|
+
Generated on Sat Jan 15 17:27:48 2022 by
|
|
180
180
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
181
181
|
0.9.26 (ruby-3.0.1).
|
|
182
182
|
</div>
|