Evernote – Get Plain Text of Selected Note
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
Quick Links
Want to open the script right away?
Click here to open it in your Script Editor
Click here to open it in your Script Editor
Using Snippets to manage your code?
Save this into Snippets
Save this into Snippets
New To AppleScript?
- Here's how to use the AppleScripts you find here and -- to make them even easier to use -- here's how run them with simple keyboard shortcuts!
- Be sure to check out other great AppleScripts in the Veritrope.com Code Library -- and share your own AppleScript projects using the quick submission form!





No Comments / Add Yours!