na 1.2.2 → 1.2.4

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: ba10397406ce9b754a63fcd7787eb5cc22923d5564de8eca50cb8bb6000115e7
4
- data.tar.gz: c7c47d9531177787b1615857135d8bc69ab3b3a3595aad30d357fa39f9b41fe5
3
+ metadata.gz: 27d214430ffba43bf8e743634313b8371ac65357842243ae6dd09b75108fd629
4
+ data.tar.gz: 0c2f0cc88fd3607b95a8859f7f8a29da809f0d1b89e500a361213ccf9482dc03
5
5
  SHA512:
6
- metadata.gz: 6861532283cf20d55f9fddff1979209024301863f01dfbe1d79d83096e397ab94b59a45715f1d1486939afce8e2fbb2b90196bbca5cb8a93ae5d02636804442d
7
- data.tar.gz: 9ebceba70f481a722c616d1ad819c23bd9dab13abebf68371fd966f0834585826596084e27bf27cc632515a4a7c7b162abedc4f997672cb7439ab22bf5ace8f1
6
+ metadata.gz: 402192eda881da608848f35c511f06416d84d3262729698c544017f4ea4ecb7036b9c0d34a8ec0bd8039c0a93a7b95d0d634f8ad1df0813c09b26735cc66662e
7
+ data.tar.gz: 5882c92767ec069b19e5d6b7d04ed561df8f1d26339016df27627553418442156f63608bf96064146cebd4b9f6922cb690700467c36f1444ae2a6c7efc9bf5d9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### 1.2.4
2
+
3
+ 2022-10-26 07:28
4
+
5
+ #### FIXED
6
+
7
+ - Backup file naming
8
+
9
+ ### 1.2.3
10
+
11
+ 2022-10-25 17:05
12
+
13
+ #### CHANGED
14
+
15
+ - Add a preceding dot to backup files created when updating to make backups hidden from notetaking apps and the like.
16
+
1
17
  ### 1.2.2
2
18
 
3
19
  2022-10-25 14:30
@@ -10,7 +26,7 @@
10
26
  #### NEW
11
27
 
12
28
  - `--at [start|end]` switch for `add` and `update` to determine
13
- - Global `--file PATH` flag to specify a single global todo file,
29
+ - Global `--file PATH` flag to specify a single global todo file
14
30
  - `--add_at [start|end]` global flag that can be added to config to make permanent
15
31
  - `--finish` switch for `na add` to immediately mark an action as @done
16
32
  - `--cwd_as [project|tag]` global flag when using a global `--file` to determine if the current working directory (last element) is added as an @tag or parent project
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- na (1.2.2)
4
+ na (1.2.4)
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.2
12
+ The current version of `na` is 1.2.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.
@@ -63,14 +63,14 @@ SYNOPSIS
63
63
  na [global options] command [command options] [arguments...]
64
64
 
65
65
  VERSION
66
- 1.2.2
66
+ 1.2.4
67
67
 
68
68
  GLOBAL OPTIONS
69
69
  -a, --[no-]add - Add a next action (deprecated, for backwards compatibility)
70
70
  --add_at=POSITION - Add all new/moved entries at [s]tart or [e]nd of target project (default: end)
71
71
  --cwd_as=TYPE - Use current working directory as [p]roject, [t]ag, or [n]one (default: none)
72
- -d, --depth=DEPTH - Recurse to depth (default: 1)
73
- --[no-]debug - Display verbose output (default: enabled)
72
+ -d, --depth=DEPTH - Recurse to depth (default: 3)
73
+ --[no-]debug - Display verbose output
74
74
  --ext=EXT - File extension to consider a todo file (default: taskpaper)
75
75
  -f, --file=PATH - Use a single file as global todo, use --initconfig to make permanent (default: none)
76
76
  --help - Show this message
@@ -382,7 +382,7 @@ You can specify a particular todo file using `--file PATH` or any todo from hist
382
382
 
383
383
  If more than one file is matched, a menu will be presented, multiple selections allowed. If multiple actions match the search within the selected file(s), a menu will be presented. If you have fzf installed, you can select one action to update with return, or use tab to mark multiple tasks to which the action will be applied. With gum you can use j, k, and x to mark multiple actions. Use the `--all` switch to force operation on all matched tasks, skipping the menu.
384
384
 
385
- Any time an update action is carried out, a backup of the file before modification will be made in the same directory with a `~` appended to the file extension (e.g. "marked.taskpaper" is backed up to "marked.taskpaper~"). Only one undo step is available, but if something goes wrong (and this feature is still experimental, so be wary), you can just copy the "~" file back to the original.
385
+ Any time an update action is carried out, a backup of the file before modification will be made in the same directory with a `.` prepended and `.bak` appended (e.g. `marked.taskpaper` is copied to `.marked.taskpaper.bak`). Only one undo step is available, but if something goes wrong (and this feature is still experimental, so be wary), you can just copy the "~" file back to the original.
386
386
 
387
387
  You can specify a new project for an action (moving it) with `--proj PROJECT_PATH`. A project path is hierarchical, with each level separated by a colon or slash. If the project path provided roughly matches an existing project, e.g. "mark:bug" would match "Marked:Bugs", then that project will be used. If no match is found, na will offer to generate a new project/hierarchy for the path provided. Strings will be exact but the first letter will be uppercased.
388
388
 
@@ -14,7 +14,7 @@ module NA
14
14
  ## @param debug [Boolean] only display message if running :verbose
15
15
  ##
16
16
  def notify(msg, exit_code: false, debug: false)
17
- return if debug && !@verbose
17
+ return if debug && NA.verbose
18
18
 
19
19
  $stderr.puts NA::Color.template("{x}#{msg}{x}")
20
20
  Process.exit exit_code if exit_code
@@ -751,7 +751,9 @@ module NA
751
751
  ## @param target [String] The file to back up
752
752
  ##
753
753
  def backup_file(target)
754
- FileUtils.cp(target, "#{target}~")
754
+ backup_file = ".#{File.basename(target)}.bak"
755
+ dir = File.dirname(target)
756
+ FileUtils.cp(target, File.join(dir, backup_file))
755
757
  end
756
758
 
757
759
  ##
data/lib/na/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Na
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.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.2.1<!--END VER-->.
12
+ The current version of `na` is <!--VER-->1.2.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
 
@@ -158,7 +158,7 @@ You can specify a particular todo file using `--file PATH` or any todo from hist
158
158
 
159
159
  If more than one file is matched, a menu will be presented, multiple selections allowed. If multiple actions match the search within the selected file(s), a menu will be presented. If you have fzf installed, you can select one action to update with return, or use tab to mark multiple tasks to which the action will be applied. With gum you can use j, k, and x to mark multiple actions. Use the `--all` switch to force operation on all matched tasks, skipping the menu.
160
160
 
161
- Any time an update action is carried out, a backup of the file before modification will be made in the same directory with a `~` appended to the file extension (e.g. "marked.taskpaper" is backed up to "marked.taskpaper~"). Only one undo step is available, but if something goes wrong (and this feature is still experimental, so be wary), you can just copy the "~" file back to the original.
161
+ Any time an update action is carried out, a backup of the file before modification will be made in the same directory with a `.` prepended and `.bak` appended (e.g. `marked.taskpaper` is copied to `.marked.taskpaper.bak`). Only one undo step is available, but if something goes wrong (and this feature is still experimental, so be wary), you can just copy the "~" file back to the original.
162
162
 
163
163
  You can specify a new project for an action (moving it) with `--proj PROJECT_PATH`. A project path is hierarchical, with each level separated by a colon or slash. If the project path provided roughly matches an existing project, e.g. "mark:bug" would match "Marked:Bugs", then that project will be used. If no match is found, na will offer to generate a new project/hierarchy for the path provided. Strings will be exact but the first letter will be uppercased.
164
164
 
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.2
4
+ version: 1.2.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-10-25 00:00:00.000000000 Z
11
+ date: 2022-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake