Forked from poritsky/ingredient-list-to-omnifocus.applescript
Created
February 5, 2013 23:16
-
-
Save cschneid/4718621 to your computer and use it in GitHub Desktop.
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
| tell application "Safari" to set recipeurl to URL of front document | |
| tell application "Safari" to set recipetitle to name of front document | |
| set ingredients to (do shell script "curl http://recipedistiller.com/recipe/classify/?recipeurl=" & recipeurl & " | textutil -convert txt -stdin -stdout | grep '.' | sed 's/ • DELETE //g'") | |
| set my text item delimiters to "VIEW RECIPE" | |
| set ingredients to text item 2 of ingredients | |
| set my text item delimiters to "©" | |
| set ingredients to text item 1 of ingredients | |
| set l to paragraphs of ingredients | |
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment