QA Graphic

Evernote as a Backup Source

Ever Note Promo2

In this week's post, I want to show how easy it is to create note in EverNote using TextExpander and AppleScript. I do a lot of my development work in BBEdit and this would be a very handy thing to have. Because once in a while, when I make some major code changes, I want to back up the existing file in case my change doesn't work. In the past, I would just copy the file to the desktop, and as a result, I had a lot of files on my desktop.

I thought there must be an easy way to backup files that I am working on. With a some simple AppleScript and TextExpander, I am now able to backup my working document to Evernote.

Task Goal

Make it easy to backup whatever file I am working on in BBEdit into a new note EverNote with the filename as the title of the note.

Solution

Create a TextExpander Snippet to copy whatever file I am working on in BBEdit to a new note in EverNote.

TextExpander's AppleScript Snippet

I created a new BBEdit group and set it up so that any snippet that is in the group will only expand in BBEdit. This way if I accidentally type the abbreviation it won't create an empty Evernote Note.

This is the Snippet that I came up with:

Apple Scripts
tell application "BBEdit"
    set docname to name of text window 1
    set doctext to contents of window 1
end tell
tell application "Evernote"
    create note title docname with text doctext
end tell

I selected the following abbreviation: qz

How its Implemented

Now when I am in BBEdit, and I want to create a backup copy of my file, I just type in qz. That's it! A new note will be created in my default Notebook in Evernote. It will have the filename as the title.

Using this method as a backup makes it easy to do back up now, and I get the power of Evernote search and date feature. So I can easily find previous versions of my files whenever I need them.

Technical Note: I know this could have been implemented as an AppleScript menu item within BBEdit, but I wanted to show how you could apply this to other text editor applications other than BBEdit.

 

Enough Kasich, Enough....

This Kasich thing is just getting out of control, here's the latest email from the Romney for President Inc, team:

Friend, nearly every poll shows that both Trump and Cruz will get crushed by Hillary Clinton in the fall.
If we want to win the White House, there is only one Republican candidate who can defeat Hillary: Gov. John Kasich

Here's the pretty chart that they include:

Kasich Email Poll2

This is the numbers the Kasich team doesn't want you to focus on:

April Poll Numbers

Also in the email is this:

It's mathematically impossible for Ted Cruz to win enough delegates to secure the nomination. His claims otherwise are dishonest and it's time for our Party to unify behind the one candidate who can defeat Hillary.

Ted Cruz has spent millions of dollars attacking Gov. Kasich's record, misleading voters. The truth is, John Kasich has the conservative record that Ted Cruz can only dream about. After all, he is another one-term Senator.

Um sorry, but if it's "impossible for Ted Cruz to win enough delegates to secure the nomination" and he has five times as many delegates than you have...um are you using Common Core Math in your calculations?

Sorry John Weaver, Chief Strategist of the Kasich, the team you are on is fighting a losing battle. One more thing, please stop calling me Friend.