Created
November 13, 2012 01:53
-
-
Save poritsky/4063426 to your computer and use it in GitHub Desktop.
Serious Eats Ingredient Lists to OmniFocus
This file contains 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
tell application "Safari" to set ingredientlist to text of front document | |
set my text item delimiters to " | |
Ingredients" | |
set ingredientlist to text item 2 of ingredientlist | |
set my text item delimiters to " | |
Procedures" | |
set ingredientlist to text item 1 of ingredientlist | |
set l to paragraphs of ingredientlist | |
tell application "OmniFocus" to tell document 1 | |
repeat with v in l | |
set theproject to (first flattened project where its name = "Recipes") | |
tell theproject to make new task with properties {name:v} | |
end repeat | |
end tell |
This file contains 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
tell application "Safari" | |
set TaskName to name of current tab of window 1 | |
set TaskNote to "From: " & URL of current tab of window 1 | |
end tell | |
tell application "OmniFocus" to tell document 1 | |
set theproject to (first flattened project where its name = "Recipes") | |
tell theproject to make new task with properties {name:TaskName, note:TaskNote} | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment