doing 2.1.33 → 2.1.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -0
- data/Gemfile.lock +1 -5
- data/README.md +1 -1
- data/bin/commands/config.rb +11 -11
- data/bin/commands/done.rb +2 -2
- data/bin/commands/grep.rb +2 -29
- data/bin/commands/meanwhile.rb +1 -1
- data/bin/commands/now.rb +1 -1
- data/bin/commands/on.rb +6 -16
- data/bin/commands/open.rb +2 -2
- data/bin/commands/recent.rb +2 -14
- data/bin/commands/rotate.rb +17 -0
- data/bin/commands/sections.rb +82 -7
- data/bin/commands/show.rb +1 -21
- data/bin/commands/since.rb +5 -16
- data/bin/commands/today.rb +3 -28
- data/bin/commands/yesterday.rb +2 -35
- data/bin/doing +5 -6
- 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 +20 -3
- data/docs/doc/Doing/Items.html +209 -1
- data/docs/doc/Doing/Logger.html +1807 -0
- 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 +1 -1
- data/docs/doc/Doing/Section.html +1 -1
- data/docs/doc/Doing/TemplateString.html +1 -1
- data/docs/doc/Doing/Types.html +2 -2
- data/docs/doc/Doing/Util/Backup.html +1 -1
- data/docs/doc/Doing/Util.html +1 -1
- data/docs/doc/Doing/WWID.html +3 -53
- data/docs/doc/Doing.html +4 -4
- data/docs/doc/FalseClass.html +1 -1
- data/docs/doc/GLI/Commands/Help.html +1 -1
- 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/Object.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/TrueClass.html +1 -1
- data/docs/doc/_index.html +10 -10
- data/docs/doc/class_list.html +1 -1
- data/docs/doc/file.README.html +2 -2
- data/docs/doc/index.html +2 -2
- data/docs/doc/method_list.html +407 -383
- data/docs/doc/top-level-namespace.html +1 -1
- data/doing.gemspec +0 -1
- data/doing.rdoc +229 -17
- data/lib/completion/_doing.zsh +11 -15
- data/lib/completion/doing.bash +12 -23
- data/lib/completion/doing.fish +38 -12
- data/lib/doing/add_options.rb +36 -1
- data/lib/doing/chronify/string.rb +1 -1
- data/lib/doing/item.rb +9 -2
- data/lib/doing/items.rb +48 -0
- data/lib/doing/{log_adapter.rb → logger.rb} +8 -2
- data/lib/doing/plugins/import/calendar_import.rb +1 -1
- data/lib/doing/plugins/import/doing_import.rb +1 -1
- data/lib/doing/plugins/import/timing_import.rb +1 -1
- data/lib/doing/string/tags.rb +1 -1
- data/lib/doing/types.rb +1 -1
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid.rb +43 -43
- data/lib/doing.rb +4 -4
- data/lib/examples/plugins/capture_thing_import.rb +1 -1
- metadata +4 -24
- data/bin/commands/add_section.rb +0 -15
data/lib/completion/doing.bash
CHANGED
@@ -111,9 +111,9 @@ _doing_finish() {
|
|
111
111
|
_doing_grep() {
|
112
112
|
|
113
113
|
if [[ "$token" == --* ]]; then
|
114
|
-
COMPREPLY=( $( compgen -W '--after --before --bool --case --config_template --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag_sort --template --totals --val --exact' -- $token ) )
|
114
|
+
COMPREPLY=( $( compgen -W '--after --before --bool --case --config_template --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
|
115
115
|
elif [[ "$token" == -* ]]; then
|
116
|
-
COMPREPLY=( $( compgen -W '-d -e -h -i -o -s -t -x --after --before --bool --case --config_template --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag_sort --template --totals --val --exact' -- $token ) )
|
116
|
+
COMPREPLY=( $( compgen -W '-d -e -h -i -o -s -t -x --after --before --bool --case --config_template --delete --duration --editor --from --hilite --interactive --not --output --only_timed --section --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
|
117
117
|
|
118
118
|
fi
|
119
119
|
}
|
@@ -191,9 +191,9 @@ _doing_now() {
|
|
191
191
|
_doing_on() {
|
192
192
|
|
193
193
|
if [[ "$token" == --* ]]; then
|
194
|
-
COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
|
194
|
+
COMPREPLY=( $( compgen -W '--after --before --bool --case --config_template --duration --from --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
|
195
195
|
elif [[ "$token" == -* ]]; then
|
196
|
-
COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
|
196
|
+
COMPREPLY=( $( compgen -W '-o -s -t -x --after --before --bool --case --config_template --duration --from --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
|
197
197
|
|
198
198
|
fi
|
199
199
|
}
|
@@ -221,9 +221,9 @@ _doing_plugins() {
|
|
221
221
|
_doing_recent() {
|
222
222
|
|
223
223
|
if [[ "$token" == --* ]]; then
|
224
|
-
COMPREPLY=( $( compgen -W '--config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
|
224
|
+
COMPREPLY=( $( compgen -W '--config_template --duration --interactive --only_timed --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
225
225
|
elif [[ "$token" == -* ]]; then
|
226
|
-
COMPREPLY=( $( compgen -W '-i -s -t --config_template --duration --interactive --section --times --tag_sort --template --totals' -- $token ) )
|
226
|
+
COMPREPLY=( $( compgen -W '-i -s -t --config_template --duration --interactive --only_timed --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
227
227
|
|
228
228
|
fi
|
229
229
|
}
|
@@ -258,16 +258,6 @@ _doing_rotate() {
|
|
258
258
|
fi
|
259
259
|
}
|
260
260
|
|
261
|
-
_doing_sections() {
|
262
|
-
|
263
|
-
if [[ "$token" == --* ]]; then
|
264
|
-
COMPREPLY=( $( compgen -W '--column' -- $token ) )
|
265
|
-
elif [[ "$token" == -* ]]; then
|
266
|
-
COMPREPLY=( $( compgen -W '-c --column' -- $token ) )
|
267
|
-
|
268
|
-
fi
|
269
|
-
}
|
270
|
-
|
271
261
|
_doing_select() {
|
272
262
|
|
273
263
|
if [[ "$token" == --* ]]; then
|
@@ -311,9 +301,9 @@ IFS="$OLD_IFS"
|
|
311
301
|
_doing_since() {
|
312
302
|
|
313
303
|
if [[ "$token" == --* ]]; then
|
314
|
-
COMPREPLY=( $( compgen -W '--config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
|
304
|
+
COMPREPLY=( $( compgen -W '--bool --case --config_template --duration --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
|
315
305
|
elif [[ "$token" == -* ]]; then
|
316
|
-
COMPREPLY=( $( compgen -W '-o -s -t --config_template --duration --output --section --times --tag_sort --template --totals' -- $token ) )
|
306
|
+
COMPREPLY=( $( compgen -W '-o -s -t -x --bool --case --config_template --duration --not --output --only_timed --section --search --times --tag --tag_order --tag_sort --template --totals --val --exact' -- $token ) )
|
317
307
|
|
318
308
|
fi
|
319
309
|
}
|
@@ -361,9 +351,9 @@ _doing_template() {
|
|
361
351
|
_doing_today() {
|
362
352
|
|
363
353
|
if [[ "$token" == --* ]]; then
|
364
|
-
COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
|
354
|
+
COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --only_timed --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
365
355
|
elif [[ "$token" == -* ]]; then
|
366
|
-
COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_sort --template --totals' -- $token ) )
|
356
|
+
COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --only_timed --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
367
357
|
|
368
358
|
fi
|
369
359
|
}
|
@@ -431,9 +421,9 @@ _doing_wiki() {
|
|
431
421
|
_doing_yesterday() {
|
432
422
|
|
433
423
|
if [[ "$token" == --* ]]; then
|
434
|
-
COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
424
|
+
COMPREPLY=( $( compgen -W '--after --before --config_template --duration --from --output --only_timed --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
435
425
|
elif [[ "$token" == -* ]]; then
|
436
|
-
COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
426
|
+
COMPREPLY=( $( compgen -W '-o -s -t --after --before --config_template --duration --from --output --only_timed --section --times --tag_order --tag_sort --template --totals' -- $token ) )
|
437
427
|
|
438
428
|
fi
|
439
429
|
}
|
@@ -467,7 +457,6 @@ _doing()
|
|
467
457
|
elif [[ $last =~ (redo) ]]; then _doing_redo
|
468
458
|
elif [[ $last =~ (reset|begin) ]]; then _doing_reset
|
469
459
|
elif [[ $last =~ (rotate) ]]; then _doing_rotate
|
470
|
-
elif [[ $last =~ (sections) ]]; then _doing_sections
|
471
460
|
elif [[ $last =~ (select) ]]; then _doing_select
|
472
461
|
elif [[ $last =~ (show) ]]; then _doing_show
|
473
462
|
elif [[ $last =~ (since) ]]; then _doing_since
|
data/lib/completion/doing.fish
CHANGED
@@ -135,7 +135,6 @@ end
|
|
135
135
|
|
136
136
|
__fish_doing_complete_args tag
|
137
137
|
|
138
|
-
complete -xc doing -n '__fish_doing_needs_command' -a 'add_section' -d Add\ a\ new\ section\ to\ the\ \"doing\"\ file
|
139
138
|
complete -xc doing -n '__fish_doing_needs_command' -a 'again resume' -d Repeat\ last\ entry\ as\ new\ entry
|
140
139
|
complete -xc doing -n '__fish_doing_needs_command' -a 'archive move' -d Move\ entries\ between\ sections
|
141
140
|
complete -xc doing -n '__fish_doing_needs_command' -a 'autotag' -d Autotag\ last\ entry\ or\ filtered\ entries
|
@@ -162,7 +161,7 @@ complete -xc doing -n '__fish_doing_needs_command' -a 'recent' -d List\ recent\
|
|
162
161
|
complete -xc doing -n '__fish_doing_needs_command' -a 'redo' -d Redo\ an\ undo\ command
|
163
162
|
complete -xc doing -n '__fish_doing_needs_command' -a 'reset begin' -d Reset\ the\ start\ time\ of\ an\ entry
|
164
163
|
complete -xc doing -n '__fish_doing_needs_command' -a 'rotate' -d Move\ entries\ to\ archive\ file
|
165
|
-
complete -xc doing -n '__fish_doing_needs_command' -a 'sections' -d List
|
164
|
+
complete -xc doing -n '__fish_doing_needs_command' -a 'sections' -d List
|
166
165
|
complete -xc doing -n '__fish_doing_needs_command' -a 'select' -d Display\ an\ interactive\ menu\ to\ perform\ operations
|
167
166
|
complete -xc doing -n '__fish_doing_needs_command' -a 'show' -d List\ all\ entries
|
168
167
|
complete -xc doing -n '__fish_doing_needs_command' -a 'since' -d List\ entries\ since\ a\ date
|
@@ -268,7 +267,7 @@ complete -c doing -l val -f -r -n '__fish_doing_using_command finish' -d Perfor
|
|
268
267
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command finish' -d Force\ exact\ search\ string\ matching
|
269
268
|
complete -c doing -l after -f -r -n '__fish_doing_using_command grep search' -d Search\ entries\ newer\ than\ date
|
270
269
|
complete -c doing -l before -f -r -n '__fish_doing_using_command grep search' -d Search\ entries\ older\ than\ date
|
271
|
-
complete -c doing -l bool -f -r -n '__fish_doing_using_command grep search' -d
|
270
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command grep search' -d Boolean\ used\ to\ combine\ multiple\ tags
|
272
271
|
complete -c doing -l case -f -r -n '__fish_doing_using_command grep search' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
273
272
|
complete -c doing -l config_template -f -r -n '__fish_doing_using_command grep search' -d Output\ using\ a\ template\ from\ configuration
|
274
273
|
complete -c doing -l delete -s d -f -n '__fish_doing_using_command grep search' -d Delete\ matching\ entries
|
@@ -277,14 +276,16 @@ complete -c doing -l editor -s e -f -n '__fish_doing_using_command grep search'
|
|
277
276
|
complete -c doing -l from -f -r -n '__fish_doing_using_command grep search' -d Date\ range
|
278
277
|
complete -c doing -l hilite -s h -f -n '__fish_doing_using_command grep search' -d Highlight\ search\ matches\ in\ output
|
279
278
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command grep search' -d Display\ an\ interactive\ menu\ of\ results\ to\ perform\ further\ operations
|
280
|
-
complete -c doing -l not -f -n '__fish_doing_using_command grep search' -d
|
279
|
+
complete -c doing -l not -f -n '__fish_doing_using_command grep search' -d Search\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
281
280
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command grep search' -d Output\ to\ export\ format
|
282
281
|
complete -c doing -l only_timed -f -n '__fish_doing_using_command grep search' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
283
282
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command grep search' -d Section
|
284
283
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command grep search' -d Show\ time\ intervals\ on\ @done\ tasks
|
284
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command grep search' -d Filter\ entries\ by\ tag
|
285
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command grep search' -d Tag\ sort\ direction
|
285
286
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command grep search' -d Sort\ tags\ by
|
286
287
|
complete -c doing -l template -f -r -n '__fish_doing_using_command grep search' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
|
287
|
-
complete -c doing -l totals -f -n '__fish_doing_using_command grep search' -d Show\
|
288
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command grep search' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
288
289
|
complete -c doing -l val -f -r -n '__fish_doing_using_command grep search' -d Perform\ a\ tag\ value\ query
|
289
290
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command grep search' -d Force\ exact\ string\ matching
|
290
291
|
complete -c doing -F -n '__fish_doing_using_command import'
|
@@ -357,14 +358,26 @@ complete -c doing -l finish_last -s f -f -n '__fish_doing_using_command now nex
|
|
357
358
|
complete -c doing -l from -f -r -n '__fish_doing_using_command now next' -d Set\ a\ start\ and\ optionally\ end\ time\ as\ a\ date\ range
|
358
359
|
complete -c doing -l note -s n -f -r -n '__fish_doing_using_command now next' -d Include\ a\ note
|
359
360
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command now next' -d Section
|
361
|
+
complete -c doing -l after -f -r -n '__fish_doing_using_command on' -d View\ entries\ after\ specified\ time
|
362
|
+
complete -c doing -l before -f -r -n '__fish_doing_using_command on' -d View\ entries\ before\ specified\ time
|
363
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command on' -d Boolean\ used\ to\ combine\ multiple\ tags
|
364
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command on' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
360
365
|
complete -c doing -l config_template -f -r -n '__fish_doing_using_command on' -d Output\ using\ a\ template\ from\ configuration
|
361
366
|
complete -c doing -l duration -f -n '__fish_doing_using_command on' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
|
367
|
+
complete -c doing -l from -f -r -n '__fish_doing_using_command on' -d Time\ range\ to\ show\ \`doing\ on\ --from\ \"12pm\ to\ 4pm\"\`
|
368
|
+
complete -c doing -l not -f -n '__fish_doing_using_command on' -d Show\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
362
369
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command on' -d Output\ to\ export\ format
|
370
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command on' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
363
371
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command on' -d Section
|
372
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command on' -d Filter\ entries\ using\ a\ search\ query
|
364
373
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command on' -d Show\ time\ intervals\ on\ @done\ tasks
|
374
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command on' -d Filter\ entries\ by\ tag
|
375
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command on' -d Tag\ sort\ direction
|
365
376
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command on' -d Sort\ tags\ by
|
366
377
|
complete -c doing -l template -f -r -n '__fish_doing_using_command on' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
|
367
378
|
complete -c doing -l totals -f -n '__fish_doing_using_command on' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
379
|
+
complete -c doing -l val -f -r -n '__fish_doing_using_command on' -d Perform\ a\ tag\ value\ query
|
380
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command on' -d Force\ exact\ search\ string\ matching
|
368
381
|
complete -c doing -l app -s a -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ name
|
369
382
|
complete -c doing -l bundle_id -s b -f -r -n '__fish_doing_using_command open' -d Open\ with\ app\ bundle\ id
|
370
383
|
complete -c doing -l editor -s e -f -r -n '__fish_doing_using_command open' -d Open\ with\ editor\ command
|
@@ -373,11 +386,13 @@ complete -c doing -l type -s t -f -r -n '__fish_doing_using_command plugins' -d
|
|
373
386
|
complete -c doing -l config_template -f -r -n '__fish_doing_using_command recent' -d Output\ using\ a\ template\ from\ configuration
|
374
387
|
complete -c doing -l duration -f -n '__fish_doing_using_command recent' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
|
375
388
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command recent' -d Select\ from\ a\ menu\ of\ matching\ entries\ to\ perform\ additional\ operations
|
389
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command recent' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
376
390
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command recent' -d Section
|
377
391
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command recent' -d Show\ time\ intervals\ on\ @done\ tasks
|
392
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command recent' -d Tag\ sort\ direction
|
378
393
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command recent' -d Sort\ tags\ by
|
379
394
|
complete -c doing -l template -f -r -n '__fish_doing_using_command recent' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
|
380
|
-
complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\
|
395
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command recent' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
381
396
|
complete -c doing -l file -s f -f -r -n '__fish_doing_using_command redo' -d Specify\ alternate\ doing\ file
|
382
397
|
complete -c doing -l interactive -s i -f -n '__fish_doing_using_command redo' -d Select\ from\ an\ interactive\ menu
|
383
398
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command reset begin' -d Boolean\ used\ to\ combine\ multiple\ tags
|
@@ -400,7 +415,6 @@ complete -c doing -l search -f -r -n '__fish_doing_using_command rotate' -d Fil
|
|
400
415
|
complete -c doing -l tag -f -r -n '__fish_doing_using_command rotate' -d Filter\ entries\ by\ tag
|
401
416
|
complete -c doing -l val -f -r -n '__fish_doing_using_command rotate' -d Perform\ a\ tag\ value\ query
|
402
417
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command rotate' -d Force\ exact\ search\ string\ matching
|
403
|
-
complete -c doing -l column -s c -f -n '__fish_doing_using_command sections' -d List\ in\ single\ column
|
404
418
|
complete -c doing -l archive -s a -f -n '__fish_doing_using_command select' -d Archive\ selected\ items
|
405
419
|
complete -c doing -l after -f -r -n '__fish_doing_using_command select' -d Select\ entries\ newer\ than\ date
|
406
420
|
complete -c doing -l resume -f -n '__fish_doing_using_command select' -d Copy\ selection\ as\ a\ new\ entry\ with\ current\ time\ and\ no\ @done\ tag
|
@@ -447,17 +461,26 @@ complete -c doing -l tag -f -r -n '__fish_doing_using_command show' -d Filter\
|
|
447
461
|
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command show' -d Tag\ sort\ direction
|
448
462
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command show' -d Sort\ tags\ by
|
449
463
|
complete -c doing -l template -f -r -n '__fish_doing_using_command show' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
|
450
|
-
complete -c doing -l totals -f -n '__fish_doing_using_command show' -d Show\
|
464
|
+
complete -c doing -l totals -f -n '__fish_doing_using_command show' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
451
465
|
complete -c doing -l val -f -r -n '__fish_doing_using_command show' -d Perform\ a\ tag\ value\ query
|
452
466
|
complete -c doing -l exact -s x -f -n '__fish_doing_using_command show' -d Force\ exact\ search\ string\ matching
|
467
|
+
complete -c doing -l bool -f -r -n '__fish_doing_using_command since' -d Boolean\ used\ to\ combine\ multiple\ tags
|
468
|
+
complete -c doing -l case -f -r -n '__fish_doing_using_command since' -d Case\ sensitivity\ for\ search\ string\ matching\ \[\(c\)ase-sensitive
|
453
469
|
complete -c doing -l config_template -f -r -n '__fish_doing_using_command since' -d Output\ using\ a\ template\ from\ configuration
|
454
470
|
complete -c doing -l duration -f -n '__fish_doing_using_command since' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
|
471
|
+
complete -c doing -l not -f -n '__fish_doing_using_command since' -d Since\ items\ that\ \*don\'t\*\ match\ search/tag\ filters
|
455
472
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command since' -d Output\ to\ export\ format
|
473
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command since' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
456
474
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command since' -d Section
|
475
|
+
complete -c doing -l search -f -r -n '__fish_doing_using_command since' -d Filter\ entries\ using\ a\ search\ query
|
457
476
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command since' -d Show\ time\ intervals\ on\ @done\ tasks
|
477
|
+
complete -c doing -l tag -f -r -n '__fish_doing_using_command since' -d Filter\ entries\ by\ tag
|
478
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command since' -d Tag\ sort\ direction
|
458
479
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command since' -d Sort\ tags\ by
|
459
480
|
complete -c doing -l template -f -r -n '__fish_doing_using_command since' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
|
460
481
|
complete -c doing -l totals -f -n '__fish_doing_using_command since' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
482
|
+
complete -c doing -l val -f -r -n '__fish_doing_using_command since' -d Perform\ a\ tag\ value\ query
|
483
|
+
complete -c doing -l exact -s x -f -n '__fish_doing_using_command since' -d Force\ exact\ search\ string\ matching
|
461
484
|
complete -c doing -l autotag -s a -f -n '__fish_doing_using_command tag' -d Autotag\ entries\ based\ on\ autotag\ configuration\ in\ \~/
|
462
485
|
complete -c doing -l bool -f -r -n '__fish_doing_using_command tag' -d Boolean\ used\ to\ combine\ multiple\ tags
|
463
486
|
complete -c doing -l count -s c -f -r -n '__fish_doing_using_command tag' -d How\ many\ recent\ entries\ to\ tag
|
@@ -500,8 +523,10 @@ complete -c doing -l config_template -f -r -n '__fish_doing_using_command today
|
|
500
523
|
complete -c doing -l duration -f -n '__fish_doing_using_command today' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
|
501
524
|
complete -c doing -l from -f -r -n '__fish_doing_using_command today' -d Time\ range\ to\ show\ \`doing\ today\ --from\ \"12pm\ to\ 4pm\"\`
|
502
525
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command today' -d Output\ to\ export\ format
|
526
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command today' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
503
527
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command today' -d Specify\ a\ section
|
504
528
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command today' -d Show\ time\ intervals\ on\ @done\ tasks
|
529
|
+
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command today' -d Tag\ sort\ direction
|
505
530
|
complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command today' -d Sort\ tags\ by
|
506
531
|
complete -c doing -l template -f -r -n '__fish_doing_using_command today' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
|
507
532
|
complete -c doing -l totals -f -n '__fish_doing_using_command today' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
@@ -545,8 +570,9 @@ complete -c doing -l after -f -r -n '__fish_doing_using_command yesterday' -d V
|
|
545
570
|
complete -c doing -l before -f -r -n '__fish_doing_using_command yesterday' -d View\ entries\ before\ specified\ time
|
546
571
|
complete -c doing -l config_template -f -r -n '__fish_doing_using_command yesterday' -d Output\ using\ a\ template\ from\ configuration
|
547
572
|
complete -c doing -l duration -f -n '__fish_doing_using_command yesterday' -d Show\ elapsed\ time\ on\ entries\ without\ @done\ tag
|
548
|
-
complete -c doing -l from -f -r -n '__fish_doing_using_command yesterday' -d Time\ range\ to\ show
|
573
|
+
complete -c doing -l from -f -r -n '__fish_doing_using_command yesterday' -d Time\ range\ to\ show\ \`doing\ yesterday\ --from\ \"12pm\ to\ 4pm\"\`
|
549
574
|
complete -c doing -l output -s o -f -r -n '__fish_doing_using_command yesterday' -d Output\ to\ export\ format
|
575
|
+
complete -c doing -l only_timed -f -n '__fish_doing_using_command yesterday' -d Only\ show\ items\ with\ recorded\ time\ intervals
|
550
576
|
complete -c doing -l section -s s -f -r -n '__fish_doing_using_command yesterday' -d Specify\ a\ section
|
551
577
|
complete -c doing -l times -s t -f -n '__fish_doing_using_command yesterday' -d Show\ time\ intervals\ on\ @done\ tasks
|
552
578
|
complete -c doing -l tag_order -f -r -n '__fish_doing_using_command yesterday' -d Tag\ sort\ direction
|
@@ -554,10 +580,10 @@ complete -c doing -l tag_sort -f -r -n '__fish_doing_using_command yesterday' -
|
|
554
580
|
complete -c doing -l template -f -r -n '__fish_doing_using_command yesterday' -d Override\ output\ format\ with\ a\ template\ string\ containing\ \%placeholders
|
555
581
|
complete -c doing -l totals -f -n '__fish_doing_using_command yesterday' -d Show\ time\ totals\ at\ the\ end\ of\ output
|
556
582
|
complete -f -c doing -s o -l output -x -n '__fish_doing_using_command grep search on select show since today view yesterday' -a '(__fish_doing_export_plugin)'
|
557
|
-
complete -f -c doing -s b -l bool -x -n '__fish_doing_using_command again resume archive move autotag cancel finish grep search last mark flag note reset begin rotate show tag tags view wiki' -a 'and or not pattern'
|
558
|
-
complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel finish grep search import last mark flag note reset begin rotate select show tag tags view' -a 'case-sensitive ignore smart'
|
583
|
+
complete -f -c doing -s b -l bool -x -n '__fish_doing_using_command again resume archive move autotag cancel finish grep search last mark flag note on reset begin rotate show since tag tags view wiki' -a 'and or not pattern'
|
584
|
+
complete -f -c doing -l case -x -n '__fish_doing_using_command again resume archive move cancel finish grep search import last mark flag note on reset begin rotate select show since tag tags view' -a 'case-sensitive ignore smart'
|
559
585
|
complete -f -c doing -l sort -x -n '__fish_doing_using_command changes changelog show tags' -a 'asc desc'
|
560
586
|
complete -f -c doing -l tag_sort -x -n '__fish_doing_using_command grep search on recent show since today view yesterday' -a 'name time'
|
561
|
-
complete -f -c doing -l tag_order -x -n '__fish_doing_using_command show view yesterday' -a 'asc desc'
|
587
|
+
complete -f -c doing -l tag_order -x -n '__fish_doing_using_command grep search on recent show since today view yesterday' -a 'asc desc'
|
562
588
|
complete -f -c doing -s a -l age -x -n '__fish_doing_using_command show view' -a 'oldest newest'
|
563
589
|
complete -f -c doing -s s -l section -x -n '__fish_doing_using_command again resume autotag cancel done did finish grep search import last mark flag meanwhile note now next on recent reset begin rotate select since tag tags today view wiki yesterday' -a '(__fish_doing_complete_sections)'
|
data/lib/doing/add_options.rb
CHANGED
@@ -23,7 +23,7 @@ def add_options(type, cmd)
|
|
23
23
|
'Search'
|
24
24
|
when /mark/
|
25
25
|
'Flag'
|
26
|
-
when /(last|tags|view)/
|
26
|
+
when /(last|tags|view|on)/
|
27
27
|
'Show'
|
28
28
|
else
|
29
29
|
cmd_name.capitalize
|
@@ -61,6 +61,27 @@ def add_options(type, cmd)
|
|
61
61
|
|
62
62
|
cmd.desc 'Force exact search string matching (case sensitive)'
|
63
63
|
cmd.switch %i[x exact], default_value: Doing.config.exact_match?, negatable: Doing.config.exact_match?
|
64
|
+
when :time_display
|
65
|
+
cmd.desc 'Show time intervals on @done tasks'
|
66
|
+
cmd.switch %i[t times], default_value: true, negatable: true
|
67
|
+
|
68
|
+
cmd.desc 'Show elapsed time on entries without @done tag'
|
69
|
+
cmd.switch [:duration]
|
70
|
+
|
71
|
+
cmd.desc 'Show time totals at the end of output'
|
72
|
+
cmd.switch [:totals], default_value: false, negatable: false
|
73
|
+
|
74
|
+
cmd.desc 'Sort tags by (name|time)'
|
75
|
+
default = Doing.setting('tag_sort').normalize_tag_sort || :name
|
76
|
+
cmd.arg_name 'KEY'
|
77
|
+
cmd.flag [:tag_sort], must_match: REGEX_TAG_SORT, default_value: default, type: TagSortSymbol
|
78
|
+
|
79
|
+
cmd.desc 'Tag sort direction (asc|desc)'
|
80
|
+
cmd.arg_name 'DIRECTION'
|
81
|
+
cmd.flag [:tag_order], must_match: REGEX_SORT_ORDER, default_value: :asc, type: OrderSymbol
|
82
|
+
|
83
|
+
cmd.desc 'Only show items with recorded time intervals'
|
84
|
+
cmd.switch [:only_timed], default_value: false, negatable: false
|
64
85
|
when :tag_filter
|
65
86
|
cmd.desc 'Filter entries by tag. Combine multiple tags with a comma. Wildcards allowed (*, ?)'
|
66
87
|
cmd.arg_name 'TAG'
|
@@ -79,6 +100,20 @@ def add_options(type, cmd)
|
|
79
100
|
cmd.flag [:bool], must_match: REGEX_BOOL,
|
80
101
|
default_value: :pattern,
|
81
102
|
type: BooleanSymbol
|
103
|
+
when :time_filter
|
104
|
+
cmd.desc 'View entries before specified time (e.g. 8am, 12:30pm, 15:00)'
|
105
|
+
cmd.arg_name 'TIME_STRING'
|
106
|
+
cmd.flag [:before], type: DateEndString
|
107
|
+
|
108
|
+
cmd.desc 'View entries after specified time (e.g. 8am, 12:30pm, 15:00)'
|
109
|
+
cmd.arg_name 'TIME_STRING'
|
110
|
+
cmd.flag [:after], type: DateBeginString
|
111
|
+
|
112
|
+
cmd.desc %(
|
113
|
+
Time range to show `doing #{cmd.name} --from "12pm to 4pm"`
|
114
|
+
)
|
115
|
+
cmd.arg_name 'TIME_RANGE'
|
116
|
+
cmd.flag [:from], type: DateRangeString, must_match: REGEX_TIME_RANGE
|
82
117
|
when :date_filter
|
83
118
|
if action =~ /Archive/
|
84
119
|
cmd.desc 'Archive entries older than date (natural language).'
|
@@ -200,7 +200,7 @@ module Doing
|
|
200
200
|
else
|
201
201
|
if date_string.strip =~ time_rx
|
202
202
|
start = date_string.strip
|
203
|
-
finish =
|
203
|
+
finish = '11:59pm'
|
204
204
|
else
|
205
205
|
start = date_string.strip.chronify(guess: :begin, future: false)
|
206
206
|
finish = date_string.strip.chronify(guess: :end)
|
data/lib/doing/item.rb
CHANGED
@@ -35,6 +35,8 @@ module Doing
|
|
35
35
|
|
36
36
|
## If the entry doesn't have a @done date, return the elapsed time
|
37
37
|
def duration
|
38
|
+
return nil unless should_time? && should_finish?
|
39
|
+
|
38
40
|
return nil if @title =~ /(?<=^| )@done\b/
|
39
41
|
|
40
42
|
return Time.now - @date
|
@@ -88,17 +90,20 @@ module Doing
|
|
88
90
|
##
|
89
91
|
## Test for equality between items
|
90
92
|
##
|
91
|
-
## @param other
|
93
|
+
## @param other [Item] The other item
|
94
|
+
## @param match_section [Boolean] If true, require item sections to match
|
92
95
|
##
|
93
96
|
## @return [Boolean] is equal?
|
94
97
|
##
|
95
|
-
def equal?(other)
|
98
|
+
def equal?(other, match_section: false)
|
96
99
|
return false if @title.strip != other.title.strip
|
97
100
|
|
98
101
|
return false if @date != other.date
|
99
102
|
|
100
103
|
return false unless @note.equal?(other.note)
|
101
104
|
|
105
|
+
return false if match_section && @section != other.section
|
106
|
+
|
102
107
|
true
|
103
108
|
end
|
104
109
|
|
@@ -469,6 +474,8 @@ module Doing
|
|
469
474
|
end
|
470
475
|
|
471
476
|
def calc_interval
|
477
|
+
return nil unless should_time? && should_finish?
|
478
|
+
|
472
479
|
done = end_date
|
473
480
|
return nil if done.nil?
|
474
481
|
|
data/lib/doing/items.rb
CHANGED
@@ -58,6 +58,24 @@ module Doing
|
|
58
58
|
Doing.logger.info('New section:', %("#{section}" added)) if log
|
59
59
|
end
|
60
60
|
|
61
|
+
def delete_section(section, log: false)
|
62
|
+
return unless section?(section)
|
63
|
+
|
64
|
+
raise DoingRuntimeError, 'Section not empty' if in_section(section).count > 0
|
65
|
+
|
66
|
+
deleted = false
|
67
|
+
|
68
|
+
@sections.each do |sect|
|
69
|
+
if sect.title == section && in_section(sect).count.zero?
|
70
|
+
@sections.delete(sect)
|
71
|
+
Doing.logger.info('Removed section:', %("#{section}" removed)) if log
|
72
|
+
return
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
Doing.logger.error('Not found:', %("#{section}" not found))
|
77
|
+
end
|
78
|
+
|
61
79
|
# Get a new Items object containing only items in a
|
62
80
|
# specified section
|
63
81
|
#
|
@@ -126,6 +144,36 @@ module Doing
|
|
126
144
|
diff
|
127
145
|
end
|
128
146
|
|
147
|
+
##
|
148
|
+
## Remove duplicated entries. Duplicate entries must have matching start date, title, note, and section
|
149
|
+
##
|
150
|
+
## @return [Items] Items array with duplicate entries removed
|
151
|
+
##
|
152
|
+
def dedup(match_section: true)
|
153
|
+
unique = Items.new
|
154
|
+
each do |item|
|
155
|
+
unique.push(item) unless unique.include?(item, match_section: match_section)
|
156
|
+
end
|
157
|
+
|
158
|
+
unique
|
159
|
+
end
|
160
|
+
|
161
|
+
def dedup!(match_section: true)
|
162
|
+
replace dedup(match_section: match_section)
|
163
|
+
end
|
164
|
+
|
165
|
+
def include?(item, match_section: true)
|
166
|
+
includes = false
|
167
|
+
each do |other_item|
|
168
|
+
if other_item.equal?(item, match_section: match_section)
|
169
|
+
includes = true
|
170
|
+
break
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
includes
|
175
|
+
end
|
176
|
+
|
129
177
|
# Output sections and items in Doing file format
|
130
178
|
def to_s
|
131
179
|
out = []
|
@@ -4,7 +4,7 @@ module Doing
|
|
4
4
|
##
|
5
5
|
## Log adapter
|
6
6
|
##
|
7
|
-
class
|
7
|
+
class Logger
|
8
8
|
# Sets the log device
|
9
9
|
attr_writer :logdev
|
10
10
|
|
@@ -332,9 +332,15 @@ module Doing
|
|
332
332
|
if tags_added.empty?
|
333
333
|
count(:skipped, level: :debug, message: 'no tags added to %count %items')
|
334
334
|
elsif single && item
|
335
|
+
elapsed = if item && tags_added.include?('done')
|
336
|
+
item.interval ? " (#{item.interval&.time_string(format: :dhm)})" : ''
|
337
|
+
else
|
338
|
+
''
|
339
|
+
end
|
340
|
+
|
335
341
|
added = tags_added.log_tags
|
336
342
|
info('Tagged:',
|
337
|
-
%(added #{tags_added.count == 1 ? 'tag' : 'tags'} #{added} to #{item.title}))
|
343
|
+
%(added #{tags_added.count == 1 ? 'tag' : 'tags'} #{added}#{elapsed} to #{item.title}))
|
338
344
|
else
|
339
345
|
count(:added_tags, level: :info, tag: tags_added, message: '%tags added to %count %items')
|
340
346
|
end
|
@@ -25,7 +25,7 @@ module Doing
|
|
25
25
|
|
26
26
|
section = options[:section] || Doing.setting('current_section')
|
27
27
|
options[:no_overlap] ||= false
|
28
|
-
options[:autotag] ||=
|
28
|
+
options[:autotag] ||= Doing.auto_tag
|
29
29
|
|
30
30
|
wwid.content.add_section(section) unless wwid.content.section?(section)
|
31
31
|
|
@@ -29,7 +29,7 @@ module Doing
|
|
29
29
|
exit_now! 'File not found' unless File.exist?(File.expand_path(path))
|
30
30
|
|
31
31
|
options[:no_overlap] ||= false
|
32
|
-
options[:autotag] ||=
|
32
|
+
options[:autotag] ||= Doing.auto_tag
|
33
33
|
|
34
34
|
tags = options[:tag] ? options[:tag].split(/[ ,]+/).map { |t| t.sub(/^@?/, '') } : []
|
35
35
|
prefix = options[:prefix] || ''
|
@@ -26,7 +26,7 @@ module Doing
|
|
26
26
|
exit_now! 'Path to JSON report required' if path.nil?
|
27
27
|
section = options[:section] || Doing.setting('current_section')
|
28
28
|
options[:no_overlap] ||= false
|
29
|
-
options[:autotag] ||=
|
29
|
+
options[:autotag] ||= Doing.auto_tag
|
30
30
|
wwid.content.add_section(section) unless wwid.content.section?(section)
|
31
31
|
|
32
32
|
add_tags = options[:tag] ? options[:tag].split(/[ ,]+/).map { |t| t.sub(/^@?/, '') } : []
|
data/lib/doing/string/tags.rb
CHANGED
@@ -144,7 +144,7 @@ module Doing
|
|
144
144
|
tags = title.scan(/(?<=\A| )(@(\S+?)(\([^)]+\))?)(?= |\Z)/).uniq
|
145
145
|
tags.each do |tag|
|
146
146
|
found = false
|
147
|
-
title.gsub!(/( |^)#{tag[1]}(\([^)]+\))?(?= |$)/) do |m|
|
147
|
+
title.gsub!(/( |^)#{Regexp.escape(tag[1])}(\([^)]+\))?(?= |$)/) do |m|
|
148
148
|
if found
|
149
149
|
''
|
150
150
|
else
|
data/lib/doing/types.rb
CHANGED
@@ -12,7 +12,7 @@ module Doing
|
|
12
12
|
REGEX_DAY = /^(mon|tue|wed|thur?|fri|sat|sun)(\w+(day)?)?$/i.freeze
|
13
13
|
REGEX_RANGE_INDICATOR = ' +(?:to|through|thru|(?:un)?til|-+) +'
|
14
14
|
REGEX_RANGE = /^\S+.*?#{REGEX_RANGE_INDICATOR}\S+.*?$/i.freeze
|
15
|
-
REGEX_TIME_RANGE = /^#{REGEX_CLOCK}
|
15
|
+
REGEX_TIME_RANGE = /^#{REGEX_CLOCK}(?:#{REGEX_RANGE_INDICATOR}#{REGEX_CLOCK})?$/i.freeze
|
16
16
|
|
17
17
|
InvalidExportType = Class.new(RuntimeError)
|
18
18
|
MissingConfigFile = Class.new(RuntimeError)
|
data/lib/doing/version.rb
CHANGED