na 1.2.19 → 1.2.21

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: 8c8bbd644e758263ac0301010b89259ad0e97debaba7d1cdfe51f4fd67e4c323
4
- data.tar.gz: 8f0a1f3e385f8b82b2afd376d2316e43d993493bf10974fc82040de6d4b89a28
3
+ metadata.gz: 652b91a5481fa62e1bb36ae71256a38d3081ee43999c167d1f35dc5ebc1e8261
4
+ data.tar.gz: 0deae6f4ade63260609e22b2aa0b7b8b2a668a77e487292b082c856c9a633f92
5
5
  SHA512:
6
- metadata.gz: aad67239d2046f7347700da92676ae0c3652631413fbc0c17d533036007f0b5147d1d8b161b1b38aaecf124c5740077faf42b8dcc6cff6a76d37fe7398758d62
7
- data.tar.gz: 2cf613349b29074b015e7394ba659b8200451eb950b965137b5c3b4a7a41108b98a70b4e66ac1bc3f6b23cd821b31de3a53db37cec8b662705af4af72042e334
6
+ metadata.gz: d3f1cb74ed04440ae3f8b95d70f2ad1dbc263d57b539e6a00b0984c46b008a6567008ed8098506b1ab6c9a2d2aa2c040cb15b1ebebd1794e3d3a4a5bd375f733
7
+ data.tar.gz: 30164f4a176f01b4978abaf7b5c3b3489925e535935802c5c0ce56947fb5baf96a36b9f05081073479cd3710a6b922bed698f2458644a99a270adf2b7781a1e3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 1.2.20
2
+
3
+ 2023-05-09 10:40
4
+
5
+ #### FIXED
6
+
7
+ - Allow single character projects
8
+ - Allow parens in project title
9
+
1
10
  ### 1.2.19
2
11
 
3
12
  2023-01-17 16:49
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.19)
4
+ na (1.2.21)
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.19
12
+ The current version of `na` is 1.2.20
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,11 +77,12 @@ SYNOPSIS
77
77
  na [global options] command [command options] [arguments...]
78
78
 
79
79
  VERSION
80
- 1.2.19
80
+ 1.2.21
81
81
 
82
82
  GLOBAL OPTIONS
83
- -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
83
+ -a, --add - Add a next action (deprecated, for backwards compatibility)
84
84
  --add_at=POSITION - Add all new/moved entries at [s]tart or [e]nd of target project (default: start)
85
+ --[no-]color - Colorize output (default: enabled)
85
86
  --cwd_as=TYPE - Use current working directory as [p]roject, [t]ag, or [n]one (default: none)
86
87
  -d, --depth=DEPTH - Recurse to depth (default: 3)
87
88
  --[no-]debug - Display verbose output
@@ -210,10 +211,10 @@ COMMAND OPTIONS
210
211
  --[no-]done - Include @done actions
211
212
  -e, --regex - Interpret search pattern as regular expression
212
213
  --in=TODO_PATH - Show actions from a specific todo file in history. May use wildcards (* and ?) (default: none)
213
- --[no-]nest - Output actions nested by file
214
+ --nest - Output actions nested by file
214
215
  --[no-]notes - Include notes in output
215
216
  -o, --or - Combine search tokens with OR, displaying actions matching ANY of the terms
216
- --[no-]omnifocus - Output actions nested by file and project
217
+ --omnifocus - Output actions nested by file and project
217
218
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
218
219
  --save=TITLE - Save this search for future use (default: none)
219
220
  --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
@@ -272,13 +273,13 @@ DESCRIPTION
272
273
  COMMAND OPTIONS
273
274
  -d, --depth=DEPTH - Recurse to depth (default: none)
274
275
  --[no-]done - Include @done actions
275
- --[no-]exact - Search query is exact text match (not tokens)
276
+ --exact - Search query is exact text match (not tokens)
276
277
  --in, --todo=TODO_FILE - Display matches from a known todo file (may be used more than once, default: none)
277
- --[no-]nest - Output actions nested by file
278
+ --nest - Output actions nested by file
278
279
  --[no-]notes - Include notes in output
279
- --[no-]omnifocus - Output actions nested by file and project
280
+ --omnifocus - Output actions nested by file and project
280
281
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
281
- --[no-]regex - Search query is regular expression
282
+ --regex - Search query is regular expression
282
283
  --search=QUERY - Filter results using search terms (may be used more than once, default: none)
283
284
  -t, --tag=TAG - Alternate tag to search for (default: none)
284
285
  --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
@@ -338,8 +339,8 @@ DESCRIPTION
338
339
  Run without argument to list saved searches
339
340
 
340
341
  COMMAND OPTIONS
341
- -d, --[no-]delete - Delete the specified search definition
342
- -e, --[no-]edit - Open the saved search file in $EDITOR
342
+ -d, --delete - Delete the specified search definition
343
+ -e, --edit - Open the saved search file in $EDITOR
343
344
 
344
345
  EXAMPLES
345
346
 
@@ -378,13 +379,13 @@ DESCRIPTION
378
379
  COMMAND OPTIONS
379
380
  -d, --depth=DEPTH - Recurse to depth (default: none)
380
381
  --[no-]done - Include @done actions
381
- --[no-]exact - Search query is exact text match (not tokens)
382
+ --exact - Search query is exact text match (not tokens)
382
383
  --in, --todo=TODO_FILE - Display matches from a known todo file (may be used more than once, default: none)
383
- --[no-]nest - Output actions nested by file
384
+ --nest - Output actions nested by file
384
385
  --[no-]notes - Include notes in output
385
- --[no-]omnifocus - Output actions nested by file and project
386
+ --omnifocus - Output actions nested by file and project
386
387
  --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
387
- --[no-]regex - Search query is regular expression
388
+ --regex - Search query is regular expression
388
389
  --search=QUERY - Filter results using search terms (may be used more than once, default: none)
389
390
  -t, --tag=TAG - Alternate tag to search for (default: none)
390
391
  --tagged=TAG - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ task :doc, [*Rake.application[:yard].arg_names] => [:yard]
15
15
  Rake::RDocTask.new do |rd|
16
16
  rd.main = "README.rdoc"
17
17
  rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
18
- rd.title = 'Your application title'
18
+ rd.title = 'na'
19
19
  end
20
20
 
21
21
  spec = eval(File.read('na.gemspec'))
data/bin/na CHANGED
@@ -34,7 +34,10 @@ class App
34
34
  NA::Color.coloring = $stdin.isatty
35
35
 
36
36
  desc 'Add a next action (deprecated, for backwards compatibility)'
37
- switch %i[a add]
37
+ switch %i[a add], negatable: false
38
+
39
+ desc 'Colorize output'
40
+ switch %i[color], negatable: true, default_value: true
38
41
 
39
42
  desc 'Set a priority 0-5 (deprecated, for backwards compatibility)'
40
43
  arg_name 'PRIORITY'
@@ -104,10 +107,10 @@ class App
104
107
  c.flag %i[search], multiple: true
105
108
 
106
109
  c.desc 'Search query is regular expression'
107
- c.switch %i[regex]
110
+ c.switch %i[regex], negatable: false
108
111
 
109
112
  c.desc 'Search query is exact text match (not tokens)'
110
- c.switch %i[exact]
113
+ c.switch %i[exact], negatable: false
111
114
 
112
115
  c.desc 'Include notes in output'
113
116
  c.switch %i[notes], negatable: true, default_value: false
@@ -116,10 +119,10 @@ class App
116
119
  c.switch %i[done]
117
120
 
118
121
  c.desc 'Output actions nested by file'
119
- c.switch %[nest]
122
+ c.switch %[nest], negatable: false
120
123
 
121
124
  c.desc 'Output actions nested by file and project'
122
- c.switch %[omnifocus]
125
+ c.switch %[omnifocus], negatable: false
123
126
 
124
127
  c.action do |global_options, options, args|
125
128
  if global_options[:add]
@@ -248,7 +251,7 @@ class App
248
251
  c.flag %i[t tag]
249
252
 
250
253
  c.desc 'Don\'t add next action tag to new entry'
251
- c.switch %i[x]
254
+ c.switch %i[x], negatable: false
252
255
 
253
256
  c.desc 'Specify the file to which the task should be added'
254
257
  c.arg_name 'PATH'
@@ -661,10 +664,10 @@ class App
661
664
  c.flag %i[save]
662
665
 
663
666
  c.desc 'Output actions nested by file'
664
- c.switch %[nest]
667
+ c.switch %[nest], negatable: false
665
668
 
666
669
  c.desc 'Output actions nested by file and project'
667
- c.switch %[omnifocus]
670
+ c.switch %[omnifocus], negatable: false
668
671
 
669
672
  c.action do |global_options, options, args|
670
673
  options[:nest] = true if options[:omnifocus]
@@ -785,10 +788,10 @@ class App
785
788
  c.flag %i[search], multiple: true
786
789
 
787
790
  c.desc 'Search query is regular expression'
788
- c.switch %i[regex]
791
+ c.switch %i[regex], negatable: false
789
792
 
790
793
  c.desc 'Search query is exact text match (not tokens)'
791
- c.switch %i[exact]
794
+ c.switch %i[exact], negatable: false
792
795
 
793
796
  c.desc 'Include @done actions'
794
797
  c.switch %i[done]
@@ -801,10 +804,10 @@ class App
801
804
  c.flag %i[save]
802
805
 
803
806
  c.desc 'Output actions nested by file'
804
- c.switch %[nest]
807
+ c.switch %[nest], negatable: false
805
808
 
806
809
  c.desc 'Output actions nested by file and project'
807
- c.switch %[omnifocus]
810
+ c.switch %[omnifocus], negatable: false
808
811
 
809
812
  c.action do |global_options, options, args|
810
813
  options[:nest] = true if options[:omnifocus]
@@ -1101,10 +1104,10 @@ class App
1101
1104
  c.example 'na saved', description: 'list available searches'
1102
1105
 
1103
1106
  c.desc 'Open the saved search file in $EDITOR'
1104
- c.switch %i[e edit]
1107
+ c.switch %i[e edit], negatable: false
1105
1108
 
1106
1109
  c.desc 'Delete the specified search definition'
1107
- c.switch %i[d delete]
1110
+ c.switch %i[d delete], negatable: false
1108
1111
 
1109
1112
  c.action do |_global_options, options, args|
1110
1113
  NA.edit_searches if options[:edit]
@@ -1128,6 +1131,7 @@ class App
1128
1131
 
1129
1132
  pre do |global, _command, _options, _args|
1130
1133
  NA.verbose = global[:debug]
1134
+ NA::Color.coloring = global[:color]
1131
1135
  NA.extension = global[:ext]
1132
1136
  NA.na_tag = global[:na_tag]
1133
1137
  NA.global_file = global[:file]
data/lib/na/colors.rb CHANGED
@@ -226,6 +226,7 @@ module NA
226
226
  ##
227
227
  def template(input)
228
228
  input = input.join(' ') if input.is_a? Array
229
+ return input.gsub(/(?<!\\)\{(\w+)\}/i, '') unless NA::Color.coloring?
229
230
 
230
231
  fmt = input.gsub(/%/, '%%')
231
232
  fmt = fmt.gsub(/(?<!\\)\{(\w+)\}/i) do
data/lib/na/string.rb CHANGED
@@ -35,7 +35,7 @@ class ::String
35
35
  end
36
36
 
37
37
  def project
38
- m = match(/^([ \t]*)([^\-][^@()]+?): *(@\S+ *)*$/)
38
+ m = match(/^([ \t]*)([^\-][^@:]*?): *(@\S+ *)*$/)
39
39
  m ? m[2] : nil
40
40
  end
41
41
 
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.19'
2
+ VERSION = '1.2.21'
3
3
  end
data/scripts/fixreadme.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  current_ver = `rake cver`
5
- src = 'src/README.md'
5
+ src = 'src/_README.md'
6
6
  dest = 'README.md'
7
7
 
8
8
  readme = IO.read(src).force_encoding('ASCII-8BIT').encode('UTF-8', invalid: :replace, undef: :replace, replace: '?')
@@ -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.18<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.20<!--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.19
4
+ version: 1.2.21
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-01-17 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -219,7 +219,7 @@ files:
219
219
  - na.gemspec
220
220
  - na.rdoc
221
221
  - scripts/fixreadme.rb
222
- - src/README.md
222
+ - src/_README.md
223
223
  homepage: https://brettterpstra.com/projects/na/
224
224
  licenses:
225
225
  - MIT