na 1.2.25 → 1.2.26
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/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/README.md +4 -2
- data/bin/na +102 -4
- data/lib/na/version.rb +1 -1
- data/src/_README.md +1 -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: 890425bc1defde99d8f672fb531b736a6d4018487200c8e18ef5914478332144
|
4
|
+
data.tar.gz: ad8d9e5105f55080571e37a906fc1e3bdee3559c13898d1a4dcd706862405bc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f36e78f1c60459a325ac2aa63e0de725772d84b6041bca125a06a5186458a4b4a58c219073e3dd4f04ac453b72a3ec446718b3db319f5046da4d97a5730d0c5e
|
7
|
+
data.tar.gz: f6db15840e9c67fb4aa14abce022df6482471ec1dd9ae870e5ac9cdb1a3dfafde0ce81623ae76a21d1dcdf1ad1503788d463a629f88138c46932707ab9883b34
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
_If you're one of the rare people like me who find this useful, feel free to
|
10
10
|
[buy me some coffee][donate]._
|
11
11
|
|
12
|
-
The current version of `na` is 1.2.
|
12
|
+
The current version of `na` is 1.2.26
|
13
13
|
.
|
14
14
|
|
15
15
|
`na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
|
@@ -77,7 +77,7 @@ SYNOPSIS
|
|
77
77
|
na [global options] command [command options] [arguments...]
|
78
78
|
|
79
79
|
VERSION
|
80
|
-
1.2.
|
80
|
+
1.2.26
|
81
81
|
|
82
82
|
GLOBAL OPTIONS
|
83
83
|
-a, --add - Add a next action (deprecated, for backwards compatibility)
|
@@ -98,7 +98,9 @@ GLOBAL OPTIONS
|
|
98
98
|
|
99
99
|
COMMANDS
|
100
100
|
add - Add a new next action
|
101
|
+
archive - Mark an action as @done and archive
|
101
102
|
changes, changelog - Display the changelog
|
103
|
+
complete, finish - Find and mark an action as @done
|
102
104
|
edit - Open a todo file in the default editor
|
103
105
|
find, grep - Find actions matching a search pattern
|
104
106
|
help - Shows a list of commands or help for one command
|
data/bin/na
CHANGED
@@ -397,6 +397,102 @@ class App
|
|
397
397
|
end
|
398
398
|
end
|
399
399
|
|
400
|
+
desc 'Find and mark an action as @done'
|
401
|
+
arg_name 'ACTION'
|
402
|
+
command %i[complete finish] do |c|
|
403
|
+
c.example 'na complete "An existing task"',
|
404
|
+
desc: 'Find "An existing task" and mark @done'
|
405
|
+
c.example 'na finish "An existing task"',
|
406
|
+
desc: 'Alias for complete'
|
407
|
+
|
408
|
+
c.desc 'Prompt for additional notes. Input will be appended to any existing note.
|
409
|
+
If STDIN input (piped) is detected, it will be used as a note.'
|
410
|
+
c.switch %i[n note], negatable: false
|
411
|
+
|
412
|
+
c.desc 'Overwrite note instead of appending'
|
413
|
+
c.switch %i[o overwrite], negatable: false
|
414
|
+
|
415
|
+
c.desc 'Add a @done tag to action and move to Archive'
|
416
|
+
c.switch %i[a archive], negatable: false
|
417
|
+
|
418
|
+
c.desc 'Specify the file to search for the task'
|
419
|
+
c.arg_name 'PATH'
|
420
|
+
c.flag %i[file]
|
421
|
+
|
422
|
+
c.desc 'Search for files X directories deep'
|
423
|
+
c.arg_name 'DEPTH'
|
424
|
+
c.flag %i[d depth], must_match: /^[1-9]$/, type: :integer, default_value: 1
|
425
|
+
|
426
|
+
c.desc 'Match actions containing tag. Allows value comparisons'
|
427
|
+
c.arg_name 'TAG'
|
428
|
+
c.flag %i[tagged], multiple: true
|
429
|
+
|
430
|
+
c.desc 'Act on all matches immediately (no menu)'
|
431
|
+
c.switch %i[all], negatable: false
|
432
|
+
|
433
|
+
c.desc 'Interpret search pattern as regular expression'
|
434
|
+
c.switch %i[e regex], negatable: false
|
435
|
+
|
436
|
+
c.desc 'Match pattern exactly'
|
437
|
+
c.switch %i[x exact], negatable: false
|
438
|
+
|
439
|
+
c.action do |global, options, args|
|
440
|
+
options[:finish] = true
|
441
|
+
options[:f] = true
|
442
|
+
options[:project] = 'Archive' if options[:archive]
|
443
|
+
|
444
|
+
cmd = commands[:update]
|
445
|
+
action = cmd.send(:get_action, nil)
|
446
|
+
action.call(global, options, args)
|
447
|
+
end
|
448
|
+
end
|
449
|
+
|
450
|
+
desc 'Mark an action as @done and archive'
|
451
|
+
arg_name 'ACTION'
|
452
|
+
command %i[archive] do |c|
|
453
|
+
c.example 'na archive "An existing task"',
|
454
|
+
desc: 'Find "An existing task", mark @done if needed, and move to archive'
|
455
|
+
|
456
|
+
c.desc 'Prompt for additional notes. Input will be appended to any existing note.
|
457
|
+
If STDIN input (piped) is detected, it will be used as a note.'
|
458
|
+
c.switch %i[n note], negatable: false
|
459
|
+
|
460
|
+
c.desc 'Overwrite note instead of appending'
|
461
|
+
c.switch %i[o overwrite], negatable: false
|
462
|
+
|
463
|
+
c.desc 'Specify the file to search for the task'
|
464
|
+
c.arg_name 'PATH'
|
465
|
+
c.flag %i[file]
|
466
|
+
|
467
|
+
c.desc 'Search for files X directories deep'
|
468
|
+
c.arg_name 'DEPTH'
|
469
|
+
c.flag %i[d depth], must_match: /^[1-9]$/, type: :integer, default_value: 1
|
470
|
+
|
471
|
+
c.desc 'Match actions containing tag. Allows value comparisons'
|
472
|
+
c.arg_name 'TAG'
|
473
|
+
c.flag %i[tagged], multiple: true
|
474
|
+
|
475
|
+
c.desc 'Act on all matches immediately (no menu)'
|
476
|
+
c.switch %i[all], negatable: false
|
477
|
+
|
478
|
+
c.desc 'Interpret search pattern as regular expression'
|
479
|
+
c.switch %i[e regex], negatable: false
|
480
|
+
|
481
|
+
c.desc 'Match pattern exactly'
|
482
|
+
c.switch %i[x exact], negatable: false
|
483
|
+
|
484
|
+
c.action do |global, options, args|
|
485
|
+
options[:done] = true
|
486
|
+
options[:finish] = true
|
487
|
+
options[:project] = 'Archive'
|
488
|
+
options[:archive] = true
|
489
|
+
options[:a] = true
|
490
|
+
cmd = commands[:update]
|
491
|
+
action = cmd.send(:get_action, nil)
|
492
|
+
action.call(global, options, args)
|
493
|
+
end
|
494
|
+
end
|
495
|
+
|
400
496
|
desc 'Update an existing action'
|
401
497
|
long_desc 'Provides an easy way to complete, prioritize, and tag existing actions.
|
402
498
|
|
@@ -534,8 +630,8 @@ class App
|
|
534
630
|
end
|
535
631
|
|
536
632
|
priority = options[:priority].to_i if options[:priority]&.to_i&.positive?
|
537
|
-
add_tags = options[:tag].map { |t| t.sub(/^@/, '').wildcard_to_rx }
|
538
|
-
remove_tags = options[:remove].map { |t| t.sub(/^@/, '').wildcard_to_rx }
|
633
|
+
add_tags = options[:tag] ? options[:tag].map { |t| t.sub(/^@/, '').wildcard_to_rx } : []
|
634
|
+
remove_tags = options[:remove] ? options[:remove].map { |t| t.sub(/^@/, '').wildcard_to_rx } : []
|
539
635
|
|
540
636
|
stdin_note = NA.stdin ? NA.stdin.split("\n") : []
|
541
637
|
|
@@ -598,8 +694,10 @@ class App
|
|
598
694
|
|
599
695
|
end
|
600
696
|
|
601
|
-
|
602
|
-
|
697
|
+
if options[:archive]
|
698
|
+
options[:finish] = true
|
699
|
+
options[:project] = 'Archive'
|
700
|
+
end
|
603
701
|
|
604
702
|
NA.notify('{r}No search terms provided', exit_code: 1) if tokens.nil? && options[:tagged].empty?
|
605
703
|
|
data/lib/na/version.rb
CHANGED
data/src/_README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
_If you're one of the rare people like me who find this useful, feel free to
|
10
10
|
[buy me some coffee][donate]._
|
11
11
|
|
12
|
-
The current version of `na` is <!--VER-->1.2.
|
12
|
+
The current version of `na` is <!--VER-->1.2.25<!--END VER-->.
|
13
13
|
|
14
14
|
`na` ("next action") is a command line tool designed to make it easy to see what your next actions are for any project, right from the command line. It works with TaskPaper-formatted files (but any plain text format will do), looking for `@na` tags (or whatever you specify) in todo files in your current folder.
|
15
15
|
|