hookapp 2.0.16 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +13 -13
- data/README.rdoc +1 -1
- data/Rakefile +4 -4
- data/bin/hook +11 -11
- data/hook.rdoc +12 -12
- data/html/App.html +1 -1
- data/html/GLI/Commands/MarkdownDocumentListener.html +1 -1
- data/html/HookApp.html +16 -16
- data/html/Object.html +106 -0
- data/html/README_rdoc.html +14 -14
- data/html/String.html +1 -1
- data/html/created.rid +6 -6
- data/html/index.html +14 -13
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/table_of_contents.html +4 -1
- data/lib/hook/hookapp.rb +14 -14
- data/lib/hook/version.rb +1 -1
- data/lib/hook.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25f4c050d142cf0e50d7eb6e3c034c5bec09b313643af3925b63824d5eec42e4
|
4
|
+
data.tar.gz: 3d9aa843527c9431cab23c086b703f3cf47ea598650cf6297cb1acf5036b3f68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ac2d88f4dcc6a725ccda24717470222c4661e1f20003d82ce67e628a2c1a5508b55fa0366f07ea535585d8db1e1c1b9066fd975b0ec7ea5b6c8f679276276b0
|
7
|
+
data.tar.gz: a809bba7e260162f183ea3513e2b791152f90b9dd811bfdce4bf39f4d2bca572912c07dac71ae51371721d601b3f85483c9c3e89d97142695c7b219fda5a5dcd
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# hook CLI
|
2
2
|
|
3
|
-
CLI interface for
|
3
|
+
CLI interface for Hookmark (macOS)
|
4
4
|
|
5
|
-
>
|
5
|
+
> Hookmark is a productivity tool for macOS <https://hookproductivity.com/>.
|
6
6
|
|
7
|
-
This gem includes a `hook` binary that allows interaction with the features of
|
7
|
+
This gem includes a `hook` binary that allows interaction with the features of Hookmark.
|
8
8
|
|
9
|
-
*v2.
|
9
|
+
*v2.1.1*
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -111,11 +111,11 @@ Display the program version
|
|
111
111
|
|
112
112
|
### `$ hook` <mark>`clip|cp`</mark> `FILE_OR_URL`
|
113
113
|
|
114
|
-
*Copy
|
114
|
+
*Copy Hookmark URL for file/url to clipboard*
|
115
115
|
|
116
|
-
> Creates a bookmark for the specified file or URL and copies its
|
116
|
+
> Creates a bookmark for the specified file or URL and copies its Hookmark URL to the clipboard.
|
117
117
|
>
|
118
|
-
> The copied
|
118
|
+
> The copied Hookmark URL can be used to link to other files (use `hook link --paste FILE/URL`,
|
119
119
|
> or to paste into another app as a link. Use the -m flag to copy a full Markdown link.
|
120
120
|
|
121
121
|
#### Options
|
@@ -172,10 +172,10 @@ Separate results with NULL separator, only applies with "paths" output for singl
|
|
172
172
|
|
173
173
|
### `$ hook` <mark>`from`</mark> `APPLICATION_NAME`
|
174
174
|
|
175
|
-
*Get a
|
175
|
+
*Get a Hookmark URL for the frontmost window of an app*
|
176
176
|
|
177
177
|
> Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark
|
178
|
-
> for the active document, note, task, etc., returning a
|
178
|
+
> for the active document, note, task, etc., returning a Hookmark URL.
|
179
179
|
>
|
180
180
|
> Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.
|
181
181
|
|
@@ -263,9 +263,9 @@ Generate a menu to select hook(s) for opening
|
|
263
263
|
|
264
264
|
### `$ hook` <mark>`open|gui`</mark> `FILE_OR_URL`
|
265
265
|
|
266
|
-
*Open the specified file or url in
|
266
|
+
*Open the specified file or url in Hookmark GUI*
|
267
267
|
|
268
|
-
> Opens
|
268
|
+
> Opens Hookmark on the specified file/URL for browsing and performing actions.
|
269
269
|
>
|
270
270
|
> Exactly one argument (File/URL) required.
|
271
271
|
|
@@ -275,7 +275,7 @@ Generate a menu to select hook(s) for opening
|
|
275
275
|
|
276
276
|
*Percent encode/decode a string*
|
277
277
|
|
278
|
-
> Use encode or decode to apply
|
278
|
+
> Use encode or decode to apply Hookmark's url encoding to a string argument. Use '-' to read input from STDIN.
|
279
279
|
|
280
280
|
#### Commands
|
281
281
|
|
@@ -366,5 +366,5 @@ This software is licensed under the MIT License.
|
|
366
366
|
THE SOFTWARE.
|
367
367
|
|
368
368
|
|
369
|
-
Documentation generated 2022-
|
369
|
+
Documentation generated 2022-11-11 09:56
|
370
370
|
|
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -20,9 +20,9 @@ CUKE_RESULTS = 'results.html'
|
|
20
20
|
CLEAN << CUKE_RESULTS
|
21
21
|
desc 'Run features'
|
22
22
|
Cucumber::Rake::Task.new(:features) do |t|
|
23
|
-
opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
|
24
|
-
opts
|
25
|
-
t.cucumber_opts =
|
23
|
+
opts = ["features", "--format html", "-o #{CUKE_RESULTS}", "--format progress", "-x"]
|
24
|
+
opts.push("--tags #{ENV['TAGS']}") if ENV['TAGS']
|
25
|
+
t.cucumber_opts = opts
|
26
26
|
t.fork = false
|
27
27
|
end
|
28
28
|
|
@@ -30,7 +30,7 @@ desc 'Run features tagged as work-in-progress (@wip)'
|
|
30
30
|
Cucumber::Rake::Task.new('features:wip') do |t|
|
31
31
|
tag_opts = ' --tags ~@pending'
|
32
32
|
tag_opts = ' --tags @wip'
|
33
|
-
t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty -x -s#{tag_opts}"
|
33
|
+
t.cucumber_opts = ["features", "--format html", "-o #{CUKE_RESULTS}", "--format pretty", "-x", "-s#{tag_opts}"]
|
34
34
|
t.fork = false
|
35
35
|
end
|
36
36
|
|
data/bin/hook
CHANGED
@@ -8,10 +8,10 @@ require 'shellwords'
|
|
8
8
|
class App
|
9
9
|
extend GLI::App
|
10
10
|
|
11
|
-
program_desc 'CLI interface for
|
12
|
-
program_long_desc '
|
11
|
+
program_desc 'CLI interface for Hookmark (macOS)'
|
12
|
+
program_long_desc 'Hookmark is a productivity tool for macOS <https://hookproductivity.com/>.
|
13
13
|
|
14
|
-
This gem includes a `hook` binary that allows interaction with the features of
|
14
|
+
This gem includes a `hook` binary that allows interaction with the features of Hookmark.'
|
15
15
|
default_command 'help'
|
16
16
|
autocomplete_commands = true
|
17
17
|
synopsis_format(:terminal)
|
@@ -155,10 +155,10 @@ to be combined with one or more file/url arguments.
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
|
-
desc 'Copy
|
159
|
-
long_desc %{Creates a bookmark for the specified file or URL and copies its
|
158
|
+
desc 'Copy Hookmark URL for file/url to clipboard'
|
159
|
+
long_desc %{Creates a bookmark for the specified file or URL and copies its Hookmark URL to the clipboard.
|
160
160
|
|
161
|
-
The copied
|
161
|
+
The copied Hookmark URL can be used to link to other files (use `hook link --paste FILE/URL`,
|
162
162
|
or to paste into another app as a link. Use the -m flag to copy a full Markdown link.}
|
163
163
|
arg_name 'FILE_OR_URL'
|
164
164
|
command %i[clip cp] do |c|
|
@@ -179,9 +179,9 @@ or to paste into another app as a link. Use the -m flag to copy a full Markdown
|
|
179
179
|
end
|
180
180
|
end
|
181
181
|
|
182
|
-
desc 'Get a
|
182
|
+
desc 'Get a Hookmark URL for the frontmost window of an app'
|
183
183
|
long_desc %(Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark
|
184
|
-
for the active document, note, task, etc., returning a
|
184
|
+
for the active document, note, task, etc., returning a Hookmark URL.
|
185
185
|
|
186
186
|
Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.)
|
187
187
|
arg_name 'APPLICATION_NAME'
|
@@ -251,8 +251,8 @@ filetype by macOS. Allows multiple selections with tab key, and type-ahead fuzzy
|
|
251
251
|
end
|
252
252
|
end
|
253
253
|
|
254
|
-
desc 'Open the specified file or url in
|
255
|
-
long_desc 'Opens
|
254
|
+
desc 'Open the specified file or url in Hookmark GUI'
|
255
|
+
long_desc 'Opens Hookmark on the specified file/URL for browsing and performing actions.
|
256
256
|
|
257
257
|
Exactly one argument (File/URL) required.'
|
258
258
|
arg_name 'FILE_OR_URL'
|
@@ -268,7 +268,7 @@ Exactly one argument (File/URL) required.'
|
|
268
268
|
end
|
269
269
|
|
270
270
|
desc 'Percent encode/decode a string'
|
271
|
-
long_desc %(Use encode or decode to apply
|
271
|
+
long_desc %(Use encode or decode to apply Hookmark's url encoding to a string argument. Use '-' to read input from STDIN.)
|
272
272
|
arg_name 'STRING'
|
273
273
|
command :percent do |c|
|
274
274
|
c.desc 'percent encode a string'
|
data/hook.rdoc
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
== hook - CLI interface for
|
1
|
+
== hook - CLI interface for Hookmark (macOS)
|
2
2
|
|
3
|
-
|
3
|
+
Hookmark is a productivity tool for macOS <https://hookproductivity.com/>.
|
4
4
|
|
5
|
-
This gem includes a `hook` binary that allows interaction with the features of
|
5
|
+
This gem includes a `hook` binary that allows interaction with the features of Hookmark.
|
6
6
|
|
7
|
-
v2.
|
7
|
+
v2.1.1
|
8
8
|
|
9
9
|
=== Global Options
|
10
10
|
=== --help
|
@@ -23,11 +23,11 @@ Browse hooks
|
|
23
23
|
|
24
24
|
Select a file to see its hooks, navigate through descendents
|
25
25
|
==== Command: <tt>clip|cp FILE_OR_URL</tt>
|
26
|
-
Copy
|
26
|
+
Copy Hookmark URL for file/url to clipboard
|
27
27
|
|
28
|
-
Creates a bookmark for the specified file or URL and copies its
|
28
|
+
Creates a bookmark for the specified file or URL and copies its Hookmark URL to the clipboard.
|
29
29
|
|
30
|
-
The copied
|
30
|
+
The copied Hookmark URL can be used to link to other files (use `hook link --paste FILE/URL`,
|
31
31
|
or to paste into another app as a link. Use the -m flag to copy a full Markdown link.
|
32
32
|
===== Options
|
33
33
|
===== -a|--app APP_NAME
|
@@ -78,10 +78,10 @@ Separate results with NULL separator, only applies with "paths" output for singl
|
|
78
78
|
|
79
79
|
|
80
80
|
==== Command: <tt>from APPLICATION_NAME</tt>
|
81
|
-
Get a
|
81
|
+
Get a Hookmark URL for the frontmost window of an app
|
82
82
|
|
83
83
|
Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark
|
84
|
-
for the active document, note, task, etc., returning a
|
84
|
+
for the active document, note, task, etc., returning a Hookmark URL.
|
85
85
|
|
86
86
|
Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.
|
87
87
|
===== Options
|
@@ -156,15 +156,15 @@ Generate a menu to select hook(s) for opening
|
|
156
156
|
This option is a shortcut to `hook select` and overrides any other arguments.
|
157
157
|
|
158
158
|
==== Command: <tt>open|gui FILE_OR_URL</tt>
|
159
|
-
Open the specified file or url in
|
159
|
+
Open the specified file or url in Hookmark GUI
|
160
160
|
|
161
|
-
Opens
|
161
|
+
Opens Hookmark on the specified file/URL for browsing and performing actions.
|
162
162
|
|
163
163
|
Exactly one argument (File/URL) required.
|
164
164
|
==== Command: <tt>percent STRING</tt>
|
165
165
|
Percent encode/decode a string
|
166
166
|
|
167
|
-
Use encode or decode to apply
|
167
|
+
Use encode or decode to apply Hookmark's url encoding to a string argument. Use '-' to read input from STDIN.
|
168
168
|
===== Commands
|
169
169
|
====== Command: <tt>decode STRING</tt>
|
170
170
|
decode a percent-encoded string
|
data/html/App.html
CHANGED
data/html/HookApp.html
CHANGED
@@ -61,7 +61,7 @@
|
|
61
61
|
<div id="parent-class-section" class="nav-section">
|
62
62
|
<h3>Parent</h3>
|
63
63
|
|
64
|
-
<p class="link">Object
|
64
|
+
<p class="link"><a href="Object.html">Object</a>
|
65
65
|
</div>
|
66
66
|
|
67
67
|
|
@@ -186,8 +186,8 @@
|
|
186
186
|
<div class="method-source-code" id="all_bookmarks-source">
|
187
187
|
<pre><span class="ruby-comment"># File lib/hook/hookapp.rb, line 142</span>
|
188
188
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">all_bookmarks</span>
|
189
|
-
<span class="ruby-
|
190
|
-
tell application "
|
189
|
+
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
190
|
+
tell application "#{HOOK_APP}"
|
191
191
|
set _marks to every bookmark
|
192
192
|
set _out to {}
|
193
193
|
repeat with _hook in _marks
|
@@ -224,7 +224,7 @@
|
|
224
224
|
|
225
225
|
<span class="ruby-keyword">begin</span>
|
226
226
|
<span class="ruby-identifier">mark</span> = <span class="ruby-node">`osascript <<'APPLESCRIPT'
|
227
|
-
tell application "
|
227
|
+
tell application "#{HOOK_APP}"
|
228
228
|
set _hook to make bookmark with data "#{url}"
|
229
229
|
if _hook is missing value
|
230
230
|
return ""
|
@@ -263,7 +263,7 @@
|
|
263
263
|
tell application "System Events" to set front_app to name of first application process whose frontmost is true
|
264
264
|
tell application "#{app}" to activate
|
265
265
|
delay 2
|
266
|
-
tell application "
|
266
|
+
tell application "#{HOOK_APP}"
|
267
267
|
set _hook to (bookmark from active window)
|
268
268
|
set _output to (name of _hook & "||" & address of _hook & "||" & path of _hook)
|
269
269
|
end tell
|
@@ -407,7 +407,7 @@
|
|
407
407
|
<span class="ruby-identifier">hooks</span> = <span class="ruby-identifier">get_hooks</span>(<span class="ruby-identifier">source</span>)
|
408
408
|
<span class="ruby-identifier">hooks</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hook</span><span class="ruby-operator">|</span>
|
409
409
|
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
410
|
-
tell application "
|
410
|
+
tell application "#{HOOK_APP}"
|
411
411
|
set _mark1 to make bookmark with data "#{hook[:url]}"
|
412
412
|
set _mark2 to make bookmark with data "#{target}"
|
413
413
|
hook _mark1 and _mark2
|
@@ -465,7 +465,7 @@
|
|
465
465
|
<pre><span class="ruby-comment"># File lib/hook/hookapp.rb, line 566</span>
|
466
466
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">decode</span>(<span class="ruby-identifier">string</span>)
|
467
467
|
<span class="ruby-identifier">result</span> = <span class="ruby-node">`osascript <<'APPLESCRIPT'
|
468
|
-
tell application "
|
468
|
+
tell application "#{HOOK_APP}"
|
469
469
|
percent decode "#{string.escape_quotes}"
|
470
470
|
end tell
|
471
471
|
APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>
|
@@ -498,7 +498,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>
|
|
498
498
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">res</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/^y/i</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">force</span>
|
499
499
|
<span class="ruby-identifier">get_hooks</span>(<span class="ruby-identifier">url</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hook</span><span class="ruby-operator">|</span>
|
500
500
|
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
501
|
-
tell application "
|
501
|
+
tell application "#{HOOK_APP}"
|
502
502
|
set _mark1 to make bookmark with data "#{hook[:url]}"
|
503
503
|
set _mark2 to make bookmark with data "#{url}"
|
504
504
|
unhook _mark1 and _mark2
|
@@ -543,7 +543,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>
|
|
543
543
|
<span class="ruby-identifier">source</span> = <span class="ruby-identifier">urls</span>[<span class="ruby-value">0</span>]
|
544
544
|
<span class="ruby-identifier">target</span> = <span class="ruby-identifier">urls</span>[<span class="ruby-value">1</span>]
|
545
545
|
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
546
|
-
tell application "
|
546
|
+
tell application "#{HOOK_APP}"
|
547
547
|
set _mark1 to make bookmark with data "#{source}"
|
548
548
|
set _mark2 to make bookmark with data "#{target}"
|
549
549
|
unhook _mark1 and _mark2
|
@@ -575,7 +575,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>
|
|
575
575
|
<pre><span class="ruby-comment"># File lib/hook/hookapp.rb, line 557</span>
|
576
576
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">encode</span>(<span class="ruby-identifier">string</span>)
|
577
577
|
<span class="ruby-identifier">result</span> = <span class="ruby-node">`osascript <<'APPLESCRIPT'
|
578
|
-
tell application "
|
578
|
+
tell application "#{HOOK_APP}"
|
579
579
|
percent encode "#{string.escape_quotes}"
|
580
580
|
end tell
|
581
581
|
APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/'/</span>,<span class="ruby-string">'%27'</span>)
|
@@ -627,7 +627,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby
|
|
627
627
|
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Invalid target: #{url}"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">url</span>
|
628
628
|
|
629
629
|
<span class="ruby-identifier">hooks</span> = <span class="ruby-node">`osascript <<'APPLESCRIPT'
|
630
|
-
tell application "
|
630
|
+
tell application "#{HOOK_APP}"
|
631
631
|
set _mark to make bookmark with data "#{url}"
|
632
632
|
if _mark is missing value
|
633
633
|
return ""
|
@@ -669,7 +669,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby
|
|
669
669
|
<span class="ruby-identifier">link_to</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-value">:valid_hook</span>).<span class="ruby-identifier">reject</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">url</span><span class="ruby-operator">|</span> <span class="ruby-identifier">url</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">source</span> }
|
670
670
|
<span class="ruby-identifier">link_to</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">url</span><span class="ruby-operator">|</span>
|
671
671
|
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
672
|
-
tell application "
|
672
|
+
tell application "#{HOOK_APP}"
|
673
673
|
set _mark1 to make bookmark with data "#{source}"
|
674
674
|
set _mark2 to make bookmark with data "#{url}"
|
675
675
|
hook _mark1 and _mark2
|
@@ -709,7 +709,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby
|
|
709
709
|
|
710
710
|
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Linking #{file} and #{target}..."</span>
|
711
711
|
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
712
|
-
tell application "
|
712
|
+
tell application "#{HOOK_APP}"
|
713
713
|
set _mark1 to make bookmark with data "#{file}"
|
714
714
|
set _mark2 to make bookmark with data "#{target}"
|
715
715
|
hook _mark1 and _mark2
|
@@ -802,7 +802,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby
|
|
802
802
|
<pre><span class="ruby-comment"># File lib/hook/hookapp.rb, line 317</span>
|
803
803
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">open_gui</span>(<span class="ruby-identifier">url</span>)
|
804
804
|
<span class="ruby-identifier">result</span> = <span class="ruby-node">`osascript <<'APPLESCRIPT'
|
805
|
-
tell application "
|
805
|
+
tell application "#{HOOK_APP}"
|
806
806
|
set _mark to make bookmark with data "#{url.valid_hook}"
|
807
807
|
if _mark is missing value
|
808
808
|
return "Failed to create bookmark for #{url}"
|
@@ -954,7 +954,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby
|
|
954
954
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">search_name</span>(<span class="ruby-identifier">search</span>)
|
955
955
|
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
956
956
|
set searchString to "#{search.strip}"
|
957
|
-
tell application "
|
957
|
+
tell application "#{HOOK_APP}"
|
958
958
|
set _marks to every bookmark whose name contains searchString
|
959
959
|
set _out to {}
|
960
960
|
repeat with _hook in _marks
|
@@ -988,7 +988,7 @@ APPLESCRIPT`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby
|
|
988
988
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">search_path_or_address</span>(<span class="ruby-identifier">search</span>)
|
989
989
|
<span class="ruby-node">`osascript <<'APPLESCRIPT'
|
990
990
|
set searchString to "#{search.strip}"
|
991
|
-
tell application "
|
991
|
+
tell application "#{HOOK_APP}"
|
992
992
|
set _marks to every bookmark whose path contains searchString or address contains searchString
|
993
993
|
set _out to {}
|
994
994
|
repeat with _hook in _marks
|
data/html/Object.html
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Object - hookapp</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">BasicObject
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</div>
|
71
|
+
</nav>
|
72
|
+
|
73
|
+
<main role="main" aria-labelledby="class-Object">
|
74
|
+
<h1 id="class-Object" class="class">
|
75
|
+
class Object
|
76
|
+
</h1>
|
77
|
+
|
78
|
+
<section class="description">
|
79
|
+
|
80
|
+
</section>
|
81
|
+
|
82
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
83
|
+
|
84
|
+
|
85
|
+
<section class="constants-list">
|
86
|
+
<header>
|
87
|
+
<h3>Constants</h3>
|
88
|
+
</header>
|
89
|
+
<dl>
|
90
|
+
<dt id="HOOK_APP">HOOK_APP
|
91
|
+
<dd>
|
92
|
+
</dl>
|
93
|
+
</section>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
</section>
|
98
|
+
</main>
|
99
|
+
|
100
|
+
|
101
|
+
<footer id="validator-badges" role="contentinfo">
|
102
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
103
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.3.
|
104
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
105
|
+
</footer>
|
106
|
+
|
data/html/README_rdoc.html
CHANGED
@@ -59,7 +59,7 @@
|
|
59
59
|
|
60
60
|
<ul class="link-list" role="directory">
|
61
61
|
<li><a href="#label-hookapp">hookapp</a>
|
62
|
-
<li><a href="#label-hook+-+CLI+interface+for+
|
62
|
+
<li><a href="#label-hook+-+CLI+interface+for+Hookmark+-28macOS-29">hook - CLI interface for Hookmark (macOS)</a>
|
63
63
|
<li><a href="#label-Global+Options">Global Options</a>
|
64
64
|
<li><a href="#label--help">–help</a>
|
65
65
|
<li><a href="#label--version">–version</a>
|
@@ -125,15 +125,15 @@
|
|
125
125
|
|
126
126
|
<h1 id="label-hookapp">hookapp<span><a href="#label-hookapp">¶</a> <a href="#top">↑</a></span></h1>
|
127
127
|
|
128
|
-
<p>A CLI for
|
128
|
+
<p>A CLI for Hookmark on macOS.</p>
|
129
129
|
|
130
|
-
<h2 id="label-hook+-+CLI+interface+for+
|
130
|
+
<h2 id="label-hook+-+CLI+interface+for+Hookmark+-28macOS-29">hook - CLI interface for Hookmark (macOS)<span><a href="#label-hook+-+CLI+interface+for+Hookmark+-28macOS-29">¶</a> <a href="#top">↑</a></span></h2>
|
131
131
|
|
132
|
-
<p>
|
132
|
+
<p>Hookmark is a productivity tool for macOS <<a href="https://hookproductivity.com">hookproductivity.com</a>/>.</p>
|
133
133
|
|
134
|
-
<p>This gem includes a `hook` binary that allows interaction with the features of
|
134
|
+
<p>This gem includes a `hook` binary that allows interaction with the features of Hookmark.</p>
|
135
135
|
|
136
|
-
<p>v2.
|
136
|
+
<p>v2.1.1</p>
|
137
137
|
|
138
138
|
<h3 id="label-Global+Options">Global Options<span><a href="#label-Global+Options">¶</a> <a href="#top">↑</a></span></h3>
|
139
139
|
|
@@ -155,11 +155,11 @@
|
|
155
155
|
|
156
156
|
<h4 id="label-Command-3A+clip-7Ccp++FILE_OR_URL">Command: <code>clip|cp FILE_OR_URL</code><span><a href="#label-Command-3A+clip-7Ccp++FILE_OR_URL">¶</a> <a href="#top">↑</a></span></h4>
|
157
157
|
|
158
|
-
<p>Copy
|
158
|
+
<p>Copy Hookmark URL for file/url to clipboard</p>
|
159
159
|
|
160
|
-
<p>Creates a bookmark for the specified file or URL and copies its
|
160
|
+
<p>Creates a bookmark for the specified file or URL and copies its Hookmark URL to the clipboard.</p>
|
161
161
|
|
162
|
-
<p>The copied
|
162
|
+
<p>The copied Hookmark URL can be used to link to other files (use `hook link –paste FILE/URL`, or to paste into another app as a link. Use the -m flag to copy a full Markdown link.</p>
|
163
163
|
|
164
164
|
<h5 id="label-Options">Options<span><a href="#label-Options">¶</a> <a href="#top">↑</a></span></h5>
|
165
165
|
|
@@ -215,9 +215,9 @@
|
|
215
215
|
|
216
216
|
<h4 id="label-Command-3A+from++APPLICATION_NAME">Command: <code>from APPLICATION_NAME</code><span><a href="#label-Command-3A+from++APPLICATION_NAME">¶</a> <a href="#top">↑</a></span></h4>
|
217
217
|
|
218
|
-
<p>Get a
|
218
|
+
<p>Get a Hookmark URL for the frontmost window of an app</p>
|
219
219
|
|
220
|
-
<p>Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark for the active document, note, task, etc., returning a
|
220
|
+
<p>Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark for the active document, note, task, etc., returning a Hookmark URL.</p>
|
221
221
|
|
222
222
|
<p>Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.</p>
|
223
223
|
|
@@ -295,9 +295,9 @@
|
|
295
295
|
|
296
296
|
<h4 id="label-Command-3A+open-7Cgui++FILE_OR_URL">Command: <code>open|gui FILE_OR_URL</code><span><a href="#label-Command-3A+open-7Cgui++FILE_OR_URL">¶</a> <a href="#top">↑</a></span></h4>
|
297
297
|
|
298
|
-
<p>Open the specified file or url in
|
298
|
+
<p>Open the specified file or url in Hookmark GUI</p>
|
299
299
|
|
300
|
-
<p>Opens
|
300
|
+
<p>Opens Hookmark on the specified file/URL for browsing and performing actions.</p>
|
301
301
|
|
302
302
|
<p>Exactly one argument (File/URL) required.</p>
|
303
303
|
|
@@ -305,7 +305,7 @@
|
|
305
305
|
|
306
306
|
<p>Percent encode/decode a string</p>
|
307
307
|
|
308
|
-
<p>Use encode or decode to apply
|
308
|
+
<p>Use encode or decode to apply Hookmark's url encoding to a string argument. Use '-' to read input from STDIN.</p>
|
309
309
|
|
310
310
|
<h5 id="label-Commands">Commands<span><a href="#label-Commands">¶</a> <a href="#top">↑</a></span></h5>
|
311
311
|
|
data/html/String.html
CHANGED
data/html/created.rid
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
|
2
|
-
README.rdoc
|
3
|
-
lib/hook.rb Thu,
|
4
|
-
lib/hook/hookapp.rb
|
1
|
+
Fri, 11 Nov 2022 09:56:24 -0600
|
2
|
+
README.rdoc Fri, 11 Nov 2022 09:52:46 -0600
|
3
|
+
lib/hook.rb Thu, 10 Nov 2022 09:16:41 -0600
|
4
|
+
lib/hook/hookapp.rb Thu, 10 Nov 2022 09:18:33 -0600
|
5
5
|
lib/hook/hooker.rb Sun, 31 Oct 2021 07:54:46 -0500
|
6
6
|
lib/hook/markdown_document_listener.rb Sun, 26 Sep 2021 07:45:59 -0500
|
7
7
|
lib/hook/prompt.rb Tue, 23 Aug 2022 06:17:15 -0500
|
8
8
|
lib/hook/string.rb Sun, 31 Oct 2021 07:03:15 -0500
|
9
|
-
lib/hook/version.rb
|
10
|
-
bin/hook
|
9
|
+
lib/hook/version.rb Fri, 11 Nov 2022 09:49:16 -0600
|
10
|
+
bin/hook Fri, 11 Nov 2022 09:48:53 -0600
|
data/html/index.html
CHANGED
@@ -79,6 +79,7 @@
|
|
79
79
|
<li><a href="./Hook/PromptSTD.html">Hook::PromptSTD</a>
|
80
80
|
<li><a href="./HookApp.html">HookApp</a>
|
81
81
|
<li><a href="./Hooker.html">Hooker</a>
|
82
|
+
<li><a href="./Object.html">Object</a>
|
82
83
|
<li><a href="./String.html">String</a>
|
83
84
|
</ul>
|
84
85
|
</div>
|
@@ -91,15 +92,15 @@
|
|
91
92
|
|
92
93
|
<h1 id="label-hookapp">hookapp<span><a href="#label-hookapp">¶</a> <a href="#top">↑</a></span></h1>
|
93
94
|
|
94
|
-
<p>A CLI for
|
95
|
+
<p>A CLI for Hookmark on macOS.</p>
|
95
96
|
|
96
|
-
<h2 id="label-hook+-+CLI+interface+for+
|
97
|
+
<h2 id="label-hook+-+CLI+interface+for+Hookmark+-28macOS-29">hook - CLI interface for Hookmark (macOS)<span><a href="#label-hook+-+CLI+interface+for+Hookmark+-28macOS-29">¶</a> <a href="#top">↑</a></span></h2>
|
97
98
|
|
98
|
-
<p>
|
99
|
+
<p>Hookmark is a productivity tool for macOS <<a href="https://hookproductivity.com">hookproductivity.com</a>/>.</p>
|
99
100
|
|
100
|
-
<p>This gem includes a `hook` binary that allows interaction with the features of
|
101
|
+
<p>This gem includes a `hook` binary that allows interaction with the features of Hookmark.</p>
|
101
102
|
|
102
|
-
<p>v2.
|
103
|
+
<p>v2.1.1</p>
|
103
104
|
|
104
105
|
<h3 id="label-Global+Options">Global Options<span><a href="#label-Global+Options">¶</a> <a href="#top">↑</a></span></h3>
|
105
106
|
|
@@ -121,11 +122,11 @@
|
|
121
122
|
|
122
123
|
<h4 id="label-Command-3A+clip-7Ccp++FILE_OR_URL">Command: <code>clip|cp FILE_OR_URL</code><span><a href="#label-Command-3A+clip-7Ccp++FILE_OR_URL">¶</a> <a href="#top">↑</a></span></h4>
|
123
124
|
|
124
|
-
<p>Copy
|
125
|
+
<p>Copy Hookmark URL for file/url to clipboard</p>
|
125
126
|
|
126
|
-
<p>Creates a bookmark for the specified file or URL and copies its
|
127
|
+
<p>Creates a bookmark for the specified file or URL and copies its Hookmark URL to the clipboard.</p>
|
127
128
|
|
128
|
-
<p>The copied
|
129
|
+
<p>The copied Hookmark URL can be used to link to other files (use `hook link –paste FILE/URL`, or to paste into another app as a link. Use the -m flag to copy a full Markdown link.</p>
|
129
130
|
|
130
131
|
<h5 id="label-Options">Options<span><a href="#label-Options">¶</a> <a href="#top">↑</a></span></h5>
|
131
132
|
|
@@ -181,9 +182,9 @@
|
|
181
182
|
|
182
183
|
<h4 id="label-Command-3A+from++APPLICATION_NAME">Command: <code>from APPLICATION_NAME</code><span><a href="#label-Command-3A+from++APPLICATION_NAME">¶</a> <a href="#top">↑</a></span></h4>
|
183
184
|
|
184
|
-
<p>Get a
|
185
|
+
<p>Get a Hookmark URL for the frontmost window of an app</p>
|
185
186
|
|
186
|
-
<p>Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark for the active document, note, task, etc., returning a
|
187
|
+
<p>Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark for the active document, note, task, etc., returning a Hookmark URL.</p>
|
187
188
|
|
188
189
|
<p>Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.</p>
|
189
190
|
|
@@ -261,9 +262,9 @@
|
|
261
262
|
|
262
263
|
<h4 id="label-Command-3A+open-7Cgui++FILE_OR_URL">Command: <code>open|gui FILE_OR_URL</code><span><a href="#label-Command-3A+open-7Cgui++FILE_OR_URL">¶</a> <a href="#top">↑</a></span></h4>
|
263
264
|
|
264
|
-
<p>Open the specified file or url in
|
265
|
+
<p>Open the specified file or url in Hookmark GUI</p>
|
265
266
|
|
266
|
-
<p>Opens
|
267
|
+
<p>Opens Hookmark on the specified file/URL for browsing and performing actions.</p>
|
267
268
|
|
268
269
|
<p>Exactly one argument (File/URL) required.</p>
|
269
270
|
|
@@ -271,7 +272,7 @@
|
|
271
272
|
|
272
273
|
<p>Percent encode/decode a string</p>
|
273
274
|
|
274
|
-
<p>Use encode or decode to apply
|
275
|
+
<p>Use encode or decode to apply Hookmark's url encoding to a string argument. Use '-' to read input from STDIN.</p>
|
275
276
|
|
276
277
|
<h5 id="label-Commands">Commands<span><a href="#label-Commands">¶</a> <a href="#top">↑</a></span></h5>
|
277
278
|
|
data/html/js/search_index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var search_data = {"index":{"searchIndex":["app","gli","commands","doc","markdowndocumentlistener","hook","prompt","promptfzf","promptstd","hookapp","hooker","string","act_on()","all_bookmarks()","beginning()","bookmark_for()","bookmark_from_app()","browse_bookmarks()","browse_linked()","cap()","cap!()","clear_screen()","clip()","clip_bookmark()","clone_hooks()","command()","commands()","copy_bookmark()","decode()","default_command()","delete_all_hooks()","delete_hooks()","encode()","end_command()","end_commands()","end_options()","ending()","escape_quotes()","flag()","format_regex()","fzf()","get_hooks()","install_fzf()","link_all()","link_files()","linked_bookmarks()","new()","new()","nil_if_missing()","open_gui()","open_linked()","options()","output_array()","program_desc()","program_long_desc()","restore_std()","search_bookmarks()","search_name()","search_path_or_address()","select_hook()","silence_std()","split_hook()","split_hooks()","switch()","uninstall_fzf()","valid_hook()","valid_hook!()","validate_format()","version()","which_fzf()","readme"],"longSearchIndex":["app","gli","gli::commands","gli::commands::doc","gli::commands::markdowndocumentlistener","hook","hook::prompt","hook::promptfzf","hook::promptstd","hookapp","hooker","string","hookapp#act_on()","hookapp#all_bookmarks()","gli::commands::markdowndocumentlistener#beginning()","hookapp#bookmark_for()","hookapp#bookmark_from_app()","hookapp#browse_bookmarks()","hookapp#browse_linked()","string#cap()","string#cap!()","hook::promptstd#clear_screen()","string#clip()","hookapp#clip_bookmark()","hookapp#clone_hooks()","gli::commands::markdowndocumentlistener#command()","gli::commands::markdowndocumentlistener#commands()","hookapp#copy_bookmark()","hookapp#decode()","gli::commands::markdowndocumentlistener#default_command()","hookapp#delete_all_hooks()","hookapp#delete_hooks()","hookapp#encode()","gli::commands::markdowndocumentlistener#end_command()","gli::commands::markdowndocumentlistener#end_commands()","gli::commands::markdowndocumentlistener#end_options()","gli::commands::markdowndocumentlistener#ending()","string#escape_quotes()","gli::commands::markdowndocumentlistener#flag()","hookapp#format_regex()","hook::promptfzf#fzf()","hookapp#get_hooks()","hook::promptfzf#install_fzf()","hookapp#link_all()","hookapp#link_files()","hookapp#linked_bookmarks()","gli::commands::markdowndocumentlistener::new()","hooker::new()","string#nil_if_missing()","hookapp#open_gui()","hookapp#open_linked()","gli::commands::markdowndocumentlistener#options()","hookapp#output_array()","gli::commands::markdowndocumentlistener#program_desc()","gli::commands::markdowndocumentlistener#program_long_desc()","hook::promptstd#restore_std()","hookapp#search_bookmarks()","hookapp#search_name()","hookapp#search_path_or_address()","hookapp#select_hook()","hook::promptstd#silence_std()","string#split_hook()","string#split_hooks()","gli::commands::markdowndocumentlistener#switch()","hook::promptfzf#uninstall_fzf()","string#valid_hook()","string#valid_hook!()","hookapp#validate_format()","gli::commands::markdowndocumentlistener#version()","hook::promptfzf#which_fzf()",""],"info":[["App","","App.html","","<p>Main class for GLI app\n"],["GLI","","GLI.html","",""],["GLI::Commands","","GLI/Commands.html","",""],["GLI::Commands::Doc","","GLI/Commands/Doc.html","",""],["GLI::Commands::MarkdownDocumentListener","","GLI/Commands/MarkdownDocumentListener.html","","<p>DocumentListener class for GLI documentation generator\n"],["Hook","","Hook.html","",""],["Hook::Prompt","","Hook/Prompt.html","",""],["Hook::PromptFZF","","Hook/PromptFZF.html","","<p>Methods for working installing/using FuzzyFileFinder\n"],["Hook::PromptSTD","","Hook/PromptSTD.html","",""],["HookApp","","HookApp.html","","<p>Hook.app functions\n"],["Hooker","","Hooker.html","","<p>Hook.app CLI interface\n"],["String","","String.html","","<p>String helpers\n"],["act_on","HookApp","HookApp.html#method-i-act_on","(url)",""],["all_bookmarks","HookApp","HookApp.html#method-i-all_bookmarks","()","<p>Get all known bookmarks. Return array of bookmark hashes.\n"],["beginning","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-beginning","()",""],["bookmark_for","HookApp","HookApp.html#method-i-bookmark_for","(url)","<p>Get a Hook bookmark for file or URL. Return bookmark hash.\n"],["bookmark_from_app","HookApp","HookApp.html#method-i-bookmark_from_app","(app, opts)","<p>Get a bookmark from the foreground document of specified app.\n"],["browse_bookmarks","HookApp","HookApp.html#method-i-browse_bookmarks","(glob)",""],["browse_linked","HookApp","HookApp.html#method-i-browse_linked","(url)","<p>Select from a menu of available hooks and open using macOS `open`.\n"],["cap","String","String.html#method-i-cap","()","<p>Capitalize only if no uppercase\n"],["cap!","String","String.html#method-i-cap-21","()",""],["clear_screen","Hook::PromptSTD","Hook/PromptSTD.html#method-i-clear_screen","(msg = nil)","<p>Clear the terminal screen\n"],["clip","String","String.html#method-i-clip","()",""],["clip_bookmark","HookApp","HookApp.html#method-i-clip_bookmark","(url, opts)","<p>Create a bookmark for specified file/url and copy to the clipboard.\n"],["clone_hooks","HookApp","HookApp.html#method-i-clone_hooks","(args)","<p>Copy all hooks from source file to target file\n"],["command","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-command","(name, aliases, desc, long_desc, arg_name, arg_options)","<p>Gives you a command in the current context and creates a new context of this command\n"],["commands","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-commands","()",""],["copy_bookmark","HookApp","HookApp.html#method-i-copy_bookmark","(title, url, opts)","<p>Create a bookmark from specified title and url and copy to the clipboard.\n"],["decode","HookApp","HookApp.html#method-i-decode","(string)",""],["default_command","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-default_command","(name)","<p>Gives you the name of the current command in the current context\n"],["delete_all_hooks","HookApp","HookApp.html#method-i-delete_all_hooks","(url, force: false)","<p>Delete all hooked files/urls from target file\n"],["delete_hooks","HookApp","HookApp.html#method-i-delete_hooks","(args, opts)","<p>Delete hooks between two files/urls\n"],["encode","HookApp","HookApp.html#method-i-encode","(string)",""],["end_command","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-end_command","(_name)","<p>Ends a command, and “pops” you back up one context\n"],["end_commands","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-end_commands","()",""],["end_options","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-end_options","()",""],["ending","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-ending","()","<p>Called when processing has completed\n"],["escape_quotes","String","String.html#method-i-escape_quotes","()",""],["flag","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-flag","(name, aliases, desc, long_desc, default_value, arg_name, must_match, _type)","<p>Gives you a flag in the current context\n"],["format_regex","HookApp","HookApp.html#method-i-format_regex","(options)","<p>Create a single regex for validation of an array by first char or full match.\n"],["fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-fzf","()","<p>Get path to fzf binary, installing if needed\n<p>@return [String] Path to fzf binary\n"],["get_hooks","HookApp","HookApp.html#method-i-get_hooks","(url)","<p>Get bookmarks hooked to file or URL. Return array of bookmark hashes.\n"],["install_fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-install_fzf","(force: false)","<p>Install fzf on the current system. Installs to a subdirectory of the gem\n<p>@param force [Boolean] …\n"],["link_all","HookApp","HookApp.html#method-i-link_all","(args)","<p>Create bi-directional links between every file/url in the list of arguments\n"],["link_files","HookApp","HookApp.html#method-i-link_files","(args)","<p>Link 2 or more files/urls with bi-directional hooks.\n"],["linked_bookmarks","HookApp","HookApp.html#method-i-linked_bookmarks","(args, opts)","<p>Get a list of all hooks on a file/url.\n"],["new","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-c-new","(_global_options, _options, _arguments, app)",""],["new","Hooker","Hooker.html#method-c-new","()",""],["nil_if_missing","String","String.html#method-i-nil_if_missing","()",""],["open_gui","HookApp","HookApp.html#method-i-open_gui","(url)","<p>Open the Hook GUI for browsing/performing actions on a file or url\n"],["open_linked","HookApp","HookApp.html#method-i-open_linked","(url)","<p>Select from a menu of available hooks and open using macOS `open`.\n"],["options","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-options","()",""],["output_array","HookApp","HookApp.html#method-i-output_array","(hooks_arr, opts)","<p>Output an array of hooks in the given format.\n"],["program_desc","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-program_desc","(desc)","<p>Gives you the program description\n"],["program_long_desc","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-program_long_desc","(desc)",""],["restore_std","Hook::PromptSTD","Hook/PromptSTD.html#method-i-restore_std","()","<p>Restore silenced STDOUT and STDERR\n"],["search_bookmarks","HookApp","HookApp.html#method-i-search_bookmarks","(search, opts)","<p>Search bookmarks, using both names and addresses unless options contain “:names_only”. Return …\n"],["search_name","HookApp","HookApp.html#method-i-search_name","(search)","<p>Search boomark names/titles. Return array of bookmark hashes.\n"],["search_path_or_address","HookApp","HookApp.html#method-i-search_path_or_address","(search)","<p>Search bookmark paths and addresses. Return array of bookmark hashes.\n"],["select_hook","HookApp","HookApp.html#method-i-select_hook","(marks)","<p>Generate a menu of available hooks for selecting one or more hooks to operate on. Revamped to use `fzf`, …\n"],["silence_std","Hook::PromptSTD","Hook/PromptSTD.html#method-i-silence_std","(file = '/dev/null')","<p>Redirect STDOUT and STDERR to /dev/null or file\n<p>@param file [String] a file path to redirect to …\n"],["split_hook","String","String.html#method-i-split_hook","()",""],["split_hooks","String","String.html#method-i-split_hooks","()",""],["switch","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-switch","(name, aliases, desc, long_desc, negatable)","<p>Gives you a switch in the current context\n"],["uninstall_fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-uninstall_fzf","()","<p>Remove fzf binary\n"],["valid_hook","String","String.html#method-i-valid_hook","()",""],["valid_hook!","String","String.html#method-i-valid_hook-21","()",""],["validate_format","HookApp","HookApp.html#method-i-validate_format","(fmt, options)","<p>Check if format fully matches or matches the first character of available options. Return full valid …\n"],["version","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-version","(version)","<p>Gives you the program version\n"],["which_fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-which_fzf","()","<p>Return the path to the fzf binary\n<p>@return [String] Path to fzf\n"],["README","","README_rdoc.html","","<p>hookapp\n<p>A CLI for Hook.app on macOS.\n<p>hook - CLI interface for Hook.app (macOS)\n"]]}}
|
1
|
+
var search_data = {"index":{"searchIndex":["app","gli","commands","doc","markdowndocumentlistener","hook","prompt","promptfzf","promptstd","hookapp","hooker","object","string","act_on()","all_bookmarks()","beginning()","bookmark_for()","bookmark_from_app()","browse_bookmarks()","browse_linked()","cap()","cap!()","clear_screen()","clip()","clip_bookmark()","clone_hooks()","command()","commands()","copy_bookmark()","decode()","default_command()","delete_all_hooks()","delete_hooks()","encode()","end_command()","end_commands()","end_options()","ending()","escape_quotes()","flag()","format_regex()","fzf()","get_hooks()","install_fzf()","link_all()","link_files()","linked_bookmarks()","new()","new()","nil_if_missing()","open_gui()","open_linked()","options()","output_array()","program_desc()","program_long_desc()","restore_std()","search_bookmarks()","search_name()","search_path_or_address()","select_hook()","silence_std()","split_hook()","split_hooks()","switch()","uninstall_fzf()","valid_hook()","valid_hook!()","validate_format()","version()","which_fzf()","readme"],"longSearchIndex":["app","gli","gli::commands","gli::commands::doc","gli::commands::markdowndocumentlistener","hook","hook::prompt","hook::promptfzf","hook::promptstd","hookapp","hooker","object","string","hookapp#act_on()","hookapp#all_bookmarks()","gli::commands::markdowndocumentlistener#beginning()","hookapp#bookmark_for()","hookapp#bookmark_from_app()","hookapp#browse_bookmarks()","hookapp#browse_linked()","string#cap()","string#cap!()","hook::promptstd#clear_screen()","string#clip()","hookapp#clip_bookmark()","hookapp#clone_hooks()","gli::commands::markdowndocumentlistener#command()","gli::commands::markdowndocumentlistener#commands()","hookapp#copy_bookmark()","hookapp#decode()","gli::commands::markdowndocumentlistener#default_command()","hookapp#delete_all_hooks()","hookapp#delete_hooks()","hookapp#encode()","gli::commands::markdowndocumentlistener#end_command()","gli::commands::markdowndocumentlistener#end_commands()","gli::commands::markdowndocumentlistener#end_options()","gli::commands::markdowndocumentlistener#ending()","string#escape_quotes()","gli::commands::markdowndocumentlistener#flag()","hookapp#format_regex()","hook::promptfzf#fzf()","hookapp#get_hooks()","hook::promptfzf#install_fzf()","hookapp#link_all()","hookapp#link_files()","hookapp#linked_bookmarks()","gli::commands::markdowndocumentlistener::new()","hooker::new()","string#nil_if_missing()","hookapp#open_gui()","hookapp#open_linked()","gli::commands::markdowndocumentlistener#options()","hookapp#output_array()","gli::commands::markdowndocumentlistener#program_desc()","gli::commands::markdowndocumentlistener#program_long_desc()","hook::promptstd#restore_std()","hookapp#search_bookmarks()","hookapp#search_name()","hookapp#search_path_or_address()","hookapp#select_hook()","hook::promptstd#silence_std()","string#split_hook()","string#split_hooks()","gli::commands::markdowndocumentlistener#switch()","hook::promptfzf#uninstall_fzf()","string#valid_hook()","string#valid_hook!()","hookapp#validate_format()","gli::commands::markdowndocumentlistener#version()","hook::promptfzf#which_fzf()",""],"info":[["App","","App.html","","<p>Main class for GLI app\n"],["GLI","","GLI.html","",""],["GLI::Commands","","GLI/Commands.html","",""],["GLI::Commands::Doc","","GLI/Commands/Doc.html","",""],["GLI::Commands::MarkdownDocumentListener","","GLI/Commands/MarkdownDocumentListener.html","","<p>DocumentListener class for GLI documentation generator\n"],["Hook","","Hook.html","",""],["Hook::Prompt","","Hook/Prompt.html","",""],["Hook::PromptFZF","","Hook/PromptFZF.html","","<p>Methods for working installing/using FuzzyFileFinder\n"],["Hook::PromptSTD","","Hook/PromptSTD.html","",""],["HookApp","","HookApp.html","","<p>Hook.app functions\n"],["Hooker","","Hooker.html","","<p>Hook.app CLI interface\n"],["Object","","Object.html","",""],["String","","String.html","","<p>String helpers\n"],["act_on","HookApp","HookApp.html#method-i-act_on","(url)",""],["all_bookmarks","HookApp","HookApp.html#method-i-all_bookmarks","()","<p>Get all known bookmarks. Return array of bookmark hashes.\n"],["beginning","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-beginning","()",""],["bookmark_for","HookApp","HookApp.html#method-i-bookmark_for","(url)","<p>Get a Hook bookmark for file or URL. Return bookmark hash.\n"],["bookmark_from_app","HookApp","HookApp.html#method-i-bookmark_from_app","(app, opts)","<p>Get a bookmark from the foreground document of specified app.\n"],["browse_bookmarks","HookApp","HookApp.html#method-i-browse_bookmarks","(glob)",""],["browse_linked","HookApp","HookApp.html#method-i-browse_linked","(url)","<p>Select from a menu of available hooks and open using macOS `open`.\n"],["cap","String","String.html#method-i-cap","()","<p>Capitalize only if no uppercase\n"],["cap!","String","String.html#method-i-cap-21","()",""],["clear_screen","Hook::PromptSTD","Hook/PromptSTD.html#method-i-clear_screen","(msg = nil)","<p>Clear the terminal screen\n"],["clip","String","String.html#method-i-clip","()",""],["clip_bookmark","HookApp","HookApp.html#method-i-clip_bookmark","(url, opts)","<p>Create a bookmark for specified file/url and copy to the clipboard.\n"],["clone_hooks","HookApp","HookApp.html#method-i-clone_hooks","(args)","<p>Copy all hooks from source file to target file\n"],["command","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-command","(name, aliases, desc, long_desc, arg_name, arg_options)","<p>Gives you a command in the current context and creates a new context of this command\n"],["commands","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-commands","()",""],["copy_bookmark","HookApp","HookApp.html#method-i-copy_bookmark","(title, url, opts)","<p>Create a bookmark from specified title and url and copy to the clipboard.\n"],["decode","HookApp","HookApp.html#method-i-decode","(string)",""],["default_command","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-default_command","(name)","<p>Gives you the name of the current command in the current context\n"],["delete_all_hooks","HookApp","HookApp.html#method-i-delete_all_hooks","(url, force: false)","<p>Delete all hooked files/urls from target file\n"],["delete_hooks","HookApp","HookApp.html#method-i-delete_hooks","(args, opts)","<p>Delete hooks between two files/urls\n"],["encode","HookApp","HookApp.html#method-i-encode","(string)",""],["end_command","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-end_command","(_name)","<p>Ends a command, and “pops” you back up one context\n"],["end_commands","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-end_commands","()",""],["end_options","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-end_options","()",""],["ending","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-ending","()","<p>Called when processing has completed\n"],["escape_quotes","String","String.html#method-i-escape_quotes","()",""],["flag","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-flag","(name, aliases, desc, long_desc, default_value, arg_name, must_match, _type)","<p>Gives you a flag in the current context\n"],["format_regex","HookApp","HookApp.html#method-i-format_regex","(options)","<p>Create a single regex for validation of an array by first char or full match.\n"],["fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-fzf","()","<p>Get path to fzf binary, installing if needed\n<p>@return [String] Path to fzf binary\n"],["get_hooks","HookApp","HookApp.html#method-i-get_hooks","(url)","<p>Get bookmarks hooked to file or URL. Return array of bookmark hashes.\n"],["install_fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-install_fzf","(force: false)","<p>Install fzf on the current system. Installs to a subdirectory of the gem\n<p>@param force [Boolean] …\n"],["link_all","HookApp","HookApp.html#method-i-link_all","(args)","<p>Create bi-directional links between every file/url in the list of arguments\n"],["link_files","HookApp","HookApp.html#method-i-link_files","(args)","<p>Link 2 or more files/urls with bi-directional hooks.\n"],["linked_bookmarks","HookApp","HookApp.html#method-i-linked_bookmarks","(args, opts)","<p>Get a list of all hooks on a file/url.\n"],["new","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-c-new","(_global_options, _options, _arguments, app)",""],["new","Hooker","Hooker.html#method-c-new","()",""],["nil_if_missing","String","String.html#method-i-nil_if_missing","()",""],["open_gui","HookApp","HookApp.html#method-i-open_gui","(url)","<p>Open the Hook GUI for browsing/performing actions on a file or url\n"],["open_linked","HookApp","HookApp.html#method-i-open_linked","(url)","<p>Select from a menu of available hooks and open using macOS `open`.\n"],["options","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-options","()",""],["output_array","HookApp","HookApp.html#method-i-output_array","(hooks_arr, opts)","<p>Output an array of hooks in the given format.\n"],["program_desc","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-program_desc","(desc)","<p>Gives you the program description\n"],["program_long_desc","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-program_long_desc","(desc)",""],["restore_std","Hook::PromptSTD","Hook/PromptSTD.html#method-i-restore_std","()","<p>Restore silenced STDOUT and STDERR\n"],["search_bookmarks","HookApp","HookApp.html#method-i-search_bookmarks","(search, opts)","<p>Search bookmarks, using both names and addresses unless options contain “:names_only”. Return …\n"],["search_name","HookApp","HookApp.html#method-i-search_name","(search)","<p>Search boomark names/titles. Return array of bookmark hashes.\n"],["search_path_or_address","HookApp","HookApp.html#method-i-search_path_or_address","(search)","<p>Search bookmark paths and addresses. Return array of bookmark hashes.\n"],["select_hook","HookApp","HookApp.html#method-i-select_hook","(marks)","<p>Generate a menu of available hooks for selecting one or more hooks to operate on. Revamped to use `fzf`, …\n"],["silence_std","Hook::PromptSTD","Hook/PromptSTD.html#method-i-silence_std","(file = '/dev/null')","<p>Redirect STDOUT and STDERR to /dev/null or file\n<p>@param file [String] a file path to redirect to …\n"],["split_hook","String","String.html#method-i-split_hook","()",""],["split_hooks","String","String.html#method-i-split_hooks","()",""],["switch","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-switch","(name, aliases, desc, long_desc, negatable)","<p>Gives you a switch in the current context\n"],["uninstall_fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-uninstall_fzf","()","<p>Remove fzf binary\n"],["valid_hook","String","String.html#method-i-valid_hook","()",""],["valid_hook!","String","String.html#method-i-valid_hook-21","()",""],["validate_format","HookApp","HookApp.html#method-i-validate_format","(fmt, options)","<p>Check if format fully matches or matches the first character of available options. Return full valid …\n"],["version","GLI::Commands::MarkdownDocumentListener","GLI/Commands/MarkdownDocumentListener.html#method-i-version","(version)","<p>Gives you the program version\n"],["which_fzf","Hook::PromptFZF","Hook/PromptFZF.html#method-i-which_fzf","()","<p>Return the path to the fzf binary\n<p>@return [String] Path to fzf\n"],["README","","README_rdoc.html","","<p>hookapp\n<p>A CLI for Hookmark on macOS.\n<p>hook - CLI interface for Hookmark (macOS)\n"]]}}
|
data/html/js/search_index.js.gz
CHANGED
Binary file
|
data/html/table_of_contents.html
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
<ul>
|
34
34
|
<li><a href="README_rdoc.html#label-hookapp">hookapp</a>
|
35
|
-
<li><a href="README_rdoc.html#label-hook+-+CLI+interface+for+
|
35
|
+
<li><a href="README_rdoc.html#label-hook+-+CLI+interface+for+Hookmark+-28macOS-29">hook - CLI interface for Hookmark (macOS)</a>
|
36
36
|
<li><a href="README_rdoc.html#label-Global+Options">Global Options</a>
|
37
37
|
<li><a href="README_rdoc.html#label--help">–help</a>
|
38
38
|
<li><a href="README_rdoc.html#label--version">–version</a>
|
@@ -116,6 +116,9 @@
|
|
116
116
|
<li class="class">
|
117
117
|
<a href="Hooker.html">Hooker</a>
|
118
118
|
</li>
|
119
|
+
<li class="class">
|
120
|
+
<a href="Object.html">Object</a>
|
121
|
+
</li>
|
119
122
|
<li class="class">
|
120
123
|
<a href="String.html">String</a>
|
121
124
|
</li>
|
data/lib/hook/hookapp.rb
CHANGED
@@ -37,7 +37,7 @@ class HookApp
|
|
37
37
|
|
38
38
|
begin
|
39
39
|
mark = `osascript <<'APPLESCRIPT'
|
40
|
-
tell application "
|
40
|
+
tell application "#{HOOK_APP}"
|
41
41
|
set _hook to make bookmark with data "#{url}"
|
42
42
|
if _hook is missing value
|
43
43
|
return ""
|
@@ -60,7 +60,7 @@ class HookApp
|
|
60
60
|
raise "Invalid target: #{url}" unless url
|
61
61
|
|
62
62
|
hooks = `osascript <<'APPLESCRIPT'
|
63
|
-
tell application "
|
63
|
+
tell application "#{HOOK_APP}"
|
64
64
|
set _mark to make bookmark with data "#{url}"
|
65
65
|
if _mark is missing value
|
66
66
|
return ""
|
@@ -85,7 +85,7 @@ class HookApp
|
|
85
85
|
tell application "System Events" to set front_app to name of first application process whose frontmost is true
|
86
86
|
tell application "#{app}" to activate
|
87
87
|
delay 2
|
88
|
-
tell application "
|
88
|
+
tell application "#{HOOK_APP}"
|
89
89
|
set _hook to (bookmark from active window)
|
90
90
|
set _output to (name of _hook & "||" & address of _hook & "||" & path of _hook)
|
91
91
|
end tell
|
@@ -106,7 +106,7 @@ class HookApp
|
|
106
106
|
def search_name(search)
|
107
107
|
`osascript <<'APPLESCRIPT'
|
108
108
|
set searchString to "#{search.strip}"
|
109
|
-
tell application "
|
109
|
+
tell application "#{HOOK_APP}"
|
110
110
|
set _marks to every bookmark whose name contains searchString
|
111
111
|
set _out to {}
|
112
112
|
repeat with _hook in _marks
|
@@ -124,7 +124,7 @@ class HookApp
|
|
124
124
|
def search_path_or_address(search)
|
125
125
|
`osascript <<'APPLESCRIPT'
|
126
126
|
set searchString to "#{search.strip}"
|
127
|
-
tell application "
|
127
|
+
tell application "#{HOOK_APP}"
|
128
128
|
set _marks to every bookmark whose path contains searchString or address contains searchString
|
129
129
|
set _out to {}
|
130
130
|
repeat with _hook in _marks
|
@@ -141,7 +141,7 @@ class HookApp
|
|
141
141
|
# Get all known bookmarks. Return array of bookmark hashes.
|
142
142
|
def all_bookmarks
|
143
143
|
`osascript <<'APPLESCRIPT'
|
144
|
-
tell application "
|
144
|
+
tell application "#{HOOK_APP}"
|
145
145
|
set _marks to every bookmark
|
146
146
|
set _out to {}
|
147
147
|
repeat with _hook in _marks
|
@@ -316,7 +316,7 @@ class HookApp
|
|
316
316
|
# Open the Hook GUI for browsing/performing actions on a file or url
|
317
317
|
def open_gui(url)
|
318
318
|
result = `osascript <<'APPLESCRIPT'
|
319
|
-
tell application "
|
319
|
+
tell application "#{HOOK_APP}"
|
320
320
|
set _mark to make bookmark with data "#{url.valid_hook}"
|
321
321
|
if _mark is missing value
|
322
322
|
return "Failed to create bookmark for #{url}"
|
@@ -365,7 +365,7 @@ class HookApp
|
|
365
365
|
|
366
366
|
puts "Linking #{file} and #{target}..."
|
367
367
|
`osascript <<'APPLESCRIPT'
|
368
|
-
tell application "
|
368
|
+
tell application "#{HOOK_APP}"
|
369
369
|
set _mark1 to make bookmark with data "#{file}"
|
370
370
|
set _mark2 to make bookmark with data "#{target}"
|
371
371
|
hook _mark1 and _mark2
|
@@ -385,7 +385,7 @@ class HookApp
|
|
385
385
|
hooks = get_hooks(source)
|
386
386
|
hooks.each do |hook|
|
387
387
|
`osascript <<'APPLESCRIPT'
|
388
|
-
tell application "
|
388
|
+
tell application "#{HOOK_APP}"
|
389
389
|
set _mark1 to make bookmark with data "#{hook[:url]}"
|
390
390
|
set _mark2 to make bookmark with data "#{target}"
|
391
391
|
hook _mark1 and _mark2
|
@@ -409,7 +409,7 @@ class HookApp
|
|
409
409
|
if res =~ /^y/i || force
|
410
410
|
get_hooks(url).each do |hook|
|
411
411
|
`osascript <<'APPLESCRIPT'
|
412
|
-
tell application "
|
412
|
+
tell application "#{HOOK_APP}"
|
413
413
|
set _mark1 to make bookmark with data "#{hook[:url]}"
|
414
414
|
set _mark2 to make bookmark with data "#{url}"
|
415
415
|
unhook _mark1 and _mark2
|
@@ -438,7 +438,7 @@ class HookApp
|
|
438
438
|
source = urls[0]
|
439
439
|
target = urls[1]
|
440
440
|
`osascript <<'APPLESCRIPT'
|
441
|
-
tell application "
|
441
|
+
tell application "#{HOOK_APP}"
|
442
442
|
set _mark1 to make bookmark with data "#{source}"
|
443
443
|
set _mark2 to make bookmark with data "#{target}"
|
444
444
|
unhook _mark1 and _mark2
|
@@ -458,7 +458,7 @@ class HookApp
|
|
458
458
|
link_to = args.dup.map(&:valid_hook).reject { |url| url == source }
|
459
459
|
link_to.each do |url|
|
460
460
|
`osascript <<'APPLESCRIPT'
|
461
|
-
tell application "
|
461
|
+
tell application "#{HOOK_APP}"
|
462
462
|
set _mark1 to make bookmark with data "#{source}"
|
463
463
|
set _mark2 to make bookmark with data "#{url}"
|
464
464
|
hook _mark1 and _mark2
|
@@ -556,7 +556,7 @@ class HookApp
|
|
556
556
|
|
557
557
|
def encode(string)
|
558
558
|
result = `osascript <<'APPLESCRIPT'
|
559
|
-
tell application "
|
559
|
+
tell application "#{HOOK_APP}"
|
560
560
|
percent encode "#{string.escape_quotes}"
|
561
561
|
end tell
|
562
562
|
APPLESCRIPT`.strip.gsub(/'/,'%27')
|
@@ -565,7 +565,7 @@ APPLESCRIPT`.strip.gsub(/'/,'%27')
|
|
565
565
|
|
566
566
|
def decode(string)
|
567
567
|
result = `osascript <<'APPLESCRIPT'
|
568
|
-
tell application "
|
568
|
+
tell application "#{HOOK_APP}"
|
569
569
|
percent decode "#{string.escape_quotes}"
|
570
570
|
end tell
|
571
571
|
APPLESCRIPT`.strip
|
data/lib/hook/version.rb
CHANGED
data/lib/hook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hookapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
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-
|
11
|
+
date: 2022-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- html/Hook/PromptSTD.html
|
125
125
|
- html/HookApp.html
|
126
126
|
- html/Hooker.html
|
127
|
+
- html/Object.html
|
127
128
|
- html/README_rdoc.html
|
128
129
|
- html/String.html
|
129
130
|
- html/created.rid
|