Last active
September 23, 2018 08:41
-
-
Save julienma/61e05bb025f2a35efc9992abe44711ba to your computer and use it in GitHub Desktop.
DO Note to Omnifocus inbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Author: Julien Ma - https://github.com/julienma | |
This script creates a new task in Omnifocus inbox, parsing a text file's content to create the task. | |
I use it to quickly create tasks from Android, using IFTTT's DO Note widget. | |
Installation (on the computer where you use Omnifocus): | |
- Setup this IFTTT applet: https://ifttt.com/applets/47483145d-send-to-omnifocus | |
(Basically a DO Note to a Dropbox folder, with the note as the file content) | |
- Put a copy of the script in /Library/Scripts/Folder Action Scripts or ~/Library/Scripts/Folder Action Scripts. | |
- Right-click on the target folder in Dropbox > Services > Folder Actions: enable folder actions and select this script. | |
Usage: | |
- Create a new note on your phone with the DO Note widget. The note will be the task title. You can use the Omnifocus parse syntax for more advanced control. | |
- If both your phone and computer have an updated Dropbox, a new task will be created in your Omnifocus inbox. | |
Content will be parsed by Omnifocus: | |
cf. https://github.com/brandonpittman/OmniFocus#transport-text | |
E.g.: "my task title! #2days @my_context //some comment" | |
*) | |
on adding folder items to this_folder after receiving added_items | |
tell application "OmniFocus" | |
repeat with i from 1 to number of items in added_items | |
set new_item to item i of added_items | |
set actionTitle to "New from android: " & (read new_item) | |
parse tasks into default document with transport text actionTitle | |
end repeat | |
end tell | |
tell application "Finder" to delete added_items | |
end adding folder items to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment