Description
This AppleScript converts the HTML content of a selected Evernote item and uses textutil to render it as plain text. The plain text is then stored in the variable "plain_Text".The Code
(*
Veritrope.com
Evernote - Get Plain Text of Selected Note
Version 1.0
October 6, 2011
Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/evernote-get-plain-text-of-selected-note
// CHANGELOG:
1.0 Initial Version
// NOTES:
This AppleScript converts the HTML content of a selected Evernote item ¬
and uses textutil to render it as plain text.
The plain text is stored in the variable "plain_Text".
*)
(*
======================================
// MAIN PROGRAM
======================================
*)
tell application "Evernote"
set the_Selection to selection
set the_HTML to HTML content of (item 1 of the_Selection)
set plain_Text to do shell script "echo " & quoted form of the_HTML & space & "| textutil -convert txt -stdin -stdout"
end tell
Veritrope.com
Evernote - Get Plain Text of Selected Note
Version 1.0
October 6, 2011
Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/evernote-get-plain-text-of-selected-note
// CHANGELOG:
1.0 Initial Version
// NOTES:
This AppleScript converts the HTML content of a selected Evernote item ¬
and uses textutil to render it as plain text.
The plain text is stored in the variable "plain_Text".
*)
(*
======================================
// MAIN PROGRAM
======================================
*)
tell application "Evernote"
set the_Selection to selection
set the_HTML to HTML content of (item 1 of the_Selection)
set plain_Text to do shell script "echo " & quoted form of the_HTML & space & "| textutil -convert txt -stdin -stdout"
end tell