na 1.2.85 → 1.2.87
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 +4 -4
- data/.cursor/commands/changelog.md +4 -0
- data/.cursor/commands/priority35m36m335m32m.md +0 -0
- data/.rubocop_todo.yml +38 -33
- data/CHANGELOG.md +61 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +45 -1
- data/README.md +66 -2
- data/Rakefile +78 -78
- data/bin/commands/add.rb +31 -1
- data/bin/commands/changes.rb +1 -0
- data/bin/commands/complete.rb +11 -0
- data/bin/commands/find.rb +9 -1
- data/bin/commands/next.rb +35 -2
- data/bin/commands/tagged.rb +91 -58
- data/bin/commands/update.rb +154 -39
- data/bin/na +6 -0
- data/lib/na/action.rb +90 -17
- data/lib/na/actions.rb +136 -6
- data/lib/na/editor.rb +80 -1
- data/lib/na/next_action.rb +136 -48
- data/lib/na/string.rb +16 -5
- data/lib/na/theme.rb +51 -41
- data/lib/na/types.rb +190 -0
- data/lib/na/version.rb +1 -1
- data/lib/na.rb +12 -1
- data/src/_README.md +44 -1
- metadata +4 -1
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.
|
|
12
|
+
The current version of `na` is <!--VER-->1.2.86<!--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
|
|
|
@@ -235,6 +235,49 @@ See the help output for a list of all available actions.
|
|
|
235
235
|
@cli(bundle exec bin/na help update)
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
+
#### Time tracking
|
|
239
|
+
|
|
240
|
+
`na` supports tracking elapsed time between a start and finish for actions using `@started(YYYY-MM-DD HH:MM)` and `@done(YYYY-MM-DD HH:MM)` tags. Durations are not stored; they are calculated on the fly from these tags.
|
|
241
|
+
|
|
242
|
+
- Add/Finish/Update flags:
|
|
243
|
+
- `--started TIME` set a start time when creating or finishing an item
|
|
244
|
+
- `--end TIME` (alias `--finished`) set a done time
|
|
245
|
+
- `--duration DURATION` backfill start time from the provided end time
|
|
246
|
+
- All flags accept natural language (via Chronic) and shorthand: `30m ago`, `-2h`, `2h30m`, `2:30 ago`, `yesterday 5pm`
|
|
247
|
+
|
|
248
|
+
Examples:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
na add --started "30 minutes ago" "Investigate bug"
|
|
252
|
+
na complete --finished now --duration 2h30m "Investigate bug"
|
|
253
|
+
na update --started "yesterday 3pm" --end "yesterday 5:15pm" "Investigate bug"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
- Display flags (next/tagged):
|
|
257
|
+
- `--times` show per‑action durations and a grand total (implies `--done`)
|
|
258
|
+
- `--human` format durations as human‑readable text instead of `DD:HH:MM:SS`
|
|
259
|
+
- `--only_timed` show only actions that have both `@started` and `@done` (implies `--times --done`)
|
|
260
|
+
- `--only_times` output only the totals section (no action lines; implies `--times --done`)
|
|
261
|
+
- `--json_times` output a JSON object with timed items, per‑tag totals, and overall total (implies `--times --done`)
|
|
262
|
+
|
|
263
|
+
Example outputs:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# Per‑action durations appended and totals table
|
|
267
|
+
na next --times --human
|
|
268
|
+
|
|
269
|
+
# Only totals table (Markdown), no action lines
|
|
270
|
+
na tagged "tag*=bug" --only_times
|
|
271
|
+
|
|
272
|
+
# JSON for scripting
|
|
273
|
+
na next --json_times > times.json
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Notes:
|
|
277
|
+
|
|
278
|
+
- Any newly added or edited action text is scanned for natural‑language values in `@started(...)`/`@done(...)` and normalized to `YYYY‑MM‑DD HH:MM`.
|
|
279
|
+
- The color of durations in output is configurable via the theme key `duration` (defaults to `{y}`).
|
|
280
|
+
|
|
238
281
|
##### changelog
|
|
239
282
|
|
|
240
283
|
View recent changes with `na changelog` or `na changes`.
|
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.
|
|
4
|
+
version: 1.2.87
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Terpstra
|
|
@@ -245,6 +245,8 @@ extra_rdoc_files:
|
|
|
245
245
|
- README.md
|
|
246
246
|
- na.rdoc
|
|
247
247
|
files:
|
|
248
|
+
- ".cursor/commands/changelog.md"
|
|
249
|
+
- ".cursor/commands/priority35m36m335m32m.md"
|
|
248
250
|
- ".rubocop.yml"
|
|
249
251
|
- ".rubocop_todo.yml"
|
|
250
252
|
- ".travis.yml"
|
|
@@ -302,6 +304,7 @@ files:
|
|
|
302
304
|
- lib/na/string.rb
|
|
303
305
|
- lib/na/theme.rb
|
|
304
306
|
- lib/na/todo.rb
|
|
307
|
+
- lib/na/types.rb
|
|
305
308
|
- lib/na/version.rb
|
|
306
309
|
- na.gemspec
|
|
307
310
|
- na.rdoc
|