Omnifocus Blog Drafts

I am concerned that I will forget about the drafts that I have sitting in the drafts folder.

To fix that I created an Applescript, again triggered by Hazel, adds the files to Omnifocus as tasks. I adapted a David Sparks script to suit my needs.

tell application "Finder" to set fileName to (name of theFile)
set fileName to ((characters 1 thru -10 of fileName) as string)
set URLFile to do shell script "python -c "import urllib; print urllib.quote('''" & fileName & "''')""
set theDate to current date
set theTask to "Finish Blog Post - " & fileName
set theNote to "Started: " & (theDate as string) & return & "nebulous://_blog/draft/" & URLFile
tell application "OmniFocus"
tell front document
set theContext to first flattened context where its name = "write"
set theProject to first flattened project where its name = "Blog"
tell theProject to make new task with properties {name:theTask, note:theNote, context:theContext}
end tell
end tell
Works like a charm, and foreshadows the next post.
(updated): Updated Applescript to trim file extension.