hookapp 0.0.7 → 2.0.7

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: a875858589f000f0828cf170f68c6b0f13db7f3d2a10965fc08a76ee4fceb848
4
- data.tar.gz: f2cff5c74c4dd9599d83faaa0f0723c5106b13f3bcb7c2726c9c750035fdf783
3
+ metadata.gz: 477033a68381137c2a2c67a486896da5d1210fb8d261950beff09df64b0b6566
4
+ data.tar.gz: b3de73462923bc91c88c7ab58b3c8fc7195ffe19cb4d09bef2acd3d0e579e7d5
5
5
  SHA512:
6
- metadata.gz: 977e7ddc4b1a2d5a99a9d7df21a614439c29cab22bdf1835d7e3ab68d819f7e69b06035a1d6064669dda7fe30f4af1d57d6c553e1bdf3cc8a2d4bebd329f45ce
7
- data.tar.gz: 8eb0ee4b2cf9117133b04a0cbc3847f090365adac5b13ee79a38eb3e55e4e28eba5d1d37905ac82a478fa9b3f3d984e95343372706405eb98891281299163bfe
6
+ metadata.gz: c64691a5a0ddc289590408efd13936e352962838f182ec905dfd8ac706197e6f5538d2cbe2a108b1a72f7ace459d90d36d1b789cf48bc7a6871391c871698a24
7
+ data.tar.gz: 3b91f789621f9cf091793ac75d9d44b61c09c2c07ae34fc4e84495ee670c2016c8583b71d00c067917f12aff77e603b389773a1cf4acb8a3a12bcd9cea2ac1bb
data/.gitignore CHANGED
@@ -1,2 +1,5 @@
1
1
  *.test
2
2
  pkg
3
+ vendor
4
+ *.bak
5
+ /results.html
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ #### 2.0.3
2
+
3
+ - Incorporate `fzf` for selecting and filtering hooks
4
+ - Improve documentation
5
+ - Add `scripts` command to output completion scripts for various shells7
6
+ - If no search is provided to `hook find`, list all hooks
7
+ - If no file is provided to `hook ls`, list all hooks
8
+
9
+
10
+ #### 2.0.0
11
+
12
+ - Revamped to use Hook 2.0 AppleScript syntax
13
+ - Added `find` command to search bookmarks
14
+
1
15
  #### 0.0.6
2
16
 
3
17
  - Fix missing variable in clipboard functions
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source 'https://rubygems.org'
1
+ source 'http://rubygems.org'
2
2
  gemspec
data/Gemfile.lock CHANGED
@@ -1,18 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hookapp (0.0.7)
5
- gli (= 2.19.0)
4
+ hookapp (2.0.7)
5
+ gli (~> 2.20.1)
6
6
 
7
7
  GEM
8
- remote: https://rubygems.org/
8
+ remote: http://rubygems.org/
9
9
  specs:
10
- activesupport (6.0.3.2)
11
- concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 0.7, < 2)
13
- minitest (~> 5.1)
14
- tzinfo (~> 1.1)
15
- zeitwerk (~> 2.2, >= 2.2.2)
16
10
  aruba (0.14.14)
17
11
  childprocess (>= 0.6.3, < 4.0.0)
18
12
  contracts (~> 0.9)
@@ -22,65 +16,54 @@ GEM
22
16
  thor (>= 0.19, < 2.0)
23
17
  builder (3.2.4)
24
18
  childprocess (3.0.0)
25
- concurrent-ruby (1.1.6)
26
- contracts (0.16.0)
27
- cucumber (4.1.0)
28
- builder (~> 3.2, >= 3.2.3)
29
- cucumber-core (~> 7.1, >= 7.1.0)
30
- cucumber-create-meta (~> 1.0.0, >= 1.0.0)
31
- cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
32
- cucumber-gherkin (~> 14.0, >= 14.0.1)
33
- cucumber-html-formatter (~> 7.0, >= 7.0.0)
34
- cucumber-messages (~> 12.2, >= 12.2.0)
35
- cucumber-wire (~> 3.1, >= 3.1.0)
36
- diff-lcs (~> 1.3, >= 1.3, < 1.4)
19
+ contracts (0.17)
20
+ cucumber (7.0.0)
21
+ builder (~> 3.2, >= 3.2.4)
22
+ cucumber-core (~> 10.0, >= 10.0.1)
23
+ cucumber-create-meta (~> 6.0, >= 6.0.1)
24
+ cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
25
+ cucumber-gherkin (~> 20.0, >= 20.0.1)
26
+ cucumber-html-formatter (~> 16.0, >= 16.0.1)
27
+ cucumber-messages (~> 17.0, >= 17.0.1)
28
+ cucumber-wire (~> 6.0, >= 6.0.1)
29
+ diff-lcs (~> 1.4, >= 1.4.4)
30
+ mime-types (~> 3.3, >= 3.3.1)
37
31
  multi_test (~> 0.1, >= 0.1.2)
38
- sys-uname (~> 1.0, >= 1.0.2)
39
- cucumber-core (7.1.0)
40
- cucumber-gherkin (~> 14.0, >= 14.0.1)
41
- cucumber-messages (~> 12.2, >= 12.2.0)
42
- cucumber-tag-expressions (~> 2.0, >= 2.0.4)
43
- cucumber-create-meta (1.0.0)
44
- cucumber-messages (~> 12.2, >= 12.2.0)
45
- sys-uname (~> 1.2, >= 1.2.1)
46
- cucumber-cucumber-expressions (10.2.1)
47
- cucumber-gherkin (14.0.1)
48
- cucumber-messages (~> 12.2, >= 12.2.0)
49
- cucumber-html-formatter (7.0.0)
50
- cucumber-messages (~> 12.2, >= 12.2.0)
51
- cucumber-messages (12.2.0)
52
- protobuf-cucumber (~> 3.10, >= 3.10.8)
53
- cucumber-tag-expressions (2.0.4)
54
- cucumber-wire (3.1.0)
55
- cucumber-core (~> 7.1, >= 7.1.0)
56
- cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
57
- cucumber-messages (~> 12.2, >= 12.2.0)
58
- diff-lcs (1.3)
59
- ffi (1.13.1)
60
- gli (2.19.0)
61
- i18n (1.8.3)
62
- concurrent-ruby (~> 1.0)
63
- middleware (0.1.0)
64
- minitest (5.14.1)
32
+ sys-uname (~> 1.2, >= 1.2.2)
33
+ cucumber-core (10.0.1)
34
+ cucumber-gherkin (~> 20.0, >= 20.0.1)
35
+ cucumber-messages (~> 17.0, >= 17.0.1)
36
+ cucumber-tag-expressions (~> 3.0, >= 3.0.1)
37
+ cucumber-create-meta (6.0.1)
38
+ cucumber-messages (~> 17.0, >= 17.0.1)
39
+ sys-uname (~> 1.2, >= 1.2.2)
40
+ cucumber-cucumber-expressions (12.1.3)
41
+ cucumber-gherkin (20.0.1)
42
+ cucumber-messages (~> 17.0, >= 17.0.1)
43
+ cucumber-html-formatter (16.0.1)
44
+ cucumber-messages (~> 17.0, >= 17.0.1)
45
+ cucumber-messages (17.1.1)
46
+ cucumber-tag-expressions (3.0.1)
47
+ cucumber-wire (6.1.1)
48
+ cucumber-core (~> 10.0, >= 10.0.1)
49
+ cucumber-cucumber-expressions (~> 12.1, >= 12.1.2)
50
+ cucumber-messages (~> 17.0, >= 17.0.1)
51
+ diff-lcs (1.4.4)
52
+ ffi (1.15.4)
53
+ gli (2.20.1)
54
+ mime-types (3.3.1)
55
+ mime-types-data (~> 3.2015)
56
+ mime-types-data (3.2021.0901)
65
57
  multi_test (0.1.2)
66
- protobuf-cucumber (3.10.8)
67
- activesupport (>= 3.2)
68
- middleware
69
- thor
70
- thread_safe
71
- rake (13.0.1)
72
- rdoc (6.1.2)
73
- rspec-expectations (3.9.2)
58
+ rake (13.0.6)
59
+ rdoc (6.3.2)
60
+ rspec-expectations (3.10.1)
74
61
  diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.9.0)
76
- rspec-support (3.9.3)
77
- sys-uname (1.2.1)
78
- ffi (>= 1.0.0)
79
- thor (1.0.1)
80
- thread_safe (0.3.6)
81
- tzinfo (1.2.7)
82
- thread_safe (~> 0.1)
83
- zeitwerk (2.3.1)
62
+ rspec-support (~> 3.10.0)
63
+ rspec-support (3.10.2)
64
+ sys-uname (1.2.2)
65
+ ffi (~> 1.1)
66
+ thor (1.1.0)
84
67
 
85
68
  PLATFORMS
86
69
  ruby
@@ -89,7 +72,7 @@ DEPENDENCIES
89
72
  aruba (~> 0.14.14)
90
73
  hookapp!
91
74
  rake (~> 13.0.1)
92
- rdoc (~> 6.1.2)
75
+ rdoc (~> 6.3.2)
93
76
 
94
77
  BUNDLED WITH
95
- 2.1.4
78
+ 2.2.24
data/LICENSE.md ADDED
@@ -0,0 +1,31 @@
1
+ ## Credits
2
+
3
+ HookApp embeds [Fuzzy Finder](https://github.com/junegunn/fzf) under the [MIT License](https://github.com/junegunn/fzf/blob/master/LICENSE)
4
+
5
+ HookApp is based on [GLI](https://github.com/davetron5000/gli) for building command line applications in Ruby. [Apache License](https://github.com/davetron5000/gli/blob/main/LICENSE.txt).
6
+
7
+ ## HookApp License
8
+
9
+ This software is licensed under the MIT License.
10
+
11
+ The MIT License (MIT)
12
+
13
+ Copyright (c) 2013-2020 Junegunn Choi
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in
23
+ all copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31
+ THE SOFTWARE.
data/OVERVIEW.md ADDED
@@ -0,0 +1,80 @@
1
+ ## Installation
2
+
3
+ `gem install hookapp`.
4
+
5
+ If you're on a stock Ruby install (i.e. have never installed `rvm` or `rbenv`), you may need sudo and your system password: `sudo gem install hookapp`.
6
+
7
+ ## Usage
8
+
9
+ Run `hook help` for usage.
10
+
11
+ ```nohighlight
12
+ NAME
13
+ hook - CLI interface for Hook.app (macOS)
14
+
15
+ SYNOPSIS
16
+ hook [global options] command [command options] [arguments...]
17
+
18
+ VERSION
19
+ 0.0.1
20
+
21
+ GLOBAL OPTIONS
22
+ --help - Show this message
23
+ --version - Display the program version
24
+
25
+ COMMANDS
26
+ clip, cp - Copy Hook URL for file/url to clipboard
27
+ clone - Clone all hooks from one file or url onto another
28
+ find, search - Search bookmarks
29
+ from - Get a Hook URL for the frontmost window of an app
30
+ help - Shows a list of commands or help for one command
31
+ link, ln - Create bidirectional hooks between two or more
32
+ files/urls
33
+ list, ls - List hooks on a file or url
34
+ open, gui - Open the specified file or url in Hook GUI
35
+ remove, rm - Remove a hook between two files/urls
36
+ scripts - Shell completion examples
37
+ select - Select from hooks on a file/url and open in default
38
+ application
39
+ ```
40
+
41
+ Run `hook help COMMAND` on any of the commands for more details.
42
+
43
+ ## Basics
44
+
45
+ ### Creating hooks
46
+
47
+ The `link` command always creates bidirectional hooks. Give it two or more files or urls and it will create links between them. By default it links all files to the last file in the list. Add the `--all` flag to link all files to every other file in the list. This can be abbreviated as `hook ln -a file1.md file2.pdf "https://brettterpstra.com"`.
48
+
49
+ Similar to the way you would use the GUI, you can use `hook clip file1.md` to copy a Hook URL to the clipboard (aliased as `cp`), and then use `hook ln -p file2.pdf` to create a link from the clipboard to `file2.pdf`.
50
+
51
+ You can also clone all of the links on one file to another, great for adding a new file to a group that's fully crosslinked. Just use `hook clone file1.md file2.pdf`.
52
+
53
+ ### Listing hooks
54
+
55
+ Use the `list` (aliased as `ls`) command to list all attached hooks for a file. With no output format specified, `ls` will show the paths to all hooks, or the hook url if the hook doesn't have a file path (e.g. a URL). You can specify an output format using `--output_format` (abbreviated as `-o`) with one of "markdown", "hooks", "paths", or "verbose". Formats can be abbreviated to their first letter, so to display a Markdown list of all hooked files, use `hook ls -o m file1.md`.
56
+
57
+ ### Removing hooks
58
+
59
+ Use `hook remove file1.md file2.pdf` to remove the bidirectional link between `file1.md` and `file2.pdf`. Add the `--all` flag (abbr. `-a`) with one or more files to remove ALL the hooks on them. This option requires confirmation.
60
+
61
+ #### Super nerdy scripting trick
62
+
63
+ The `--output_format=paths` option (abbr. `-o p`) combined with the `--files_only` flag (abbr. `-f`) will list just the paths and only include hooks that have file paths (i.e. exclude web, email, and other URLs). This can be combined with `--null` to output the list using a NULL separator, perfect for use with `xargs` or other command line tools.
64
+
65
+ ### Acting on hooks
66
+
67
+ You can open a hooked file or URL by running `hook select file1.md`. This will display a menu of all the hooks on `file1.md`, and entering the number of a selection will open that file in its default application.
68
+
69
+ You can also open a file in the Hook GUI using `hook open file1.md`.
70
+
71
+ ### Searching hooks
72
+
73
+ Use `hook find` (or `hook search`) and a search string to find bookmarks containing that string in the title, path, or url. Use `hook find -n` to search bookmark names only. All of the options from `hook ls`/`hook list` (output format, files only, null separator, etc.) work with `find`/`search`. See `hook help find` for details.
74
+
75
+ `hook find` with no search string will list all bookmarks. This can be used with the same output options as `hook ls`.
76
+
77
+ ### Shell completion
78
+
79
+ Use `hook scripts [SHELL]` to output a completion script for your specified shell (currently `bash`, `zsh`, or `fish` are available). The comment at the top of the output will guide you to install and utilize the script.
80
+
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
- # hookapp
1
+ # hook CLI
2
2
 
3
- A CLI for Hook.app on macOS.
3
+ CLI interface for Hook.app (macOS)
4
+
5
+ > Hook.app is a productivity tool for macOS <https://hookproductivity.com/>.
6
+ This gem includes a `hook` binary that allows interaction with the features of Hook.app.
7
+
8
+ *v2.0.7*
4
9
 
5
10
  ## Installation
6
11
 
@@ -12,29 +17,35 @@ If you're on a stock Ruby install (i.e. have never installed `rvm` or `rbenv`),
12
17
 
13
18
  Run `hook help` for usage.
14
19
 
15
- NAME
16
- hook - CLI interface for Hook.app (macOS)
20
+ ```nohighlight
21
+ NAME
22
+ hook - CLI interface for Hook.app (macOS)
17
23
 
18
- SYNOPSIS
19
- hook [global options] command [command options] [arguments...]
24
+ SYNOPSIS
25
+ hook [global options] command [command options] [arguments...]
20
26
 
21
- VERSION
22
- 0.0.1
27
+ VERSION
28
+ 0.0.1
23
29
 
24
- GLOBAL OPTIONS
25
- --help - Show this message
26
- --version - Display the program version
30
+ GLOBAL OPTIONS
31
+ --help - Show this message
32
+ --version - Display the program version
27
33
 
28
- COMMANDS
29
- clip, cp - Copy Hook URL for file/url to clipboard
30
- clone - Clone all hooks from one file or url onto another
31
- from - Get a Hook URL for the frontmost window of an app
32
- help - Shows a list of commands or help for one command
33
- link, ln - Create bidirectional hooks between two or more files/urls
34
- list, ls - List hooks on a file or url
35
- open, gui - Open the specified file or url in Hook GUI
36
- remove, rm - Remove a hook between two files/urls
37
- select - Select from hooks on a file/url and open in default application
34
+ COMMANDS
35
+ clip, cp - Copy Hook URL for file/url to clipboard
36
+ clone - Clone all hooks from one file or url onto another
37
+ find, search - Search bookmarks
38
+ from - Get a Hook URL for the frontmost window of an app
39
+ help - Shows a list of commands or help for one command
40
+ link, ln - Create bidirectional hooks between two or more
41
+ files/urls
42
+ list, ls - List hooks on a file or url
43
+ open, gui - Open the specified file or url in Hook GUI
44
+ remove, rm - Remove a hook between two files/urls
45
+ scripts - Shell completion examples
46
+ select - Select from hooks on a file/url and open in default
47
+ application
48
+ ```
38
49
 
39
50
  Run `hook help COMMAND` on any of the commands for more details.
40
51
 
@@ -66,3 +77,276 @@ You can open a hooked file or URL by running `hook select file1.md`. This will d
66
77
 
67
78
  You can also open a file in the Hook GUI using `hook open file1.md`.
68
79
 
80
+ ### Searching hooks
81
+
82
+ Use `hook find` (or `hook search`) and a search string to find bookmarks containing that string in the title, path, or url. Use `hook find -n` to search bookmark names only. All of the options from `hook ls`/`hook list` (output format, files only, null separator, etc.) work with `find`/`search`. See `hook help find` for details.
83
+
84
+ `hook find` with no search string will list all bookmarks. This can be used with the same output options as `hook ls`.
85
+
86
+ ### Shell completion
87
+
88
+ Use `hook scripts [SHELL]` to output a completion script for your specified shell (currently `bash`, `zsh`, or `fish` are available). The comment at the top of the output will guide you to install and utilize the script.
89
+
90
+
91
+ ## Global Options
92
+
93
+ ### `--help`
94
+
95
+ Show this message
96
+
97
+ ### `--version`
98
+
99
+ Display the program version
100
+
101
+ ## Commands
102
+
103
+ ### `$ hook` <mark>`clip|cp`</mark> ` FILE_OR_URL`
104
+
105
+ *Copy Hook URL for file/url to clipboard*
106
+
107
+ > Creates a bookmark for the specified file or URL and copies its Hook URL to the clipboard.
108
+ >
109
+ > The copied Hook URL can be used to link to other files (use `hook link --paste FILE/URL),
110
+ > or to paste into another app as a link. Use the -m flag to copy a full Markdown link.
111
+
112
+ #### Options
113
+
114
+ ##### `-a` | `--app` APP_NAME
115
+
116
+ Copy from application
117
+
118
+ ##### `-m`|`--markdown`
119
+
120
+ Copy as Markdown
121
+
122
+ * * * * * *
123
+
124
+ ### `$ hook` <mark>`clone`</mark> ` SOURCE TARGET`
125
+
126
+ *Clone all hooks from one file or url onto another*
127
+
128
+ > Copy all the files and urls that the first file is hooked to onto another file. Exactly two arguments (SOURCE, TARGET) required.
129
+
130
+ * * * * * *
131
+
132
+ ### `$ hook` <mark>`find|search`</mark> ` SEARCH_STRING`
133
+
134
+ *Search bookmarks*
135
+
136
+ > Search bookmark urls and names for a string and output in specified format (default "paths").
137
+ >
138
+ > Run `hook find` with no search argument to list all bookmarks.
139
+
140
+ #### Options
141
+
142
+ ##### `-o` | `--output_format` format
143
+
144
+ Output format [(h)ooks, (p)aths, (m)arkdown, (v)erbose]
145
+
146
+ *Default Value:* `paths`
147
+
148
+ ##### `-f`|`--files_only`
149
+
150
+ Output only bookmarks with file paths (exclude e.g. emails)
151
+
152
+ ##### `-n`|`--names_only`
153
+
154
+ Search only bookmark names
155
+
156
+ ##### `--null`
157
+
158
+ Separate results with NULL separator, only applies with "paths" output for single file argument
159
+
160
+ * * * * * *
161
+
162
+ ### `$ hook` <mark>`from`</mark> ` APPLICATION_NAME`
163
+
164
+ *Get a Hook URL for the frontmost window of an app*
165
+
166
+ > Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark
167
+ > for the active document, note, task, etc., returning a Hook URL.
168
+ >
169
+ > Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.
170
+
171
+ #### Options
172
+
173
+ ##### `-c`|`--copy`
174
+
175
+ Copy to clipboard
176
+
177
+ ##### `-m`|`--markdown`
178
+
179
+ Output as Markdown
180
+
181
+ * * * * * *
182
+
183
+ ### `$ hook` <mark>`help`</mark> ` command`
184
+
185
+ *Shows a list of commands or help for one command*
186
+
187
+ > Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function
188
+
189
+ #### Options
190
+
191
+ ##### `-c`
192
+
193
+ List commands one per line, to assist with shell completion
194
+
195
+ * * * * * *
196
+
197
+ ### `$ hook` <mark>`link|ln`</mark> ` SOURCE [SOURCE...] TARGET`
198
+
199
+ *Create bidirectional hooks between two or more files/urls*
200
+
201
+ > If two files/urls are provided, links will be bi-directional.
202
+ > If three or more are provided, `link` defaults to creating bi-directional
203
+ > links between each file and the last file in the list. Use `-a` to create
204
+ > bi-directional links between every file in the list.
205
+ >
206
+ > If using `--paste`, the URL/hook link in the clipboard will be used as one argument,
207
+ > to be combined with one or more file/url arguments.
208
+
209
+ #### Options
210
+
211
+ ##### `-a`|`--all`
212
+
213
+ Link every listed file or url to every other
214
+
215
+ ##### `-p`|`--paste`
216
+
217
+ Paste URL from clipboard
218
+
219
+ * * * * * *
220
+
221
+ ### `$ hook` <mark>`list|ls`</mark> ` FILE_OR_URL [FILE_OR_URL...]`
222
+
223
+ *List hooks on a file or url*
224
+
225
+ > Output a list of all hooks attached to given url(s) or file(s) in the specified format (default "paths").
226
+ >
227
+ > Run `hook list` with no file/url argument to list all bookmarks.
228
+
229
+ #### Options
230
+
231
+ ##### `-o` | `--output_format` format
232
+
233
+ Output format [(h)ooks, (p)aths, (m)arkdown, (v)erbose]
234
+
235
+ *Default Value:* `paths`
236
+
237
+ ##### `-f`|`--files_only`
238
+
239
+ Output only bookmarks with file paths (exclude e.g. emails)
240
+
241
+ ##### `--null`
242
+
243
+ Separate results with NULL separator, only applies with "paths" output for single file argument
244
+
245
+ ##### `-s`|`--[no-]select`
246
+
247
+ Generate a menu to select hook(s) for opening
248
+
249
+ > This option is a shortcut to `hook select` and overrides any other arguments.
250
+
251
+ * * * * * *
252
+
253
+ ### `$ hook` <mark>`open|gui`</mark> ` FILE_OR_URL`
254
+
255
+ *Open the specified file or url in Hook GUI*
256
+
257
+ > Opens Hook.app on the specified file/URL for browsing and performing actions. Exactly one argument (File/URL) required.
258
+
259
+ * * * * * *
260
+
261
+ ### `$ hook` <mark>`percent`</mark> ` STRING`
262
+
263
+ *Percent encode/decode a string*
264
+
265
+ > Use encode or decode to apply Hook's url encoding to a string argument. Use '-' to read input from STDIN.
266
+
267
+ #### Commands
268
+
269
+ ##### `$ hook` <mark>`decode`</mark> ` STRING`
270
+
271
+ *decode a percent-encoded string*
272
+
273
+ ##### `$ hook` <mark>`encode`</mark> ` STRING`
274
+
275
+ *percent encode a string*
276
+
277
+ * * * * * *
278
+
279
+ ### `$ hook` <mark>`remove|rm`</mark> ` ITEM_1 ITEM_2`
280
+
281
+ *Remove a hook between two files/urls*
282
+
283
+ > Remove a hook between two files or URLs. If you use --all, all hooks on a given file will be removed.
284
+ >
285
+ > If --all isn't specified, exactly two arguments (Files/URLs) are required.
286
+
287
+ #### Options
288
+
289
+ ##### `-a`|`--all`
290
+
291
+ Remove ALL links on files, requires confirmation
292
+
293
+ ##### `-f`|`--force`
294
+
295
+
296
+
297
+ * * * * * *
298
+
299
+ ### `$ hook` <mark>`scripts`</mark> ` SHELL`
300
+
301
+ *Shell completion examples*
302
+
303
+ > Output completion script example for the specified shell (bash, zsh, fish)
304
+
305
+ * * * * * *
306
+
307
+ ### `$ hook` <mark>`select`</mark> ` FILE_OR_URL`
308
+
309
+ *Select from hooks on a file/url and open in default application*
310
+
311
+ > If the target file/URL has hooked items, a menu will be provided. Selecting one or more files
312
+ > from this menu will open the item(s) using the default application assigned to the
313
+ > filetype by macOS. Allows multiple selections with tab key, and type-ahead fuzzy filtering of results.
314
+
315
+ * * * * * *
316
+
317
+ #### [Default Command] help
318
+ ## Credits
319
+
320
+ HookApp embeds [Fuzzy Finder](https://github.com/junegunn/fzf) under the [MIT License](https://github.com/junegunn/fzf/blob/master/LICENSE)
321
+
322
+ HookApp is based on [GLI](https://github.com/davetron5000/gli) for building command line applications in Ruby. [Apache License](https://github.com/davetron5000/gli/blob/main/LICENSE.txt).
323
+
324
+ ## HookApp License
325
+
326
+ This software is licensed under the MIT License.
327
+
328
+ The MIT License (MIT)
329
+
330
+ Copyright (c) 2013-2020 Junegunn Choi
331
+
332
+ Permission is hereby granted, free of charge, to any person obtaining a copy
333
+ of this software and associated documentation files (the "Software"), to deal
334
+ in the Software without restriction, including without limitation the rights
335
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
336
+ copies of the Software, and to permit persons to whom the Software is
337
+ furnished to do so, subject to the following conditions:
338
+
339
+ The above copyright notice and this permission notice shall be included in
340
+ all copies or substantial portions of the Software.
341
+
342
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
343
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
344
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
345
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
346
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
347
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
348
+ THE SOFTWARE.
349
+
350
+
351
+ Documentation generated 2021-09-25 07:37
352
+
data/Rakefile CHANGED
@@ -4,16 +4,18 @@ require 'rubygems/package_task'
4
4
  require 'rdoc/task'
5
5
  require 'cucumber'
6
6
  require 'cucumber/rake/task'
7
+ require 'rake/testtask'
7
8
  Rake::RDocTask.new do |rd|
8
9
  rd.main = "README.rdoc"
9
10
  rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
10
- rd.title = 'Your application title'
11
+ rd.title = 'hookapp'
11
12
  end
12
13
 
13
14
  spec = eval(File.read('hookapp.gemspec'))
14
15
 
15
16
  Gem::PackageTask.new(spec) do |pkg|
16
17
  end
18
+
17
19
  CUKE_RESULTS = 'results.html'
18
20
  CLEAN << CUKE_RESULTS
19
21
  desc 'Run features'
@@ -35,10 +37,12 @@ end
35
37
  task :cucumber => :features
36
38
  task 'cucumber:wip' => 'features:wip'
37
39
  task :wip => 'features:wip'
38
- require 'rake/testtask'
40
+
39
41
  Rake::TestTask.new do |t|
40
- t.libs << "test"
42
+ t.libs << ['test', 'test/helpers']
41
43
  t.test_files = FileList['test/*_test.rb']
44
+ t.verbose = ENV['VERBOSE'] =~ /(true|1)/i ? true : false
42
45
  end
43
46
 
44
- task :default => [:test,:features]
47
+ # task :default => [:test,:features]
48
+ task :default => [:test]