na 1.2.33 → 1.2.34

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: d77588ce09a5a3cfc680b1866081dba5f56e75c8b51301cf0e1efee60c32f8f7
4
- data.tar.gz: 06d73082ad5371cda4760df90c929c74963d76843b7b979dde59e46fdb933389
3
+ metadata.gz: 4b14bfb4de93f7d04ffbb7685426941e279da422d00802c4320586c85f08e14b
4
+ data.tar.gz: 7a3e6c43f2118bbb5260e2d43e1fe135bc07db8f44489a47068b7733e8b57ec2
5
5
  SHA512:
6
- metadata.gz: 07ee85d5f2f95ba2542ff15ca3b6c3736bd85d4a5b1bd9c76a7099296b3976d9b0e2478d6e2b8b84a824787c9fc05050b89153c316b7878c9743e3cd4cad3a8a
7
- data.tar.gz: 0af252e545f390a539279747f7d89e87b5efaceb82db3adfa57ce037cd6e4b139e18aa2d90340dec14d9eb90f78c3b8963c5f7e92d59258f1711ea1dbb76462c
6
+ metadata.gz: b9fbce0504e8a40bf1a9961fcde1c538135ed37d0ced7bc491db3158d8bdd2be01b118f3102a148e0ff9df465e9210fd45fbe82ae14e2400a1b01d0300fbac9d
7
+ data.tar.gz: 1715ad409675baca29123792064f4729d2d65123a5b0ac11343f165cb427bdf704f2fc810f41e91bf1847852108d5eda3de89d990bcd43621f22377fef77a896
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.2.34
2
+
3
+ 2023-08-30 09:22
4
+
5
+ #### NEW
6
+
7
+ - `na restore SEARCH` to remove @done tag from result(s) (aliased as `unfinish`)
8
+
1
9
  ### 1.2.33
2
10
 
3
11
  2023-08-29 13:45
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.33)
4
+ na (1.2.34)
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.33
12
+ The current version of `na` is 1.2.34
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.33
80
+ 1.2.34
81
81
 
82
82
  GLOBAL OPTIONS
83
83
  -a, --add - Add a next action (deprecated, for backwards compatibility)
@@ -112,6 +112,7 @@ COMMANDS
112
112
  open - Open a todo file in the default editor
113
113
  projects - Show list of projects for a file
114
114
  prompt - Show or install prompt hooks for the current shell
115
+ restore, unfinish - Find and remove @done tag from an action
115
116
  saved - Execute a saved search
116
117
  tagged - Find actions matching a tag
117
118
  todos - Show list of known todo files
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ class App
4
+ extend GLI::App
5
+ desc 'Find and remove @done tag from an action'
6
+ arg_name 'PATTERN'
7
+ command %i[restore unfinish] do |c|
8
+ c.example 'na restore "An existing task"',
9
+ desc: 'Find "An existing task" and remove @done'
10
+ c.example 'na unfinish "An existing task"',
11
+ desc: 'Alias for restore'
12
+
13
+ c.desc 'Prompt for additional notes. Input will be appended to any existing note.
14
+ If STDIN input (piped) is detected, it will be used as a note.'
15
+ c.switch %i[n note], negatable: false
16
+
17
+ c.desc 'Overwrite note instead of appending'
18
+ c.switch %i[o overwrite], negatable: false
19
+
20
+ c.desc 'Specify the file to search for the task'
21
+ c.arg_name 'PATH'
22
+ c.flag %i[file]
23
+
24
+ c.desc 'Search for files X directories deep'
25
+ c.arg_name 'DEPTH'
26
+ c.flag %i[d depth], must_match: /^[1-9]$/, type: :integer, default_value: 1
27
+
28
+ c.desc 'Match actions containing tag. Allows value comparisons'
29
+ c.arg_name 'TAG'
30
+ c.flag %i[tagged], multiple: true
31
+
32
+ c.desc 'Act on all matches immediately (no menu)'
33
+ c.switch %i[all], negatable: false
34
+
35
+ c.desc 'Interpret search pattern as regular expression'
36
+ c.switch %i[e regex], negatable: false
37
+
38
+ c.desc 'Match pattern exactly'
39
+ c.switch %i[x exact], negatable: false
40
+
41
+ c.action do |global, options, args|
42
+ options[:remove] = ['done']
43
+ options[:done] = true
44
+ options[:finish] = false
45
+ options[:f] = false
46
+
47
+ cmd = commands[:update]
48
+ action = cmd.send(:get_action, nil)
49
+ action.call(global, options, args)
50
+ end
51
+ end
52
+ end
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.33'
2
+ VERSION = '1.2.34'
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.32<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.33<!--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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: na
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.33
4
+ version: 1.2.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-29 00:00:00.000000000 Z
11
+ date: 2023-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -218,6 +218,7 @@ files:
218
218
  - bin/commands/open.rb
219
219
  - bin/commands/projects.rb
220
220
  - bin/commands/prompt.rb
221
+ - bin/commands/restore.rb
221
222
  - bin/commands/saved.rb
222
223
  - bin/commands/tagged.rb
223
224
  - bin/commands/todos.rb