na 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +3 -1
- data/README.md +19 -15
- data/bin/na +32 -2
- data/lib/na/next_action.rb +2 -2
- data/lib/na/version.rb +1 -1
- data/na.gemspec +1 -0
- data/src/README.md +1 -1
- 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: e7e57d75babca99bccbea082d51f20180c8089b677d2ae6a7088931b0af43fd5
|
4
|
+
data.tar.gz: 813a861742e460996b8074ce1d7603e9d3b9856a9fd2f5ed4e85e5c04fffbea0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f80bf3d000c6fe458c807e202a9da1aa09cf6d702b896abf93c494b876597d4efe352ed9132ce9ef3a820008794e795885c67cf41ebce374f10c675c1a5c77c2
|
7
|
+
data.tar.gz: 584e5f7da19d8c5d877897b2038e14164c6d5278201da89cc6cff8d21cc0aeb29b5be560f45dffc8a65f0756d1e3ee1e9f45760fe838485d21c8fe93bb3eefdf
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 1.2.1
|
2
|
+
|
3
|
+
2022-10-22 10:18
|
4
|
+
|
5
|
+
#### NEW
|
6
|
+
|
7
|
+
- Added `--done` tag to next/find/tagged to include @done actions in the output
|
8
|
+
- Use `na changes` to view the changelog and see recent changes
|
9
|
+
|
10
|
+
#### IMPROVED
|
11
|
+
|
12
|
+
- You can run `na SAVED_SEARCH` using any saved search (same as running `na saved SAVED_SEARCH` but niftier)
|
13
|
+
|
1
14
|
### 1.2.0
|
2
15
|
|
3
16
|
2022-10-22 01:32
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
na (1.2.
|
4
|
+
na (1.2.1)
|
5
5
|
chronic (~> 0.10, >= 0.10.2)
|
6
6
|
gli (~> 2.21.0)
|
7
|
+
mdless (~> 1.0, >= 1.0.32)
|
7
8
|
tty-reader (~> 0.9, >= 0.9.0)
|
8
9
|
tty-screen (~> 0.8, >= 0.8.1)
|
9
10
|
tty-which (~> 0.5, >= 0.5.0)
|
@@ -13,6 +14,7 @@ GEM
|
|
13
14
|
specs:
|
14
15
|
chronic (0.10.2)
|
15
16
|
gli (2.21.0)
|
17
|
+
mdless (1.0.32)
|
16
18
|
minitest (5.16.3)
|
17
19
|
rake (0.9.6)
|
18
20
|
rdoc (4.3.0)
|
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.1
|
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.
|
@@ -59,7 +59,7 @@ SYNOPSIS
|
|
59
59
|
na [global options] command [command options] [arguments...]
|
60
60
|
|
61
61
|
VERSION
|
62
|
-
1.2.
|
62
|
+
1.2.1
|
63
63
|
|
64
64
|
GLOBAL OPTIONS
|
65
65
|
-a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
|
@@ -74,19 +74,20 @@ GLOBAL OPTIONS
|
|
74
74
|
--version - Display the program version
|
75
75
|
|
76
76
|
COMMANDS
|
77
|
-
add
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
77
|
+
add - Add a new next action
|
78
|
+
changes, changelog - Display the changelog
|
79
|
+
edit - Open a todo file in the default editor
|
80
|
+
find, grep - Find actions matching a search pattern
|
81
|
+
help - Shows a list of commands or help for one command
|
82
|
+
init, create - Create a new todo file in the current directory
|
83
|
+
initconfig - Initialize the config file using current global options
|
84
|
+
next, show - Show next actions
|
85
|
+
projects - Show list of projects for a file
|
86
|
+
prompt - Show or install prompt hooks for the current shell
|
87
|
+
saved - Execute a saved search
|
88
|
+
tagged - Find actions matching a tag
|
89
|
+
todos - Show list of known todo files
|
90
|
+
update - Update an existing action
|
90
91
|
```
|
91
92
|
|
92
93
|
#### Commands
|
@@ -177,6 +178,7 @@ DESCRIPTION
|
|
177
178
|
|
178
179
|
COMMAND OPTIONS
|
179
180
|
-d, --depth=DEPTH - Recurse to depth (default: none)
|
181
|
+
--[no-]done - Include @done actions
|
180
182
|
-e, --regex - Interpret search pattern as regular expression
|
181
183
|
--in=TODO_PATH - Show actions from a specific todo file in history. May use wildcards (* and ?) (default: none)
|
182
184
|
-o, --or - Combine search tokens with OR, displaying actions matching ANY of the terms
|
@@ -234,6 +236,7 @@ DESCRIPTION
|
|
234
236
|
|
235
237
|
COMMAND OPTIONS
|
236
238
|
-d, --depth=DEPTH - Recurse to depth (default: 2)
|
239
|
+
--[no-]done - Include @done actions
|
237
240
|
--proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
|
238
241
|
-t, --tag=TAG - Alternate tag to search for (default: none)
|
239
242
|
|
@@ -324,6 +327,7 @@ DESCRIPTION
|
|
324
327
|
|
325
328
|
COMMAND OPTIONS
|
326
329
|
-d, --depth=DEPTH - Recurse to depth (default: 2)
|
330
|
+
--[no-]done - Include @done actions
|
327
331
|
--proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
|
328
332
|
-t, --tag=TAG - Alternate tag to search for (default: none)
|
329
333
|
|
data/bin/na
CHANGED
@@ -78,6 +78,9 @@ class App
|
|
78
78
|
c.arg_name 'PROJECT[/SUBPROJECT]'
|
79
79
|
c.flag %i[proj project]
|
80
80
|
|
81
|
+
c.desc 'Include @done actions'
|
82
|
+
c.switch %i[done]
|
83
|
+
|
81
84
|
c.action do |global_options, options, args|
|
82
85
|
if global_options[:add]
|
83
86
|
cmd = ['add']
|
@@ -115,6 +118,7 @@ class App
|
|
115
118
|
|
116
119
|
tag = [{ tag: tag, value: nil }, { tag: 'done', value: nil, negate: true}]
|
117
120
|
files, actions, = NA.parse_actions(depth: depth,
|
121
|
+
done: options[:done],
|
118
122
|
query: tokens,
|
119
123
|
tag: tag,
|
120
124
|
project: options[:project],
|
@@ -513,6 +517,9 @@ class App
|
|
513
517
|
c.arg_name 'PROJECT[/SUBPROJECT]'
|
514
518
|
c.flag %i[proj project]
|
515
519
|
|
520
|
+
c.desc 'Include @done actions'
|
521
|
+
c.switch %i[done]
|
522
|
+
|
516
523
|
c.desc 'Show actions not matching search pattern'
|
517
524
|
c.switch %i[v invert], negatable: false
|
518
525
|
|
@@ -563,6 +570,7 @@ class App
|
|
563
570
|
end
|
564
571
|
|
565
572
|
files, actions, = NA.parse_actions(depth: depth,
|
573
|
+
done: options[:done],
|
566
574
|
query: todo,
|
567
575
|
search: tokens,
|
568
576
|
negate: options[:invert],
|
@@ -610,6 +618,9 @@ class App
|
|
610
618
|
c.arg_name 'PROJECT[/SUBPROJECT]'
|
611
619
|
c.flag %i[proj project]
|
612
620
|
|
621
|
+
c.desc 'Include @done actions'
|
622
|
+
c.switch %i[done]
|
623
|
+
|
613
624
|
c.desc 'Show actions not matching tags'
|
614
625
|
c.switch %i[v invert], negatable: false
|
615
626
|
|
@@ -661,6 +672,7 @@ class App
|
|
661
672
|
end
|
662
673
|
|
663
674
|
files, actions, = NA.parse_actions(depth: depth,
|
675
|
+
done: options[:done],
|
664
676
|
query: todo,
|
665
677
|
tag: tags,
|
666
678
|
negate: options[:invert],
|
@@ -850,6 +862,24 @@ class App
|
|
850
862
|
end
|
851
863
|
end
|
852
864
|
|
865
|
+
desc 'Display the changelog'
|
866
|
+
command %i[changes changelog] do |c|
|
867
|
+
c.action do |_, _, _|
|
868
|
+
changelog = File.expand_path(File.join(File.dirname(__FILE__), '..', 'CHANGELOG.md'))
|
869
|
+
pagers = [
|
870
|
+
'mdless',
|
871
|
+
'mdcat',
|
872
|
+
'bat',
|
873
|
+
ENV['PAGER'],
|
874
|
+
'less -FXr',
|
875
|
+
ENV['GIT_PAGER'],
|
876
|
+
'more -r'
|
877
|
+
]
|
878
|
+
pager = pagers.find { |cmd| TTY::Which.exist?(cmd.split.first) }
|
879
|
+
system %(#{pager} "#{changelog}")
|
880
|
+
end
|
881
|
+
end
|
882
|
+
|
853
883
|
desc 'Execute a saved search'
|
854
884
|
long_desc 'Run without argument to list saved searches'
|
855
885
|
arg_name 'SEARCH_TITLE', optional: true
|
@@ -905,8 +935,8 @@ class App
|
|
905
935
|
on_error do |exception|
|
906
936
|
case exception
|
907
937
|
when GLI::UnknownCommand
|
908
|
-
cmd = ['
|
909
|
-
cmd.concat(ARGV.unshift($first_arg))
|
938
|
+
cmd = ['saved']
|
939
|
+
cmd.concat(ARGV.unshift($first_arg))
|
910
940
|
|
911
941
|
exit run(cmd)
|
912
942
|
when SystemExit
|
data/lib/na/next_action.rb
CHANGED
@@ -404,7 +404,7 @@ module NA
|
|
404
404
|
## @param require_na [Boolean] Require @na tag
|
405
405
|
## @param file [String] file path to parse
|
406
406
|
##
|
407
|
-
def parse_actions(depth: 1, query: nil, tag: nil, search: nil, negate: false, regex: false, project: nil, require_na: true, file_path: nil)
|
407
|
+
def parse_actions(depth: 1, done: false, query: nil, tag: nil, search: nil, negate: false, regex: false, project: nil, require_na: true, file_path: nil)
|
408
408
|
actions = []
|
409
409
|
required = []
|
410
410
|
optional = []
|
@@ -482,7 +482,7 @@ module NA
|
|
482
482
|
in_action = false
|
483
483
|
# search_for_done = false
|
484
484
|
# optional_tag.each { |t| search_for_done = true if t[:tag] =~ /done/ }
|
485
|
-
|
485
|
+
next if line =~ /@done/ && !done
|
486
486
|
|
487
487
|
next if require_na && line !~ /@#{NA.na_tag}\b/
|
488
488
|
|
data/lib/na/version.rb
CHANGED
data/na.gemspec
CHANGED
@@ -31,4 +31,5 @@ spec = Gem::Specification.new do |s|
|
|
31
31
|
s.add_runtime_dependency('tty-screen', '~> 0.8', '>= 0.8.1')
|
32
32
|
s.add_runtime_dependency('tty-which', '~> 0.5', '>= 0.5.0')
|
33
33
|
s.add_runtime_dependency('chronic', '~> 0.10', '>= 0.10.2')
|
34
|
+
s.add_runtime_dependency('mdless', '~> 1.0', '>= 1.0.32')
|
34
35
|
end
|
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.
|
12
|
+
The current version of `na` is <!--VER-->1.2.0<!--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
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: na
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
@@ -166,6 +166,26 @@ dependencies:
|
|
166
166
|
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: 0.10.2
|
169
|
+
- !ruby/object:Gem::Dependency
|
170
|
+
name: mdless
|
171
|
+
requirement: !ruby/object:Gem::Requirement
|
172
|
+
requirements:
|
173
|
+
- - "~>"
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '1.0'
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: 1.0.32
|
179
|
+
type: :runtime
|
180
|
+
prerelease: false
|
181
|
+
version_requirements: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - "~>"
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '1.0'
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: 1.0.32
|
169
189
|
description: A tool for managing a TaskPaper file of project todos for the current
|
170
190
|
directory. Easily create "next actions" to come back to, add tags and priorities,
|
171
191
|
and notes. Add prompt hooks to display your next actions automatically when cd'ing
|