The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Evernote and AppleScript (http://forums.omnigroup.com/showthread.php?t=17928)

ckennedy 2010-09-14 03:34 AM

Evernote and AppleScript
 
Now that Evernote has released an update that plays well with AppleScript, wondering if anyone has tried their hand at crafting a script to link EN and OF together. Would love to be able to automate linking OF tasks with EN for reference materials.:)

Tinchohs 2010-09-15 02:12 AM

[QUOTE=ckennedy;85563]Now that Evernote has released an update that plays well with AppleScript, wondering if anyone has tried their hand at crafting a script to link EN and OF together. Would love to be able to automate linking OF tasks with EN for reference materials.:)[/QUOTE]
I wish I knew how to code. Must say that I will SO truly appreciate whomever can script 'pulling selected text from an EN note into de OF inbox with the title being the name of the selecte text'.

Here is the context. I take notes in Omni Focus and when ever I create a task (to do) with in my notes, I highlight the line and through a script, send it to OF's inbox. As I am looking to migrate into EverNote, when I highlight a line of text within a note, and clipp-it with Clip-o-tron, the subject is always the same for all texts (something laong the lines of Evernote Note...). So I have to edit the title before I process the task.

I assume this should be very easy? Anyone with this need willing to code it? Thanks so much...

iNik 2010-09-21 12:32 PM

The OmniFocus clipping service handles this just fine. Grabs the title of the note, plus the beginning of the text, into the quick-entry window. Super easy.

Tinchohs 2010-11-15 03:30 PM

1 Attachment(s)
My issue, is that the subject of the note, is not the highlighted text, thus if I clip 5 notes from the same notes (for example 5 action items I took), they all have the same description in OF, and only by reading the notes I can distinguish them. Any way to fox this changing the script? Please see attached file. Thanks so much for your help.

Brian 2010-11-15 03:38 PM

Sorry for the confusion here - the clip-o-tron offers makes the best guess it can about what the title of the action should be, but it also selects the text so you can easily type in something else if you'd prefer a different name.

whpalmer4 2010-11-15 03:42 PM

[QUOTE=Tinchohs;88939]My issue, is that the subject of the note, is not the highlighted text, thus if I clip 5 notes from the same notes (for example 5 action items I took), they all have the same description in OF, and only by reading the notes I can distinguish them. Any way to fox this changing the script? Please see attached file. Thanks so much for your help.[/QUOTE]

Am I correct in thinking that you want to select a bunch of items, and have them clipped and turned into several individual items as one operation?

Tinchohs 2010-11-16 02:47 AM

[QUOTE=whpalmer4;88942]Am I correct in thinking that you want to select a bunch of items, and have them clipped and turned into several individual items as one operation?[/QUOTE]

You are correct. This works great from Omni Outliner. But as I use more and more Evernote, I want to be able to highlight all my actions items and turn them into individual tasks in my inbox. If they all have the same name, I have to re-type in each the content that it's in the notes. If it's one it's not big deal, but when you have 10 or 15 actions and this happens several times a day, it no longer works as a solution.

Thanks.

dbourbon 2010-11-16 09:29 AM

Evernote and Omnifocus
 
[QUOTE=Tinchohs;88965]You are correct. This works great from Omni Outliner. But as I use more and more Evernote, I want to be able to highlight all my actions items and turn them into individual tasks in my inbox. If they all have the same name, I have to re-type in each the content that it's in the notes. If it's one it's not big deal, but when you have 10 or 15 actions and this happens several times a day, it no longer works as a solution.

Thanks.[/QUOTE]

I would like to see better Evernote and Omnifocus integration.

RobTrew 2010-11-18 06:15 PM

A very rough first draft of a script to import the notes selected in the Evernote OS X application GUI to a series of OmniFocus tasks, either in the Inbox, or in a date-stamped import folder.

(In this draft the notes come across as plain text. It's easy enough to get a formatted RTF version into the clipboard, but I haven't spent enough time on it to detect an obvious route from the clipboard into the rich text of the OF note).

[I don't use Evernote, so this draft is offered out of curiosity, as a rough suggestion, but may not be much supported or developed]

[CODE]-- Ver 0.2

-- Rough draft of a script to import selected EverNote notes to OF

-- If the following property is set to false, a date-stamped import folder is created
-- containing a project (named after the relevant Evernote notebook) which in turn contains the selected items

-- If it is set to true, the imported items will be placed in the OF Inbox

property pblnToInBox : false

on run
set lstEv to EvNoteSeln()
PlaceInOF(lstEv)
end run

on EvNoteSeln()
tell application id "com.evernote.Evernote"
set lstSeln to selection
if length of lstSeln > 0 then

tell front notebook
set lstEv to {its name}
repeat with oNote in lstSeln
tell note id (local id of oNote)
set end of lstEv to {title, HTML content}
end tell
end repeat
end tell
return lstEv
end if
{}
end tell
end EvNoteSeln

on PlaceInOF(lstEv)

set lngNotes to length of lstEv
if lngNotes > 1 then
set dte to current date

tell application id "com.omnigroup.omnifocus"
tell front document
if pblnToInBox then

repeat with i from 1 to lngNotes
set {strTitle, strHTML} to item i of lstEv
set the clipboard to strHTML
set strTxt to my GetText()
set oTask to make new inbox task with properties {name:strTitle, note:strTxt}
end repeat
else

set oFolder to make new folder with properties {name:"Evernote Import " & dte as string}
tell oFolder
set oProj to make new project with properties {name:first item of lstEv}
end tell
tell oProj
repeat with i from 2 to lngNotes
set {strTitle, strHTML} to item i of lstEv

set the clipboard to strHTML
set strTxt to my GetText()
set oTask to make new task with properties {name:strTitle, note:strTxt}
end repeat
end tell
end if
end tell
end tell
end if
end PlaceInOF

on GetText()
(do shell script "pbpaste | textutil -format html -convert txt -stdin -stdout") & return
end GetText

[/CODE]

Tinchohs 2010-11-19 09:34 AM

Rob, thanks so much. I tested it and have the following question. Would it be very hard to make the script just copy the highlighted text within the note, and place it as the OmniFocus task name? That would really do it for me. Thanks so much for your help.


All times are GMT -8. The time now is 03:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.