Export All Chrome Tabs to Evernote

Shared By: Tony Giunta

Description

Tony Giunta, the man behind piperedirect.com was kind enough to work up this code based on the Safari Tabs to Evernote script.

This AppleScript creates a note in Evernote with a list of the URLs of each open tab in the frontmost window of Chrome. It 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!)

Alfred Users — You Can Now Download an Extension of This Script Here

The Code

(*
Veritrope.com
Export All Chrome Tabs to Evernote
VERSION 1.0
September 8, 2012

// AUTHORED BY:
Tony Giunta
http://piperedirect.com/

// TERMS OF USE:
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

// LIKE THIS SCRIPT?
If this AppleScript is helpful to you, please show your support here:
http://veritrope.com/support

// SCRIPT INFORMATION AND UPDATE PAGE
http://veritrope.com/code/export-all-chrome-tabs-to-evernote

// REQUIREMENTS
More details on the script information page.

// CHANGELOG
1.0  INITIAL RELEASE

*)


(*
======================================
// MAIN PROGRAM
======================================
*)

-- PREPARE THE LIST
set url_list to {}
set the date_stamp to ((the current date) as string)
set NoteTitle to "URL List from Chrome Tabs on " & the date_stamp

-- GET TABS FROM CHROME
tell application "Google Chrome"
    activate
    set chromeWindow to window 1
    repeat with w in chromeWindow
        try
            repeat with t in (tabs of w)
                set TabTitle to (title 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

--MAKE THE ITEM IN EVERNOTE
tell application "Evernote"
    set EVNote to (create note with text url_list title NoteTitle)
end tell

(*
======================================
// PREPARATORY SUBROUTINES
======================================
*)


(*
======================================
// UTILITY SUBROUTINES
======================================
*)


(*
======================================
// MAIN HANDLER SUBROUTINES
======================================
*)

4 Responses to “Export All Chrome Tabs to Evernote”

  1. Athena says:

    I love this script, but as both a Windows and Mac user, is there any way I could make this work in Windows?

    Thanks in advance for any help or suggestions!

  2. Jeremy says:

    Who’s got two thumbs and just made my day? You do my friend!

rss Subscribe to Comments RSS Feed


You can use these tags in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>