na 1.2.60 → 1.2.61

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c10e15eae9292e8245903b543c8adbb990be7fe7f166ee7d8636e557b4324aa5
4
- data.tar.gz: e625f1a56c6aa903ba273909b0dad8e230313ab119276d44f76a58da51c8561d
3
+ metadata.gz: '09631ecb9ed0479927d54375ed9e71807809ab93cd689bac1febde3509b9365f'
4
+ data.tar.gz: 1986fe627277b051a4de6bf879da28771b6ac0c53992bad79f1cecea6c86d2f0
5
5
  SHA512:
6
- metadata.gz: e84356c63836c19be6d87c3acb213c3741d8476b9c9ce4f03df6ce5024b21cdb6e0ba01dcdeca8bda0a8fbeea6a8fbd4bf42db6a44c77b574162f94e2e1bb868
7
- data.tar.gz: 93f0d4512a6fed663e7717e2ba3a64358dd8f3d931aa39ae0a44744ba0c479c6b0b3a24fd312bf7c754f24b3be07adf46d85342065e18fc012a52728069a6bf9
6
+ metadata.gz: 235b9d00ad77367d9b3c8807091efcae10f84591a712b486d32d661b6b7112a39057c0d614db34e86283b32d3d971f533bfab547ac2744b9768e78d46a18c6a9
7
+ data.tar.gz: 794846444bc772fe26d8f1af069e273ec85e1074657852fd476f03802b33e713b6d985826a83357aa4da211634f33fdb994582c33c026ec36ac1f64188e5268f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.2.61
2
+
3
+ 2023-10-03 12:44
4
+
5
+ #### NEW
6
+
7
+ - `--priority` (`-p`) flag for `na next`, allows you to only display actions matching a certain @priority value. Can be used multiple times, or combine multiple values with a comma. Allows <> comparisons, and if more than one value is provided, automatically does an OR search
8
+
1
9
  ### 1.2.60
2
10
 
3
11
  2023-10-03 12:31
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.60)
4
+ na (1.2.61)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  gli (~> 2.21.0)
7
7
  mdless (~> 1.0, >= 1.0.32)
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.60
12
+ The current version of `na` is 1.2.61
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.60
80
+ 1.2.61
81
81
 
82
82
  GLOBAL OPTIONS
83
83
  -a, --add - Add a next action (deprecated, for backwards compatibility)
@@ -295,6 +295,7 @@ COMMAND OPTIONS
295
295
  --nest - Output actions nested by file
296
296
  --[no-]notes - Include notes in output
297
297
  --omnifocus - Output actions nested by file and project
298
+ -p, --prio, --priority=PRIORITY - Match actions with priority, allows <>= comparison (may be used more than once, default: none)
298
299
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
299
300
  --regex - Search query is regular expression
300
301
  --save=TITLE - Save this search for future use (default: none)
@@ -411,6 +412,7 @@ COMMAND OPTIONS
411
412
  --nest - Output actions nested by file
412
413
  --[no-]notes - Include notes in output
413
414
  --omnifocus - Output actions nested by file and project
415
+ -p, --prio, --priority=PRIORITY - Match actions with priority, allows <>= comparison (may be used more than once, default: none)
414
416
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
415
417
  --regex - Search query is regular expression
416
418
  --save=TITLE - Save this search for future use (default: none)
data/bin/commands/next.rb CHANGED
@@ -42,6 +42,10 @@ class App
42
42
  c.arg_name 'TAG'
43
43
  c.flag %i[tagged], multiple: true
44
44
 
45
+ c.desc 'Match actions with priority, allows <>= comparison'
46
+ c.arg_name 'PRIORITY'
47
+ c.flag %i[p prio priority], multiple: true
48
+
45
49
  c.desc 'Filter results using search terms'
46
50
  c.arg_name 'QUERY'
47
51
  c.flag %i[search find grep], multiple: true
@@ -116,6 +120,20 @@ class App
116
120
 
117
121
  search = search.gsub(/,/, '').gsub(/ +/, ' ') unless search.nil?
118
122
 
123
+ if options[:priority].count.positive?
124
+ prios = options[:priority].join(',').split(/,/)
125
+ options[:or] = true if prios.count > 1
126
+ prios.each do |p|
127
+ options[:tagged] << if p =~ /^[<>=]{1,2}/
128
+ "priority#{p}"
129
+ else
130
+ "priority=#{p}"
131
+ end
132
+ end
133
+ end
134
+
135
+ pp options[:tagged]
136
+
119
137
  all_req = options[:tagged].join(' ') !~ /(?<=[, ])[+!-]/ && !options[:or]
120
138
  tags = []
121
139
  options[:tagged].join(',').split(/ *, */).each do |arg|
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.60'
2
+ VERSION = '1.2.61'
3
3
  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.2.59<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.60<!--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.60
4
+ version: 1.2.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra