na 1.1.19 → 1.1.20

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: 3a57cbddd075c808316dbf206b6ff65d4d0caf307c4c27524faf94f6e86517d3
4
- data.tar.gz: 2e0ff764b2a777eb5089c228f7979c131c7669557f033f657241052cd3345b53
3
+ metadata.gz: cca7f5724f71b44df5ad9ac04646a26b9258cb2fb491b0e93b15b6c1f29c68d2
4
+ data.tar.gz: 249da515ff5d4b44928b8401f691e337440f0abd60d78b7155a1e5490b981519
5
5
  SHA512:
6
- metadata.gz: 4516162349290992f0a156161e3f3b1e7831ad383c38d9061ff44d267b862037e5cfb04796ac1143c4bdd1b60fa77b6c9576ee265add84abc19a5958d30dd8a6
7
- data.tar.gz: 91c86e3ea2c36fd66cbbc7211c9ebab460af7a9ba14668bb1f55a7a14d7e8b5aaf2ff8b7795672ee7c3856a3ae47b0783a40033c427b2df69ff2c0c6c60697e4
6
+ metadata.gz: eb3e8285512ba4091326d3c20c5d69e671d7a2f310b6d11f3f7b36ba6b3b19ab237059b12aa091158515eff675d8f6df0e10436119714a5de718e1f8f45a84bb
7
+ data.tar.gz: 1244b815b5666fb758c0b6359a584a5a11e493ce4f30a8c7e325cd9438b1d8ebaee638115d3765954cf9335947648105447941603a168c53aeaeb1ed5a7e5031
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.1.20
2
+
3
+ 2022-10-07 03:16
4
+
5
+ #### IMPROVED
6
+
7
+ - Date comparisons that don't specify a time are automatically adjusted to "noon" to allow direct comparison of days
8
+
1
9
  ### 1.1.19
2
10
 
3
11
  2022-10-07 03:06
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.1.19)
4
+ na (1.1.20)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  gli (~> 2.21.0)
7
7
  tty-reader (~> 0.9, >= 0.9.0)
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.19
12
+ The current version of `na` is 1.1.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.
data/lib/na/action.rb CHANGED
@@ -137,14 +137,14 @@ module NA
137
137
  return false if tag_val.nil?
138
138
 
139
139
  begin
140
- if val =~ /^today$/i
141
- val = 'today at 12am'
142
- tag_val = tag_val.sub(/\d\d:\d\d/, '00:00')
143
- end
144
-
145
140
  tag_date = Time.parse(tag_val)
146
141
  date = Chronic.parse(val)
147
142
 
143
+ unless val =~ /(\d:\d|a[mp]|now)/i
144
+ tag_date = Time.parse(tag_date.strftime('%Y-%m-%d 12:00'))
145
+ date = Time.parse(date.strftime('%Y-%m-%d 12:00'))
146
+ end
147
+
148
148
  puts "Comparing #{tag_date} #{tag[:comp]} #{date}" if NA.verbose
149
149
 
150
150
  case tag[:comp]
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.1.19'
2
+ VERSION = '1.1.20'
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.18<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.1.19<!--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
 
@@ -51,7 +51,37 @@ If found, it will try to locate an `Inbox:` project, or create one if it doesn't
51
51
  ### Usage
52
52
 
53
53
  ```
54
- @cli(bundle exec bin/na help)
54
+ NAME
55
+ na - Add and list next actions for the current project
56
+
57
+ SYNOPSIS
58
+ na [global options] command [command options] [arguments...]
59
+
60
+ VERSION
61
+ 1.1.19
62
+
63
+ GLOBAL OPTIONS
64
+ -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
65
+ -d, --depth=DEPTH - Recurse to depth (default: 1)
66
+ --[no-]debug - Display verbose output
67
+ --ext=EXT - File extension to consider a todo file (default: taskpaper)
68
+ --help - Show this message
69
+ -n, --note - Prompt for additional notes (deprecated, for backwards compatibility)
70
+ -p, --priority=PRIORITY - Set a priority 0-5 (deprecated, for backwards compatibility) (default: none)
71
+ -r, --[no-]recurse - Recurse 3 directories deep (deprecated, for backwards compatability)
72
+ -t, --na_tag=TAG - Tag to consider a next action (default: na)
73
+ --version - Display the program version
74
+
75
+ COMMANDS
76
+ add - Add a new next action
77
+ edit - Open a todo file in the default editor
78
+ find, grep - Find actions matching a search pattern
79
+ help - Shows a list of commands or help for one command
80
+ init, create - Create a new todo file in the current directory
81
+ initconfig - Initialize the config file using current global options
82
+ next, show - Show next actions
83
+ prompt - Show or install prompt hooks for the current shell
84
+ tagged - Find actions matching a tag
55
85
  ```
56
86
 
57
87
  #### Commands
@@ -63,13 +93,60 @@ Example: `na add This feature @idea I have`
63
93
  If you run the `add` command with no arguments, you'll be asked for input on the command line.
64
94
 
65
95
  ```
66
- @cli(bundle exec bin/na help add)
96
+ NAME
97
+ add - Add a new next action
98
+
99
+ SYNOPSIS
100
+
101
+ na [global options] add [command options] ACTION
102
+
103
+ DESCRIPTION
104
+ Provides an easy way to store todos while you work. Add quick reminders and (if you set up Prompt Hooks) they'll automatically display next time you enter the directory. If multiple todo files are found in the current directory, a menu will allow you to pick to which file the action gets added.
105
+
106
+ COMMAND OPTIONS
107
+ -d, --depth=DEPTH - Search for files X directories deep (default: 1)
108
+ -f, --file=PATH - Specify the file to which the task should be added (default: none)
109
+ -n, --note - Prompt for additional notes
110
+ -p, --priority=PRIO - Add a priority level 1-5 (default: 0)
111
+ -t, --tag=TAG - Use a tag other than the default next action tag (default: none)
112
+ --to=PROJECT - Add action to specific project (default: Inbox)
113
+ -x - Don't add next action tag to new entry
114
+
115
+ EXAMPLES
116
+
117
+ # Add a new action to the Inbox, including a tag
118
+ na add "A cool feature I thought of @idea"
119
+
120
+ # Add a new action to the Inbox, set its @priority to 4, and prompt for an additional note
121
+ na add "A bug I need to fix" -p 4 -n
67
122
  ```
68
123
 
69
124
  ##### edit
70
125
 
71
126
  ```
72
- @cli(bundle exec bin/na help edit)
127
+ NAME
128
+ edit - Open a todo file in the default editor
129
+
130
+ SYNOPSIS
131
+
132
+ na [global options] edit [command options]
133
+
134
+ DESCRIPTION
135
+ Let the system choose the defualt, (e.g. TaskPaper), or specify a command line utility (e.g. vim). If more than one todo file is found, a menu is displayed.
136
+
137
+ COMMAND OPTIONS
138
+ -a, --app=EDITOR - Specify a Mac app (default: none)
139
+ -d, --depth=DEPTH - Recurse to depth (default: 1)
140
+ -e, --editor=EDITOR - Specify an editor CLI (default: none)
141
+
142
+ EXAMPLES
143
+
144
+ # Open the main todo file in the default editor
145
+ na edit
146
+
147
+ # Display a menu of all todo files three levels deep from the
148
+ current directory, open selection in vim.
149
+ na edit -d 3 -a vim
73
150
  ```
74
151
 
75
152
  ##### find
@@ -79,13 +156,51 @@ Example: `na find cool feature idea`
79
156
  Unless `--exact` is specified, search is tokenized and combined with AND, so `na find cool feature idea` translates to `cool AND feature AND idea`, matching any string that contains all of the words. To make a token required and others optional, add a `+` before it (e.g. `cool +feature idea` is `(cool OR idea) AND feature`). Wildcards allowed (`*` and `?`), use `--regex` to interpret the search as a regular expression. Use `-v` to invert the results (display non-matching actions only).
80
157
 
81
158
  ```
82
- @cli(bundle exec bin/na help find)
159
+ NAME
160
+ find - Find actions matching a search pattern
161
+
162
+ SYNOPSIS
163
+
164
+ na [global options] find [command options] PATTERN
165
+
166
+ DESCRIPTION
167
+ Search tokens are separated by spaces. Actions matching all tokens in the pattern will be shown (partial matches allowed). Add a + before a token to make it required, e.g. `na find +feature +maybe`
168
+
169
+ COMMAND OPTIONS
170
+ -d, --depth=DEPTH - Recurse to depth (default: none)
171
+ -e, --regex - Interpret search pattern as regular expression
172
+ --in=TODO_PATH - Show actions from a specific todo file in history (default: none)
173
+ -o, --or - Combine search tokens with OR, displaying actions matching ANY of the terms
174
+ --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
175
+ -v, --invert - Show actions not matching search pattern
176
+ -x, --exact - Match pattern exactly
177
+
178
+ EXAMPLES
179
+
180
+ # Find all actions containing feature, idea, and swift
181
+ na find feature idea swift
182
+
183
+ # Find all actions containing the exact text "feature idea"
184
+ na find -x feature idea
83
185
  ```
84
186
 
85
187
  ##### init, create
86
188
 
87
189
  ```
88
- @cli(bundle exec bin/na help init)
190
+ NAME
191
+ init - Create a new todo file in the current directory
192
+
193
+ SYNOPSIS
194
+
195
+ na [global options] init [PROJECT]
196
+
197
+ EXAMPLES
198
+
199
+ # Generate a new todo file, prompting for project name
200
+ na init
201
+
202
+ # Generate a new todo for a project called warpspeed
203
+ na init warpspeed
89
204
  ```
90
205
 
91
206
  ##### next, show
@@ -97,7 +212,28 @@ Examples:
97
212
  - `na show marked2` (show next actions from another directory you've previously used na on)
98
213
 
99
214
  ```
100
- @cli(bundle exec bin/na help next)
215
+ NAME
216
+ next - Show next actions
217
+
218
+ SYNOPSIS
219
+
220
+ na [global options] next [command options] OPTIONAL_QUERY
221
+
222
+ COMMAND OPTIONS
223
+ -d, --depth=DEPTH - Recurse to depth (default: 2)
224
+ --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
225
+ -t, --tag=TAG - Alternate tag to search for (default: none)
226
+
227
+ EXAMPLES
228
+
229
+ # display the next actions from any todo files in the current directory
230
+ na next
231
+
232
+ # display the next actions from the current directory, traversing 3 levels deep
233
+ na next -d 3
234
+
235
+ # display next actions for a project you visited in the past
236
+ na next marked
101
237
  ```
102
238
 
103
239
  ##### tagged
@@ -107,7 +243,39 @@ Example: `na tagged feature +maybe`.
107
243
  Separate multiple tags with spaces or commas. By default tags are combined with AND, so actions matching all of the tags listed will be displayed. Use `+` to make a tag required and `!` to negate a tag (only display if the action does _not_ contain the tag). When `+` and/or `!` are used, undecorated tokens become optional matches. Use `-v` to invert the search and display all actions that _don't_ match.
108
244
 
109
245
  ```
110
- @cli(bundle exec bin/na help tagged)
246
+ NAME
247
+ tagged - Find actions matching a tag
248
+
249
+ SYNOPSIS
250
+
251
+ na [global options] tagged [command options] TAG [VALUE]
252
+
253
+ DESCRIPTION
254
+ Finds actions with tags matching the arguments. An action is shown if it contains all of the tags listed. Add a + before a tag to make it required and others optional. You can specify values using TAG=VALUE pairs. Use <, >, and = for numeric comparisons, and *=, ^=, and $= for text comparisons. Date comparisons use natural language (`na tagged "due<=today"`) and are detected automatically.
255
+
256
+ COMMAND OPTIONS
257
+ -d, --depth=DEPTH - Recurse to depth (default: 1)
258
+ --in=TODO_PATH - Show actions from a specific todo file in history (default: none)
259
+ -o, --or - Combine tags with OR, displaying actions matching ANY of the tags
260
+ --proj, --project=PROJECT[/SUBPROJECT] - Show actions from a specific project (default: none)
261
+ -v, --invert - Show actions not matching tags
262
+
263
+ EXAMPLES
264
+
265
+ # Show all actions tagged @maybe
266
+ na tagged maybe
267
+
268
+ # Show all actions tagged @feature AND @idea, recurse 3 levels
269
+ na tagged -d 3 "feature, idea"
270
+
271
+ # Show all actions tagged @feature OR @idea
272
+ na tagged --or "feature, idea"
273
+
274
+ # Show actions with @priority(4) or @priority(5)
275
+ na tagged "priority>=4"
276
+
277
+ # Show actions with a due date coming up in the next 2 days
278
+ na tagged "due<in 2 days"
111
279
  ```
112
280
 
113
281
  ### Configuration
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.1.19
4
+ version: 1.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra