na 1.2.17 → 1.2.18
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 +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/na/next_action.rb +23 -3
- data/lib/na/string.rb +9 -0
- 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: 580a58387aafdf48e220483783dff100a26f370e5ac685239dcf2cff416793cc
|
|
4
|
+
data.tar.gz: 04ec4cd4089b00ab65688e6fb88509971f01ef605b88956e9ecf4e523b175067
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ff3cd0df2c68db3baa5022d5d9cb6dc7f61684aef2b50485cf4022ea4169dcc547b433fd2e42e454c21e29fb8dcd4f04fc7caaf9ae64de9e42dd0c57d4a882d
|
|
7
|
+
data.tar.gz: da239f2e39fbfbc514c321867b1068b1cc1e16e02e6b068cc1cd53024354baac2955442d0db8aed9ff495bb62ed68116f1f06ae6c0ddc0915cbe168ddc2a91b9
|
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.18
|
|
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.18
|
|
81
81
|
|
|
82
82
|
GLOBAL OPTIONS
|
|
83
83
|
-a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
|
data/lib/na/next_action.rb
CHANGED
|
@@ -414,7 +414,7 @@ module NA
|
|
|
414
414
|
current_parent = current_parent[par]
|
|
415
415
|
end
|
|
416
416
|
|
|
417
|
-
current_parent[:actions].push(a
|
|
417
|
+
current_parent[:actions].push(a)
|
|
418
418
|
end
|
|
419
419
|
parents
|
|
420
420
|
end
|
|
@@ -425,7 +425,27 @@ module NA
|
|
|
425
425
|
children.each do |k, v|
|
|
426
426
|
if k.to_s =~ /actions/
|
|
427
427
|
indent += "\t"
|
|
428
|
-
|
|
428
|
+
|
|
429
|
+
v.each do |a|
|
|
430
|
+
item = "#{indent}- #{a.action}"
|
|
431
|
+
|
|
432
|
+
unless a.tags.empty?
|
|
433
|
+
tags = []
|
|
434
|
+
a.tags.each do |k, v|
|
|
435
|
+
next if k =~ /^(due|flagged|done)$/
|
|
436
|
+
|
|
437
|
+
tag = k
|
|
438
|
+
tag += "-#{v}" unless v.nil? || v.empty?
|
|
439
|
+
tags.push(tag)
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
item += " @tags(#{tags.join(',')})" unless tags.empty?
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
item += "\n#{indent}\t#{a.note.join("\n#{indent}\t")}" if !a.note.empty?
|
|
446
|
+
|
|
447
|
+
out.push(item)
|
|
448
|
+
end
|
|
429
449
|
else
|
|
430
450
|
out.push("#{indent}#{k}:")
|
|
431
451
|
out.concat(output_children(v, level + 1))
|
|
@@ -461,7 +481,7 @@ module NA
|
|
|
461
481
|
out = []
|
|
462
482
|
parent_files.each do |file, actions|
|
|
463
483
|
projects = project_hierarchy(actions)
|
|
464
|
-
out.push("#{file.sub(%r{^./}, '')}:")
|
|
484
|
+
out.push("#{file.sub(%r{^./}, '').shorten_path}:")
|
|
465
485
|
out.concat(output_children(projects, 0))
|
|
466
486
|
end
|
|
467
487
|
puts out.join("\n")
|
data/lib/na/string.rb
CHANGED
|
@@ -167,6 +167,15 @@ class ::String
|
|
|
167
167
|
end
|
|
168
168
|
end
|
|
169
169
|
|
|
170
|
+
##
|
|
171
|
+
## Replace home directory with tilde
|
|
172
|
+
##
|
|
173
|
+
## @return [String] shortened path
|
|
174
|
+
##
|
|
175
|
+
def shorten_path
|
|
176
|
+
sub(/^#{ENV['HOME']}/, '~')
|
|
177
|
+
end
|
|
178
|
+
|
|
170
179
|
private
|
|
171
180
|
|
|
172
181
|
def matches_none(regexes)
|
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.17<!--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
|
|