Description
Originally published elsewhere on this site, this script creates a note with a list of the URLs of each open tab in the frontmost window of Safari.Efficiency was foremost in my mind when creating this script. As such, the script creates the note in the default notebook and without any tagging. If anyone thinks that notebook selection and tagging should be included, please let me know in the comments below and I’ll consider adding it in!
The Code
(*
http://veritrope.com
Safari URLs List to Evernote Exporter
Version 1.0
October 28, 2009
Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/export-all-safari-tabs-to-evernote
Installation: Just double-click on the script!
FastScripts Installation (Optional, but recommended):
--Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html
--Copy script or an Alias to ~/Library/Scripts/Applications/Yojimbo
--Set up your keyboard shortcut
CHANGELOG:
1.00 INITIAL RELEASE
*)
set url_list to {}
set the date_stamp to ((the current date) as string)
set NoteTitle to "URL List from Safari Tabs on " & the date_stamp
tell application "Safari"
activate
set safariWindow to window 1
repeat with w in safariWindow
try
repeat with t in (tabs of w)
set TabTitle to (name of t)
set TabURL to (URL of t)
set TabInfo to ("" & TabTitle & return & TabURL & return & return)
copy TabInfo to the end of url_list
end repeat
end try
end repeat
end tell
-- convert url_list to text
set old_delim to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set url_list to url_list as text
set AppleScript's text item delimiters to old_delim
tell application "Evernote"
set EVNote to (create note with text url_list title NoteTitle)
end tell
http://veritrope.com
Safari URLs List to Evernote Exporter
Version 1.0
October 28, 2009
Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/export-all-safari-tabs-to-evernote
Installation: Just double-click on the script!
FastScripts Installation (Optional, but recommended):
--Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html
--Copy script or an Alias to ~/Library/Scripts/Applications/Yojimbo
--Set up your keyboard shortcut
CHANGELOG:
1.00 INITIAL RELEASE
*)
set url_list to {}
set the date_stamp to ((the current date) as string)
set NoteTitle to "URL List from Safari Tabs on " & the date_stamp
tell application "Safari"
activate
set safariWindow to window 1
repeat with w in safariWindow
try
repeat with t in (tabs of w)
set TabTitle to (name of t)
set TabURL to (URL of t)
set TabInfo to ("" & TabTitle & return & TabURL & return & return)
copy TabInfo to the end of url_list
end repeat
end try
end repeat
end tell
-- convert url_list to text
set old_delim to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set url_list to url_list as text
set AppleScript's text item delimiters to old_delim
tell application "Evernote"
set EVNote to (create note with text url_list title NoteTitle)
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!





One Response to “Export All Safari Tabs to Evernote”
Nice! I was going to write this but you saved me an hour!