View Evernote Notes on Your Desktop with GeekTool (OS X)

Screenshot of Evernote notes overlaid on a desktop

Update July, 2014: Evernote has changed the way they display notes in webpages, according to them, to prevent click-jacking. You can no longer download or iFrame notes, which prevents this and other methods from working.

The Evernote application is great, but I don’t like keeping it open all the time just to quickly view a couple notes throughout the day, especially when I can display notes right on my desktop. If you already use Evernote to manage tasks and to-do lists, it’s nice to have more visibility into those notes by throwing them onto your desktop. Most operating systems don’t have the functionality to display file contents on the desktop (actually, I don’t know any that do). But if you’re running Mac OS X there’s a tool call GeekTool that can help. It can’t do all the work, so we’ll have to set up a few things first.

The first thing you’ll want to do is open up Evernote, find the note you want shown on your desktop, click the Share button and then “Copy Share URL to Clipboard”.

Sharing the URL to my Evernote To-Do list
Copy the share URL of your note and open it in your browser

If you paste that URL into your browser you’ll see the note displayed as a webpage. We’re going to use wget to download this page, remove the HTML tags, and then show the resulting text on your desktop. We’ll create a shell script to do this work for us. Make sure to make it executable using chmod.

In the terminal, type:

chmod 755

You can put your shell script anywhere you want and call it whatever you like. I’ll put it on the desktop for now. Just make sure to put it somewhere it won’t get deleted. Open up the file with your favorite text editor (TextMate, TextEdit, the terminal, whatever…not Word) and insert the following script. This script contains the bare essentials to get things working. I’ve called out the parts you’ll need to change in caps. (If you have trouble getting the script to run, it’s probably because some formatting was pasted from your browser; try typing the script out by hand from scratch instead of copying and pasting, or download the sample at the bottom of this article).

/usr/local/bin/wget -q -O - test.txt | sed -n '/note-content/,/save-button-mobile/p' | awk '{gsub("<[^>]*>", ""); gsub("> ", ""); gsub(">", "")} 1' | tail -n +3 | sed -n -e :a -e '1,2!{P;N;D;};N;ba' | awk '{$1=$1}1' | awk '/./' | awk ' {print;} NR % 1 == 0 { print ""; }' > /Users/YOUR-USERNAME/Desktop/evernote.txt

Here is what the script does:

# this is called a shebang. it should contain the path to your bash interpreter. if you're having trouble getting anything to run you might try removing this or trying a different path that bash for bash's install directory

# download the html version of your evernote note using wget. -q puts wget in silent mode. -O tells wget to save to temp.txt. since we’re in silent mode nothing is really getting saved here anyway, but if you need to trouble shoot you can delete -q. you need to use the url obtained earlier in this command
/usr/local/bin/wget -q -O - test.txt |

# strip everything from the html except for what is in between the divs with class “note-content” and “save-button-mobile”. the contents of your note are between these two divs
sed -n '/note-content/,/save-button-mobile/p' |

# remove all html tags by removing everything inside carets, then removing the carets (if you use carets in your notes you’ll have to modify this line)
awk '{gsub("<[^>]*>", ""); gsub("> ", ""); gsub(">", "")} 1' |

# remove the extra white space at the top of the file
tail -n +3 |

# remove the last two lines from the bottom of the file
sed -n -e :a -e '1,2!{P;N;D;};N;ba' |

# remove leading whitespace and tabs from the beginning of each line (optional)
awk '{$1=$1}1' |

# if you want to make the output more consistent remove all blank lines and leading spaces (optional). this will remove multiple blanks lines, and then we’ll put back a single blank line in the next command
awk '/./' |

# add a space between each line (optional)
awk ' {print;} NR % 1 == 0 { print ""; }'

# save the output to a text file. make sure to use the full path, not ~/Path/To/evernote.txt. this is eventually what will be displayed on your desktop using GeekTool
> /Users/YOUR-USERNAME/Desktop/evernote.txt

# the | pipe character passes the output of the previous command to the next command. you can add or remove any steps along the way
# you may need to check internet connectivity at some point before trying wget. in that case, read this article: we’ll get to that in another article

Save your script. With your terminal in the same directory as your script, run it with:


This will generate evernote.txt. Open it and check that everything looks OK.

Results of running the shell script to download an Evernote
Output of the script using my to-do list as an example

You’ll notice that the checkboxes are gone, which is expected, since we stripped all HTML from the page. You can put the checkboxes back (both checked and unchecked) by representing them as plain-text. See how to customize the output of your script below.

Showing the Note on Your Desktop

To show your note on your desktop you’ll need GeekTool. Head over to the download page and install it. Open GeekTool and drag a “Shell” to your desktop. In the Properties window for that Shell, insert this as the Command:

cat /Users/YOUR-USERNAME/Desktop/evernote.txt

You should see your note pop up on your desktop. I have the note refresh every 7200 seconds, or every 2 hours (it will also refresh when you wake your computer from sleep or turn it on). And I have the command timeout after 5 seconds. The refresh time above only dictates how often GeekTool will refresh what is shown on the desktop from your evernote.txt. If evernote.txt isn’t updated periodically with your script then the note on your desktop won’t change at all. We’ll need to fix that. After all, the beauty of Evernote is sync.

Automatically Updating Evernote.txt

To get your notes to auto-update (aka sync with Evernote), the script you saved above must be run periodically. We’ll use a LaunchAgent to do this. Navigate to ~/Library/LaunchAgents and create a new file, following a similar format to the other LaunchAgents you have in there: com.geektool.evernote.plist or something similar. Your LaunchAgent should contain the following:

com.geektool.evernote # this should mimic your launch agent's filename (without .plist)

./Users/Username/ # the exact path to your script

7200 # this is how often your script will run, in seconds

# be sure to omit my comments

Restart your computer and the Launch Agent will go into effect, running your script at your defined interval. Keep in mind that if GeekTool refreshes its display of evernote.txt every 7200 seconds and your script downloads your Evernote note every 7200 seconds then the desktop display of your note could go un-updated for a maximum of 7200+7200=14400 seconds, or 4 hours. Adjust how often your script runs and how often GeekTool refreshes its display to your liking.

And that’s pretty much it. You can share your notes with others, display notes others have shared with you on your desktop so you know when they’re updated, and use the convenient checkboxes and other formatting Evernote provides (see below). Similar solutions to displaying notes on the desktop involve text editors, Dropbox, IFTTT, and more, but you can’t beat the convenience of Evernote. Once setup, the solution here is pretty foolproof, and you can edit your notes on any device (even on the web) and see them update on your desktop minutes later.

Customizing the Output (Display Checkboxes, etc.)

The fun stuff. There are a number of symbols, characters, and styles you can use in Evernote. You have bullets, checkboxes, horizontal rules, italics, etc. You can put most of these back into the file that’s displayed on your desktop as long as you can represent these items as plain-text. For example, an unchecked checkbox can be represented by [ ] and a checked one can be represented by [X]. Bullets can be represented by a +, and italicized words can have *asterisks* around them. I won’t show you how to do each and every of these replacements, but I’ll show you an example and once you understand the process you’ll be able to customize your evernote.txt just about any way you want.

All these symbols, etc. are represented as HTML – you just need to find out how they’re being represented and replace the HTML with your plain-text version, before your script removes HTML tags. For example, with checkboxes, if we open the URL to our note and view the source HTML we can see that an unchecked checkbox is represented as <input disabled=”true” type=”checkbox”/> and a checked checkbox is represented as <input checked=”true” disabled=”true” type=”checkbox”/>. In your script replace these strings right after your script downloads the HTML and before it strips HTML tags.

Screenshot of source HTML from Evernote
You can see the HTML for symbols or formatting by looking at the source

So your new shell script would have:

# previous bit of code here...
sed -n '/note-content/,/save-button-mobile/p' |
# put your customizations after the above string in your script (it already exists...don’t add it again...)
# replace the unchecked checkbox with [ ]. the backslash \ after "checkbox" escapes the forward slash /. you need to escape and regex-reserved characters
sed -e 's//[ ] /g' |
# replace the checked checkbox with [X]
sed -e 's//[X] /g' |
# rest of the code goes here

If you run your script again your text file will show checkboxes, both checked and unchecked!

Screenshot showing plain-text representation of checkboxes
Representing checkboxes as plain text

You can customize your script to display other formatting. For example, if you want to show italics, you can replace the HTML for italics with a *, right after doing the wget. Things like tables aren’t going to work well, nor will it be easy to display images on your desktop…at least not without customizing your script further. GeekTool can display images, but personally I don’t have the need.

Hope this helps. Mainly I use this for keeping my to-do list upfront every day. I also share some notes with friends and since they’re displayed on my desktop I can see when someone updates them. It’s also great for seeing notes that are frequently edited on a cell phone later that evening. If you try this out it would be great to hear what kinds of notes you use this for.

If you have trouble you can download some sample files from Ishcray’s Dropbox.

About the author

I like learning, programming, and creating. I'm an incessant problem solver, and have an insatiable desire to absorb information. I'm an information sponge. A critical thinker. My left brain and right brain function as one. Business and technology should be one. I invest based on opportunity or technicals, whichever is right. I never let my schooling interfere with my education. Marketing is not fluff, it is data-driven. I find patterns, and analyze the random. I like to teach and explain.
13 Responses
  1. Nicholas

    When trying to run in Terminal, I’m getting “syntax error near unexpected token `(‘ ” in this section of the script ” awk ‘{gsub(“]*>”, “”); “. I don’t use carets, so there shouldn’t be any modifications I need to make. Any idea as to what’s going wrong?

      1. Matt

        I get the same error. Here is my script


        /usr/local/bin/wget -q -O – temp.txt evernoteUrl | sed -n ‘/note-content/,/save-button-mobile/p’ | awk ‘{gsub(“]*>”, “”); gsub(“> “, “”); gsub(“>”, “”)} 1′ | tail -n +3 | sed -n -e :a -e ’1,2!{P;N;D;};N;ba’ | awk ‘{$1=$1}1′ | awk ‘/./’| awk ‘ {print;} NR % 1 == 0 { print “”; }’ > /Volumes/Cortex/mtv/Documents/Geeklets/evernote-output-quotes.txt

        1. Nikhil Haas

          Matt and Nicholas – try typing your script out from scratch in a text editor. I got that same error when I copied the code from the browser into a script. But if I type out the script by hand then it works. It seems that pasting the apostrophes and quotation marks from the browser causes issues.

          Matt, I typed out your script and it runs fine now:

          /usr/local/bin/wget -q -O – temp.txt evernoteURL | sed -n ‘/note-content/,/save-button-mobile/p’ | awk ‘{gsub(“]*>”, “”); gsub(“> “, “”); gsub(“>”, “”)} 1’ | tail -n +3 | sed -n -e :a -e ‘1,2!{P;N;D;};N;ba’ | awk ‘{$1=$1}1’ | awk ‘/./’ | awk ‘ {print;} NR % 1 == 0 { print “”; }’ > /Volumes/Cortex/mtv/Documents/Geeklets/evernote-output-quotes.txt

  2. Moritz Milde

    how do I create a .plist correctly… everytime I create a .txt file with content and than transform it into a .plist XCode is telling me the format is wrong? please help

  3. Nikhil Haas

    Hi Moritz, for some reason your comments weren’t posted. I’ve provided a link to some files in Dropbox that should work for you. Just put in your URL and the path to the file. If nothing is writing to the file I would start from scratch and run your script each time you add new pieces of code to it (starting from just downloading the entire HTML file) so you can identify where it is failing.

  4. CC

    This is just what I’ve been looking for. However, it turns out that Mavericks does not include wget. I’m working on downloading Xcode and compiling wget, but have you tried to do this with curl instead of wget?

    1. Nikhil Haas

      Glad to hear this helps. I don’t have much experience with curl, but it shouldn’t make a difference if you use that instead. Both curl and wget will download the HTML for you, you’ll only have to replace the first wget command with the curl equivalent. It will probably be something like this: /usr/local/bin/curl -o temp.txt….

    2. Nikhil Haas

      You might need to put curl in silent mode (you’ll have to look up the command for that); the pipes in the code will pass curl’s output to the next command along with the note’s HTML.

  5. Anders

    Thanks for the great work!

    I am very new to command line work in the terminal but have been able to follow along fairly easily. That being said, a .txt file is created, but nothing is written into it. I have installed wget in usr/local/bin. Here’s my code:

    /usr/local/bin/wget -q -O – test.txt evernoteURL | sed -n ‘/note-content/,/save-button-mobile/p’ | awk ‘{gsub(“]*>”, “”); gsub(“> “, “”); gsub(“>”, “”)} 1’ | tail -n +3 | sed -n -e :a -e ‘1,2!{P;N;D;};N;ba’ | awk ‘{$1=$1}1’ | awk ‘/./’| awk ‘ {print;} NR % 1 == 0 { print “”; }’ > /Users/andersfrederiksen/Documents/ToDoList/todolist.txt

    1. Nikhil Haas

      Thank you! I’d suggest that you open terminal and begin with the most basic command: wget -q -O test.txt evernoteURL > /Users/ander…/todolist.txt. If you get the HTML from your URL into the file, then the problem is in the rest of the code. You can build each part one by one in the terminal, as well. The | just passes the output of the previous command to the next one, so after each | we’re really just trimming down the originally downloaded HTML a little bit at a time, until we save our work to the text file with > /Users…. If you run these commands in the terminal then you can debug any errors you might get. You won’t need the shebang in Terminal. I also provided a link to my own files (in the Dropbox), which you can use if you just replace the URL and the path to you text file. If that doesn’t work you’ll have to debug in Terminal. You might need to install wget. Hope that helps.

Leave a Reply