Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I export tags of notes from Evernote using applescript?

Hi,



I am looking for a way of exporting the tags of notes in Evernote to an RTF/CSV file. I have a script that reads/exports all the titles of the notes, but when I try the same with tags I can read the tags, but I'm not sure how to write them to a string/file.



Here is a simple script that reads the tags of a note:


tell application "Evernote"

set the_notes to the selection

set first_note to item 1 of the_notes

set the_tags to (the tags of first_note)

end tell


It returns:


{tag "travel" of application "Evernote"}


But when I try to write this to a TextEdit file by adding:


tell application "TextEdit"

activate

make new document

set theDate to current date

set text of document 1 to the_tags as text

end tell


I get the error: "Can’t make «class EVtg» "travel" of application "Evernote" into type text."


Could someone help to get the script to write the tags of the notes?


Thanks,


Nick

Macbook Pro, Mac OS X (10.7), 2.66 GHz Intel Core i7 8GB RAM

Posted on Aug 21, 2011 11:57 AM

Reply
1 reply

Oct 19, 2011 5:22 AM in response to nick_harambee

Nick


This is from a long time ago, so you probably have your answer already. I was here with another Evernote problem and found yours!


If you are simply trying to get the tag name, you can do something like this to get a string:


tell application "Evernote"

set theNoteBook to selection

set theNote to item 1 of theNoteBook

set theTags to tags of theNote

set theTag to item 1 of theTags

set tagName to name of theTag


--set tagParent to name of parent of theTag

end tell


Note that the line I have commented shows that you can also get the tag's parent tag if it has one.


Hope this is of some use.


-Bernard

How do I export tags of notes from Evernote using applescript?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.