Handle "archive current item" for multiple applications using the same hotkey
Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/UniversalArchive.spoon.zip
Using this Spoon enables you to use a single hotkey to archive an
item in multiple applications. Out of the box the following
applications are supported: Evernote, Mail, Spark and Outlook. You
can easily register handlers for new applications (or override the
built-in ones) using the registerApplication()
method. If you
write a new handler and feel others could benefit from it, please
submit a pull request!
Handlers can also provide support for archiving to multiple
locations, and you can bind different hotkeys for each
destination. At the moment only Evernote supports this. See the
documentation for bindHotkeys()
for the details on how to
specify multiple-destination filing hotkeys.
Signature | UniversalArchive.archive_notifications |
---|---|
Type | Variable |
Description | Boolean indicating whether a notification should be produced when an item is archived. Defaults to "true". |
Source | Source/UniversalArchive.spoon/init.lua line 46 |
Signature | UniversalArchive.evernote_archive_notebook |
---|---|
Type | Variable |
Description | Name of the Notebook to use for archiving in Evernote. Defaults to "Archive" |
Source | Source/UniversalArchive.spoon/init.lua line 36 |
Signature | UniversalArchive.evernote_delay_before_typing |
---|---|
Type | Variable |
Description | A short pause to make typing into Evernote more reliable |
Notes |
|
Source | Source/UniversalArchive.spoon/init.lua line 51 |
Signature | UniversalArchive.logger |
---|---|
Type | Variable |
Description | Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon. |
Source | Source/UniversalArchive.spoon/init.lua line 31 |
Signature | UniversalArchive.outlook_archive_folder |
---|---|
Type | Variable |
Description | Name of the mailbox to use for archiving in Outlook. You must move a message manually to that mailbox at least once so that it appears in the "Message" -> "Move..." submenu. Defaults to "Archive" |
Source | Source/UniversalArchive.spoon/init.lua line 41 |
Signature | UniversalArchive:bindHotkeys(mapping) |
---|---|
Type | Method |
Description | Binds hotkeys for UniversalArchive |
Parameters |
|
Returns | |
Source | Source/UniversalArchive.spoon/init.lua line 183 |
Signature | UniversalArchive:evernoteArchive(where) |
---|---|
Type | Method |
Description | Archive current note in Evernote. |
Parameters |
|
Returns | |
Source | Source/UniversalArchive.spoon/init.lua line 61 |
Signature | UniversalArchive:mailArchive() |
---|---|
Type | Method |
Description | Archive current message in Mail using the built-in Archive functionality |
Parameters |
|
Returns | |
Source | Source/UniversalArchive.spoon/init.lua line 85 |
Signature | UniversalArchive:outlookArchive() |
---|---|
Type | Method |
Description | Archive current message in Outlook using one of two methods: |
Parameters |
|
Returns | |
Notes |
|
Source | Source/UniversalArchive.spoon/init.lua line 121 |
Signature | UniversalArchive:registerApplication(appname, fn) |
---|---|
Type | Method |
Description | Register a handler function for an application. |
Parameters |
|
Returns | |
Source | Source/UniversalArchive.spoon/init.lua line 166 |
Signature | UniversalArchive:sparkArchive() |
---|---|
Type | Method |
Description | Archive current message in Spark using the built-in Archive functionality |
Parameters |
|
Returns | |
Source | Source/UniversalArchive.spoon/init.lua line 103 |
Signature | UniversalArchive:universalArchive(where) |
---|---|
Type | Method |
Description | Main entry point for archiving an item. |
Parameters |
|
Returns | |
Notes |
|
Source | Source/UniversalArchive.spoon/init.lua line 143 |