na 1.1.2 → 1.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14ffbfb64ddda9c09900f1037c38d7f903b1ad16ae7d00e568ab07a7358973c7
4
- data.tar.gz: f9fb349736f4cda36fb3d01ab624e93e78bcccae5b6a92853065539e25e0748c
3
+ metadata.gz: c64a806c23d11bc99a605308ab25e4bb1aa49a09c5a9a12ee525af5b521923cc
4
+ data.tar.gz: 8f96e949971d2a21e3cdf81ba669f0347236dcf876539a9fa541fd4619479459
5
5
  SHA512:
6
- metadata.gz: 1b9b602e6bc966a29bdf7e3b37fc2dcd0c2ec69e4e7fe0af5cdc7df2495c337b1bcde0975dceb3d14e095b1cda95cc4b306d02cbd15fc9f3e0616b5ef56392c7
7
- data.tar.gz: 5d7d8ca3b8bc07ced66eeeb5f70065047bb1a0e57585c6c3f7b915e67762769b19666fedd912773ba7eb09d46997f8a04354ab79b875cd292f33203a38429a89
6
+ metadata.gz: 74d2f119f26154192ff1c68f170efa7701a09784a84ab8f0a91fb5dd5a25f5ff1c2ac1add965b680a75499d28792f0b8760472d8e9996e2c278bbeda8599cc05
7
+ data.tar.gz: e82526a9cd103743e41fe8f66fd225fbc0e2160587ba4a4f518c2a465968395e4f69391493ea501620731e6167c0020a5b80d372ea0e4f89dfb4fd0ba69f3fd5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### 1.1.4
2
+
3
+ 2022-09-29 04:17
4
+
5
+ #### FIXED
6
+
7
+ - Doing reference in help screen for next
8
+
9
+ ### 1.1.3
10
+
11
+ 2022-09-28 07:12
12
+
13
+ #### FIXED
14
+
15
+ - `na next --tag X` not working
16
+
1
17
  ### 1.1.2
2
18
 
3
19
  2022-09-28 06:37
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.1.1)
4
+ na (1.1.4)
5
5
  gli (~> 2.21.0)
6
6
  tty-reader (~> 0.9, >= 0.9.0)
7
7
  tty-screen (~> 0.8, >= 0.8.1)
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.1.2
12
+ The current version of `na` is 1.1.4
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.
@@ -18,6 +18,14 @@ Used with Taskpaper files, it can add new todo items quickly from the command li
18
18
 
19
19
  It can also auto-display next actions when you enter a project directory, automatically locating any todo files and listing their next actions when you `cd` to the project (optionally recursive). See the [Prompt Hooks](#prompt-hooks) section for details.
20
20
 
21
+ ### Installation
22
+
23
+ Assuming you have Ruby and RubyGems installed, you can just run `gem install na`. If you run into errors, use `sudo gem install na`.
24
+
25
+ If you don't have Ruby/RubyGems, you can install them pretty easily with Homebrew, rvm, or asdf. I can't swear this tool is worth the time, but there _are_ a lot of great gems available...
26
+
27
+
28
+
21
29
  ### Features
22
30
 
23
31
  You can list next actions in files in the current directory by typing `na`. By default, `na` looks for `*.taskpaper` files and extracts items tagged `@na` and not `@done`. All of these can be changed in the configuration.
@@ -36,14 +44,6 @@ You can also quickly add todo items from the command line with the `add` subcomm
36
44
 
37
45
  If found, it will try to locate an `Inbox:` project, or create one if it doesn't exist. Any arguments after `add` will be combined to create a new task in TaskPaper format. They will automatically be assigned as next actions (tagged `@na`) and will show up when `na` lists the tasks for the project.
38
46
 
39
- ### Installation
40
-
41
- Assuming you have Ruby and RubyGems installed, you can just run `gem install na`. If you run into errors, use `sudo gem install na`.
42
-
43
- If you don't have Ruby/RubyGems, you can install them pretty easily with Homebrew, rvm, or asdf. I can't swear this tool is worth the time, but there _are_ a lot of great gems available...
44
-
45
-
46
-
47
47
  ### Usage
48
48
 
49
49
  ```
@@ -296,4 +296,9 @@ If you have [gum][] installed, na will use it for command line input when adding
296
296
  [donate]: http://brettterpstra.com/donate/
297
297
  [github]: https://github.com/ttscoff/na_gem/
298
298
 
299
+
299
300
  PayPal link: [paypal.me/ttscoff](https://paypal.me/ttscoff)
301
+
302
+ ## Changelog
303
+
304
+ See [CHANGELOG.md](https://github.com/ttscoff/na_gem/blob/master/CHANGELOG.md)
data/bin/na CHANGED
@@ -53,9 +53,9 @@ class App
53
53
  desc 'Show next actions'
54
54
  arg_name 'OPTIONAL_QUERY'
55
55
  command %i[next show] do |c|
56
- c.example 'doing next', desc: 'display the next actions from any todo files in the current directory'
57
- c.example 'doing next -d 3', desc: 'display the next actions from the current directory, traversing 3 levels deep'
58
- c.example 'doing next marked', desc: 'display next actions for a project you visited in the past'
56
+ c.example 'na next', desc: 'display the next actions from any todo files in the current directory'
57
+ c.example 'na next -d 3', desc: 'display the next actions from the current directory, traversing 3 levels deep'
58
+ c.example 'na next marked', desc: 'display next actions for a project you visited in the past'
59
59
  c.desc 'Recurse to depth'
60
60
  c.arg_name 'DEPTH'
61
61
  c.flag %i[d depth], type: :integer, must_match: /^\d+$/
@@ -92,6 +92,7 @@ class App
92
92
  end
93
93
 
94
94
  tag = options[:tag] == NA.na_tag ? nil : options[:tag]
95
+ tag = [{ tag: tag, value: nil }]
95
96
  files, actions = NA.parse_actions(depth: depth,
96
97
  query: tokens,
97
98
  tag: tag)
@@ -348,7 +349,7 @@ class App
348
349
  end
349
350
 
350
351
  if options[:editor]
351
- system %(#{options[:editor]} "#{file}")
352
+ system options[:editor], file
352
353
  else
353
354
  NA.edit_file(file: file, app: options[:app])
354
355
  end
@@ -81,7 +81,7 @@ module NA
81
81
  else
82
82
  '%filename%parent%action'
83
83
  end
84
- elsif NA.find_files(depth: depth).count > 1
84
+ elsif find_files(depth: depth).count > 1
85
85
  if depth > 1
86
86
  '%filename%parent%action'
87
87
  else
@@ -103,11 +103,13 @@ module NA
103
103
  optional = []
104
104
 
105
105
  tag&.each do |t|
106
- new_rx = " @#{t[:tag]}"
107
- new_rx = "#{new_rx}\\(#{t[:value]}\\)" if t[:value]
106
+ unless t[:tag].nil?
107
+ new_rx = " @#{t[:tag]}"
108
+ new_rx = "#{new_rx}\\(#{t[:value]}\\)" if t[:value]
108
109
 
109
- optional.push(new_rx)
110
- required.push(new_rx) if t[:required]
110
+ optional.push(new_rx)
111
+ required.push(new_rx) if t[:required]
112
+ end
111
113
  end
112
114
 
113
115
  unless search.nil?
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.4'
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.1.1<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.1.3<!--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
 
@@ -17,6 +17,14 @@ Used with Taskpaper files, it can add new todo items quickly from the command li
17
17
 
18
18
  It can also auto-display next actions when you enter a project directory, automatically locating any todo files and listing their next actions when you `cd` to the project (optionally recursive). See the [Prompt Hooks](#prompt-hooks) section for details.
19
19
 
20
+ ### Installation
21
+
22
+ Assuming you have Ruby and RubyGems installed, you can just run `gem install na`. If you run into errors, use `sudo gem install na`.
23
+
24
+ If you don't have Ruby/RubyGems, you can install them pretty easily with Homebrew, rvm, or asdf. I can't swear this tool is worth the time, but there _are_ a lot of great gems available...
25
+
26
+ <!--JEKYLL> You can find the na source code (MIT license) on [GitHub][].-->
27
+
20
28
  ### Features
21
29
 
22
30
  You can list next actions in files in the current directory by typing `na`. By default, `na` looks for `*.taskpaper` files and extracts items tagged `@na` and not `@done`. All of these can be changed in the configuration.
@@ -35,14 +43,6 @@ You can also quickly add todo items from the command line with the `add` subcomm
35
43
 
36
44
  If found, it will try to locate an `Inbox:` project, or create one if it doesn't exist. Any arguments after `add` will be combined to create a new task in TaskPaper format. They will automatically be assigned as next actions (tagged `@na`) and will show up when `na` lists the tasks for the project.
37
45
 
38
- ### Installation
39
-
40
- Assuming you have Ruby and RubyGems installed, you can just run `gem install na`. If you run into errors, use `sudo gem install na`.
41
-
42
- If you don't have Ruby/RubyGems, you can install them pretty easily with Homebrew, rvm, or asdf. I can't swear this tool is worth the time, but there _are_ a lot of great gems available...
43
-
44
- <!--JEKYLL> You can find the na source code (MIT license) on [GitHub][].-->
45
-
46
46
  ### Usage
47
47
 
48
48
  ```
@@ -295,8 +295,10 @@ If you have [gum][] installed, na will use it for command line input when adding
295
295
  [donate]: http://brettterpstra.com/donate/
296
296
  [github]: https://github.com/ttscoff/na_gem/
297
297
 
298
- <!--GITHUB-->PayPal link: [paypal.me/ttscoff](https://paypal.me/ttscoff)<!--END GITHUB-->
299
- <!--END README-->
298
+ <!--GITHUB-->
299
+ PayPal link: [paypal.me/ttscoff](https://paypal.me/ttscoff)
300
+
300
301
  ## Changelog
301
302
 
302
303
  See [CHANGELOG.md](https://github.com/ttscoff/na_gem/blob/master/CHANGELOG.md)
304
+ <!--END GITHUB--><!--END README-->
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: na
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-28 00:00:00.000000000 Z
11
+ date: 2022-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake