hookapp 0.0.7 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/LICENSE.md +31 -0
- data/OVERVIEW.md +80 -0
- data/README.md +282 -21
- data/Rakefile +1 -1
- data/bin/hook +127 -10
- data/buildnotes.md +29 -0
- data/hook.rdoc +63 -4
- data/hookapp.gemspec +9 -8
- data/html/App.html +119 -0
- data/html/GLI.html +99 -0
- data/html/GLI/Commands.html +99 -0
- data/html/GLI/Commands/Doc.html +99 -0
- data/html/GLI/Commands/MarkdownDocumentListener.html +717 -0
- data/html/Hook.html +113 -0
- data/html/HookApp.html +1222 -0
- data/html/Hooker.html +119 -0
- data/html/README_rdoc.html +328 -0
- data/html/String.html +427 -0
- data/html/created.rid +9 -0
- data/html/css/fonts.css +167 -0
- data/html/css/rdoc.css +619 -0
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +308 -0
- data/html/js/darkfish.js +84 -0
- data/html/js/navigation.js +105 -0
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +110 -0
- data/html/js/search_index.js +1 -0
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +229 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +409 -0
- data/lib/completion/hook_completion.bash +22 -0
- data/lib/completion/hook_completion.fish +31 -0
- data/lib/completion/hook_completion.zsh +22 -0
- data/lib/helpers/fuzzyfilefinder +0 -0
- data/lib/hook.rb +5 -1
- data/lib/hook/hookapp.rb +489 -0
- data/lib/hook/hooker.rb +1 -344
- data/lib/hook/markdown_document_listener.rb +164 -0
- data/lib/hook/string.rb +60 -0
- data/lib/hook/version.rb +3 -1
- metadata +76 -12
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ require 'cucumber/rake/task'
|
|
7
7
|
Rake::RDocTask.new do |rd|
|
8
8
|
rd.main = "README.rdoc"
|
9
9
|
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
|
10
|
-
rd.title = '
|
10
|
+
rd.title = 'hookapp'
|
11
11
|
end
|
12
12
|
|
13
13
|
spec = eval(File.read('hookapp.gemspec'))
|
data/bin/hook
CHANGED
@@ -9,6 +9,10 @@ class App
|
|
9
9
|
extend GLI::App
|
10
10
|
|
11
11
|
program_desc 'CLI interface for Hook.app (macOS)'
|
12
|
+
program_long_desc 'Hook.app is a productivity tool for macOS <https://hookproductivity.com/>. This gem includes a `hook` binary that allows interaction with the features of Hook.app.'
|
13
|
+
default_command 'help'
|
14
|
+
autocomplete_commands = true
|
15
|
+
synopsis_format(:terminal)
|
12
16
|
|
13
17
|
version Hook::VERSION
|
14
18
|
|
@@ -18,8 +22,17 @@ class App
|
|
18
22
|
hooker = nil
|
19
23
|
|
20
24
|
desc 'List hooks on a file or url'
|
25
|
+
long_desc %{
|
26
|
+
Output a list of all hooks attached to given url(s) or file(s) in the specified format (default "paths").
|
27
|
+
|
28
|
+
Run `hook list` with no file/url argument to list all bookmarks.}
|
29
|
+
|
21
30
|
arg_name 'FILE_OR_URL [FILE_OR_URL...]'
|
22
31
|
command %i[list ls] do |c|
|
32
|
+
c.desc 'Generate a menu to select hook(s) for opening'
|
33
|
+
c.long_desc 'This option is a shortcut to `hook select` and overrides any other arguments.'
|
34
|
+
c.switch %i[s select]
|
35
|
+
|
23
36
|
c.desc 'Output only bookmarks with file paths (exclude e.g. emails)'
|
24
37
|
c.switch %i[f files_only], { negatable: false, default_value: false }
|
25
38
|
|
@@ -32,8 +45,11 @@ class App
|
|
32
45
|
c.flag %i[o output_format], { arg_name: 'format', default_value: 'paths' }
|
33
46
|
|
34
47
|
c.action do |_global_options, options, args|
|
48
|
+
if options[:s]
|
49
|
+
return hooker.open_linked(args[0])
|
50
|
+
end
|
35
51
|
valid_format = hooker.validate_format(options[:o], valid_formats)
|
36
|
-
|
52
|
+
exit_now!("Invalid output format: \"#{options[:o]}\"", 6) unless valid_format
|
37
53
|
|
38
54
|
result = hooker.linked_bookmarks(args, { files_only: options[:f],
|
39
55
|
format: valid_format,
|
@@ -43,7 +59,80 @@ class App
|
|
43
59
|
end
|
44
60
|
end
|
45
61
|
|
62
|
+
# Shell completion scripts are located in lib/completion/ and named "hook_completion" with
|
63
|
+
# the full shell name as the extension, e.g. "hook_completion.bash".
|
64
|
+
desc 'Shell completion examples'
|
65
|
+
valid_shells = %w[bash zsh fish]
|
66
|
+
long_desc %{
|
67
|
+
Output completion script example for the specified shell (#{valid_shells.join(', ')})
|
68
|
+
}
|
69
|
+
arg_name 'SHELL'
|
70
|
+
command %i[scripts] do |c|
|
71
|
+
c.action do |_global_options, _options, args|
|
72
|
+
if args.length > 1
|
73
|
+
exit_now!("Invalid number of arguments, (expected 1)", 5)
|
74
|
+
elsif args.nil? || args.empty?
|
75
|
+
exit_now!("Specify a shell (#{valid_shells.join(', ')})", 0)
|
76
|
+
else
|
77
|
+
if valid_shells.include?(args[0])
|
78
|
+
base_dir = File.expand_path(File.join(File.dirname(__FILE__), '../lib/completion'))
|
79
|
+
completion = File.join(base_dir, "hook_completion.#{args[0]}")
|
80
|
+
script = IO.read(completion)
|
81
|
+
$stdout.puts script
|
82
|
+
else
|
83
|
+
exit_now!("Invalid shell name, must be one of #{valid_shells.join(', ')}", 1)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
desc 'Search bookmarks'
|
92
|
+
long_desc %{
|
93
|
+
Search bookmark urls and names for a string and output in specified format (default "paths").
|
94
|
+
|
95
|
+
Run `hook find` with no search argument to list all bookmarks.}
|
96
|
+
arg_name 'SEARCH_STRING'
|
97
|
+
command %i[find search] do |c|
|
98
|
+
c.desc 'Output only bookmarks with file paths (exclude e.g. emails)'
|
99
|
+
c.switch %i[f files_only], { negatable: false, default_value: false }
|
100
|
+
|
101
|
+
c.desc 'Separate results with NULL separator, only applies with "paths" output for single file argument'
|
102
|
+
c.switch %i[null], { negatable: false, default_value: false }
|
103
|
+
|
104
|
+
valid_formats = %w[hooks paths markdown verbose]
|
105
|
+
fmt_list = valid_formats.map { |fmt| fmt.sub(/^(.)(.*?)$/, '(\1)\2') }.join(', ')
|
106
|
+
|
107
|
+
c.desc "Output format [#{fmt_list}]"
|
108
|
+
c.flag %i[o output_format], { arg_name: 'format', default_value: 'paths' }
|
109
|
+
|
110
|
+
c.desc "Search only bookmark names"
|
111
|
+
c.switch %i[n names_only], { negatable: false, default_value: false }
|
112
|
+
|
113
|
+
c.action do |_global_options, options, args|
|
114
|
+
valid_format = hooker.validate_format(options[:o], valid_formats)
|
115
|
+
exit_now!("Invalid output format: \"#{options[:o]}\"", 6) unless valid_format
|
116
|
+
|
117
|
+
result = hooker.search_bookmarks(args.join(" "), { files_only: options[:f],
|
118
|
+
format: valid_format,
|
119
|
+
null_separator: options[:null],
|
120
|
+
names_only: options[:n] })
|
121
|
+
|
122
|
+
puts result
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
46
126
|
desc 'Create bidirectional hooks between two or more files/urls'
|
127
|
+
long_desc %{
|
128
|
+
If two files/urls are provided, links will be bi-directional.
|
129
|
+
If three or more are provided, `link` defaults to creating bi-directional
|
130
|
+
links between each file and the last file in the list. Use `-a` to create
|
131
|
+
bi-directional links between every file in the list.
|
132
|
+
|
133
|
+
If using `--paste`, the URL/hook link in the clipboard will be used as one argument,
|
134
|
+
to be combined with one or more file/url arguments.
|
135
|
+
}
|
47
136
|
arg_name 'SOURCE [SOURCE...] TARGET'
|
48
137
|
command %i[link ln] do |c|
|
49
138
|
c.desc 'Link every listed file or url to every other'
|
@@ -59,7 +148,7 @@ class App
|
|
59
148
|
args.push(clipboard) if clipboard
|
60
149
|
end
|
61
150
|
if args.length < 2
|
62
|
-
|
151
|
+
exit_now!('Wrong number of arguments. At least 2 files must be specified, or one file with --paste', 5)
|
63
152
|
end
|
64
153
|
if options[:a]
|
65
154
|
puts hooker.link_all(args)
|
@@ -70,6 +159,12 @@ class App
|
|
70
159
|
end
|
71
160
|
|
72
161
|
desc 'Copy Hook URL for file/url to clipboard'
|
162
|
+
long_desc %{
|
163
|
+
Creates a bookmark for the specified file or URL and copies its Hook URL to the clipboard.
|
164
|
+
|
165
|
+
The copied Hook URL can be used to link to other files (use `hook link --paste FILE/URL),
|
166
|
+
or to paste into another app as a link. Use the -m flag to copy a full Markdown link.
|
167
|
+
}
|
73
168
|
arg_name 'FILE_OR_URL'
|
74
169
|
command %i[clip cp] do |c|
|
75
170
|
c.desc 'Copy as Markdown'
|
@@ -79,7 +174,7 @@ class App
|
|
79
174
|
c.flag %i[a app], { arg_name: 'APP_NAME' }
|
80
175
|
|
81
176
|
c.action do |_global_options, options, args|
|
82
|
-
|
177
|
+
exit_now!('Wrong number of arguments. Requires a path/url or -a APP_NAME', 5) if args.length != 1 && !options[:a]
|
83
178
|
|
84
179
|
if options[:a]
|
85
180
|
puts hooker.bookmark_from_app(options[:a], { copy: true, markdown: options[:m] })
|
@@ -90,6 +185,12 @@ class App
|
|
90
185
|
end
|
91
186
|
|
92
187
|
desc 'Get a Hook URL for the frontmost window of an app'
|
188
|
+
long_desc %{
|
189
|
+
Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark
|
190
|
+
for the active document, note, task, etc., returning a Hook URL.
|
191
|
+
|
192
|
+
Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.
|
193
|
+
}
|
93
194
|
arg_name 'APPLICATION_NAME'
|
94
195
|
command %i[from] do |c|
|
95
196
|
c.desc 'Output as Markdown'
|
@@ -99,29 +200,37 @@ class App
|
|
99
200
|
c.switch %i[c copy], { negatable: false, default_value: false }
|
100
201
|
|
101
202
|
c.action do |_global_options, options, args|
|
102
|
-
|
203
|
+
exit_now!("Wrong number of arguments (1 expected, #{args.length} given)", 5) if args.length != 1
|
103
204
|
|
104
205
|
puts hooker.bookmark_from_app(args[0], { copy: options[:c], markdown: options[:m] })
|
105
206
|
end
|
106
207
|
end
|
107
208
|
|
108
209
|
desc 'Remove a hook between two files/urls'
|
210
|
+
long_desc %{
|
211
|
+
Remove a hook between two files or URLs. If you use --all, all hooks on a given file will be removed.
|
212
|
+
|
213
|
+
If --all isn't specified, exactly two arguments (Files/URLs) are required.
|
214
|
+
}
|
109
215
|
arg_name 'ITEM_1 ITEM_2'
|
110
216
|
command %i[remove rm] do |c|
|
111
217
|
c.desc 'Remove ALL links on files, requires confirmation'
|
112
|
-
c.switch %i[a all]
|
218
|
+
c.switch %i[a all], { negatable: false, default_value: false }
|
113
219
|
|
114
220
|
c.action do |_global_options, options, args|
|
115
|
-
result = hooker.delete_hooks(args, { all: options[:
|
221
|
+
result = hooker.delete_hooks(args, { all: options[:a] })
|
116
222
|
puts result
|
117
223
|
end
|
118
224
|
end
|
119
225
|
|
120
226
|
desc 'Clone all hooks from one file or url onto another'
|
227
|
+
long_desc %{
|
228
|
+
Copy all the files and urls that the first file is hooked to onto another file. Exactly two arguments (SOURCE, TARGET) required.
|
229
|
+
}
|
121
230
|
arg_name 'SOURCE TARGET'
|
122
231
|
command %i[clone] do |c|
|
123
232
|
c.action do |_global_options, _options, args|
|
124
|
-
|
233
|
+
exit_now!("Wrong number of arguments. Two file paths or urls required (#{args.length} given)", 5) if args.length != 2
|
125
234
|
|
126
235
|
result = hooker.clone_hooks(args)
|
127
236
|
puts result
|
@@ -129,20 +238,28 @@ class App
|
|
129
238
|
end
|
130
239
|
|
131
240
|
desc 'Select from hooks on a file/url and open in default application'
|
241
|
+
long_desc %{
|
242
|
+
If the target file/URL has hooked items, a menu will be provided. Selecting one or more files
|
243
|
+
from this menu will open the item(s) using the default application assigned to the
|
244
|
+
filetype by macOS. Allows multiple selections with tab key, and type-ahead fuzzy filtering of results.
|
245
|
+
}
|
132
246
|
arg_name 'FILE_OR_URL'
|
133
247
|
command %i[select] do |c|
|
134
248
|
c.action do |_global_options, _options, args|
|
135
|
-
|
249
|
+
exit_now!("Wrong number of arguments. One file path or url required (#{args.length} given)", 5) if args.length != 1
|
136
250
|
|
137
251
|
hooker.open_linked(args[0])
|
138
252
|
end
|
139
253
|
end
|
140
254
|
|
141
255
|
desc 'Open the specified file or url in Hook GUI'
|
256
|
+
long_desc %{
|
257
|
+
Opens Hook.app on the specified file/URL for browsing and performing actions. Exactly one argument (File/URL) required.
|
258
|
+
}
|
142
259
|
arg_name 'FILE_OR_URL'
|
143
260
|
command %i[open gui] do |c|
|
144
261
|
c.action do |_global_options, _options, args|
|
145
|
-
|
262
|
+
exit_now!("Wrong number of arguments. One file path or url required (#{args.length} given)", 5) if args.length != 1
|
146
263
|
|
147
264
|
hooker.open_gui(args[0])
|
148
265
|
end
|
@@ -154,7 +271,7 @@ class App
|
|
154
271
|
# chosen command
|
155
272
|
# Use skips_pre before a command to skip this block
|
156
273
|
# on that command only
|
157
|
-
hooker = Hooker.new
|
274
|
+
hooker = Hooker.new
|
158
275
|
true
|
159
276
|
end
|
160
277
|
|
data/buildnotes.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# hookapp
|
2
|
+
|
3
|
+
Hook.app CLI
|
4
|
+
|
5
|
+
## Editing
|
6
|
+
|
7
|
+
Main executable is located in `bin/hook`. All commands are defined here.
|
8
|
+
|
9
|
+
Helpers and main classes are in `lib/`.
|
10
|
+
|
11
|
+
@run(subl -p hookapp.sublime-project)
|
12
|
+
|
13
|
+
## Building the Gem
|
14
|
+
|
15
|
+
@run(rake clobber rdoc package)
|
16
|
+
|
17
|
+
## Deploy
|
18
|
+
|
19
|
+
1. Bump version
|
20
|
+
2. Commit and push to GitHub
|
21
|
+
3. See Updating the Docs
|
22
|
+
4. Package the gem (See Building the Gem)
|
23
|
+
5. Push the gem with `gem push pkg/hookapp-[VERSION].gem`
|
24
|
+
|
25
|
+
## Updating the Docs
|
26
|
+
|
27
|
+
Update the docs with `bundle exec bin/hook _doc --format=markdown` and `bundle exec bin/hook _doc --format=rdoc`, then run `rake rerdoc`
|
28
|
+
|
29
|
+
@run(bundle exec bin/hook _doc --format=rdoc && bundle exec bin/hook _doc --format=markdown && rake rerdoc)
|
data/hook.rdoc
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
== hook - CLI interface for Hook.app (macOS)
|
2
2
|
|
3
|
-
|
3
|
+
Hook.app is a productivity tool for macOS <https://hookproductivity.com/>. This gem includes a `hook` binary that allows interaction with the features of Hook.app.
|
4
|
+
|
5
|
+
v2.0.3
|
4
6
|
|
5
7
|
=== Global Options
|
6
8
|
=== --help
|
@@ -17,7 +19,10 @@ Display the program version
|
|
17
19
|
==== Command: <tt>clip|cp FILE_OR_URL</tt>
|
18
20
|
Copy Hook URL for file/url to clipboard
|
19
21
|
|
22
|
+
Creates a bookmark for the specified file or URL and copies its Hook URL to the clipboard.
|
20
23
|
|
24
|
+
The copied Hook URL can be used to link to other files (use `hook link --paste FILE/URL),
|
25
|
+
or to paste into another app as a link. Use the -m flag to copy a full Markdown link.
|
21
26
|
===== Options
|
22
27
|
===== -a|--app APP_NAME
|
23
28
|
|
@@ -34,11 +39,43 @@ Copy as Markdown
|
|
34
39
|
==== Command: <tt>clone SOURCE TARGET</tt>
|
35
40
|
Clone all hooks from one file or url onto another
|
36
41
|
|
42
|
+
Copy all the files and urls that the first file is hooked to onto another file. Exactly two arguments (SOURCE, TARGET) required.
|
43
|
+
==== Command: <tt>find|search SEARCH_STRING</tt>
|
44
|
+
Search bookmarks
|
45
|
+
|
46
|
+
Search bookmark urls and names for a string and output in specified format (default "paths").
|
47
|
+
|
48
|
+
Run `hook find` with no search argument to list all bookmarks.
|
49
|
+
===== Options
|
50
|
+
===== -o|--output_format format
|
51
|
+
|
52
|
+
Output format [(h)ooks, (p)aths, (m)arkdown, (v)erbose]
|
53
|
+
|
54
|
+
[Default Value] paths
|
55
|
+
|
56
|
+
|
57
|
+
===== -f|--files_only
|
58
|
+
Output only bookmarks with file paths (exclude e.g. emails)
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
===== -n|--names_only
|
63
|
+
Search only bookmark names
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
===== --null
|
68
|
+
Separate results with NULL separator, only applies with "paths" output for single file argument
|
69
|
+
|
70
|
+
|
37
71
|
|
38
72
|
==== Command: <tt>from APPLICATION_NAME</tt>
|
39
73
|
Get a Hook URL for the frontmost window of an app
|
40
74
|
|
75
|
+
Specify an application by name (without '.app') to bring that app to the foreground and create a bookmark
|
76
|
+
for the active document, note, task, etc., returning a Hook URL.
|
41
77
|
|
78
|
+
Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.
|
42
79
|
===== Options
|
43
80
|
===== -c|--copy
|
44
81
|
Copy to clipboard
|
@@ -63,7 +100,13 @@ List commands one per line, to assist with shell completion
|
|
63
100
|
==== Command: <tt>link|ln SOURCE [SOURCE...] TARGET</tt>
|
64
101
|
Create bidirectional hooks between two or more files/urls
|
65
102
|
|
103
|
+
If two files/urls are provided, links will be bi-directional.
|
104
|
+
If three or more are provided, `link` defaults to creating bi-directional
|
105
|
+
links between each file and the last file in the list. Use `-a` to create
|
106
|
+
bi-directional links between every file in the list.
|
66
107
|
|
108
|
+
If using `--paste`, the URL/hook link in the clipboard will be used as one argument,
|
109
|
+
to be combined with one or more file/url arguments.
|
67
110
|
===== Options
|
68
111
|
===== -a|--all
|
69
112
|
Link every listed file or url to every other
|
@@ -78,7 +121,9 @@ Paste URL from clipboard
|
|
78
121
|
==== Command: <tt>list|ls FILE_OR_URL [FILE_OR_URL...]</tt>
|
79
122
|
List hooks on a file or url
|
80
123
|
|
124
|
+
Output a list of all hooks attached to given url(s) or file(s) in the specified format (default "paths").
|
81
125
|
|
126
|
+
Run `hook list` with no file/url argument to list all bookmarks.
|
82
127
|
===== Options
|
83
128
|
===== -o|--output_format format
|
84
129
|
|
@@ -97,21 +142,35 @@ Separate results with NULL separator, only applies with "paths" output for singl
|
|
97
142
|
|
98
143
|
|
99
144
|
|
145
|
+
===== -s|--[no-]select
|
146
|
+
Generate a menu to select hook(s) for opening
|
147
|
+
|
148
|
+
This option is a shortcut to `hook select` and overrides any other arguments.
|
149
|
+
|
100
150
|
==== Command: <tt>open|gui FILE_OR_URL</tt>
|
101
151
|
Open the specified file or url in Hook GUI
|
102
152
|
|
103
|
-
|
153
|
+
Opens Hook.app on the specified file/URL for browsing and performing actions. Exactly one argument (File/URL) required.
|
104
154
|
==== Command: <tt>remove|rm ITEM_1 ITEM_2</tt>
|
105
155
|
Remove a hook between two files/urls
|
106
156
|
|
157
|
+
Remove a hook between two files or URLs. If you use --all, all hooks on a given file will be removed.
|
107
158
|
|
159
|
+
If --all isn't specified, exactly two arguments (Files/URLs) are required.
|
108
160
|
===== Options
|
109
|
-
===== -a|--
|
161
|
+
===== -a|--all
|
110
162
|
Remove ALL links on files, requires confirmation
|
111
163
|
|
112
164
|
|
113
165
|
|
166
|
+
==== Command: <tt>scripts SHELL</tt>
|
167
|
+
Shell completion examples
|
168
|
+
|
169
|
+
Output completion script example for the specified shell (bash, zsh, fish)
|
114
170
|
==== Command: <tt>select FILE_OR_URL</tt>
|
115
171
|
Select from hooks on a file/url and open in default application
|
116
172
|
|
117
|
-
|
173
|
+
If the target file/URL has hooked items, a menu will be provided. Selecting one or more files
|
174
|
+
from this menu will open the item(s) using the default application assigned to the
|
175
|
+
filetype by macOS. Allows multiple selections with tab key, and type-ahead fuzzy filtering of results.
|
176
|
+
[Default Command] help
|
data/hookapp.gemspec
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Ensure we require the local version and not one we might have installed already
|
2
4
|
require File.join([File.dirname(__FILE__), 'lib', 'hook', 'version.rb'])
|
3
|
-
|
5
|
+
Gem::Specification.new do |s|
|
4
6
|
s.name = 'hookapp'
|
5
7
|
s.version = Hook::VERSION
|
6
8
|
s.author = 'Brett Terpstra'
|
@@ -8,15 +10,14 @@ spec = Gem::Specification.new do |s|
|
|
8
10
|
s.homepage = 'https://brettterpstra.com'
|
9
11
|
s.platform = Gem::Platform::RUBY
|
10
12
|
s.summary = 'A CLI for Hook.app (macOS)'
|
11
|
-
s.files = `git ls-files`.split("
|
12
|
-
")
|
13
|
+
s.files = `git ls-files`.split("\n")
|
13
14
|
s.require_paths << 'lib'
|
14
|
-
s.extra_rdoc_files = ['README.rdoc','hook.rdoc']
|
15
|
+
s.extra_rdoc_files = ['README.rdoc', 'hook.rdoc']
|
15
16
|
s.rdoc_options << '--title' << 'hook' << '--main' << 'README.rdoc' << '-ri'
|
16
17
|
s.bindir = 'bin'
|
17
18
|
s.executables << 'hook'
|
18
|
-
s.add_development_dependency('
|
19
|
-
s.add_development_dependency('
|
20
|
-
s.add_development_dependency('
|
21
|
-
s.add_runtime_dependency('gli','2.19.0')
|
19
|
+
s.add_development_dependency('aruba', '~> 0.14.14')
|
20
|
+
s.add_development_dependency('rake', '~> 13.0.1')
|
21
|
+
s.add_development_dependency('rdoc', '~> 6.1.2')
|
22
|
+
s.add_runtime_dependency('gli', '2.19.0')
|
22
23
|
end
|
data/html/App.html
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class App - 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
|
+
|
25
|
+
|
26
|
+
<body id="top" role="document" class="class">
|
27
|
+
<nav role="navigation">
|
28
|
+
<div id="project-navigation">
|
29
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
30
|
+
<h2>
|
31
|
+
<a href="./index.html" rel="home">Home</a>
|
32
|
+
</h2>
|
33
|
+
|
34
|
+
<div id="table-of-contents-navigation">
|
35
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
36
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
37
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
42
|
+
<form action="#" method="get" accept-charset="utf-8">
|
43
|
+
<div id="search-field-wrapper">
|
44
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
45
|
+
aria-autocomplete="list" aria-controls="search-results"
|
46
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
47
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<ul id="search-results" aria-label="Search Results"
|
51
|
+
aria-busy="false" aria-expanded="false"
|
52
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
53
|
+
</form>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
</div>
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
<div id="class-metadata">
|
61
|
+
|
62
|
+
<div id="parent-class-section" class="nav-section">
|
63
|
+
<h3>Parent</h3>
|
64
|
+
|
65
|
+
|
66
|
+
<p class="link">Object
|
67
|
+
|
68
|
+
</div>
|
69
|
+
|
70
|
+
|
71
|
+
<div id="extends-section" class="nav-section">
|
72
|
+
<h3>Extended With Modules</h3>
|
73
|
+
|
74
|
+
<ul class="link-list">
|
75
|
+
|
76
|
+
|
77
|
+
<li><span class="extend">GLI::App</span>
|
78
|
+
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
</nav>
|
86
|
+
|
87
|
+
<main role="main" aria-labelledby="class-App">
|
88
|
+
<h1 id="class-App" class="class">
|
89
|
+
class App
|
90
|
+
</h1>
|
91
|
+
|
92
|
+
<section class="description">
|
93
|
+
|
94
|
+
<p>Main class for <a href="GLI.html"><code>GLI</code></a> app</p>
|
95
|
+
|
96
|
+
</section>
|
97
|
+
|
98
|
+
|
99
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
</section>
|
110
|
+
|
111
|
+
</main>
|
112
|
+
|
113
|
+
|
114
|
+
<footer id="validator-badges" role="contentinfo">
|
115
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
116
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
|
117
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
118
|
+
</footer>
|
119
|
+
|