From: [email protected]
Date: 2017-05-25
Subject: Geeknote - Evernote at the command line

I've been an Evernote user for a long time. Evernote solved a prob-
lem that a lot of us had, knowledge workers in  particular:  I  get
important information from a variety of sources, but I have no sin-
gle place to organize all of it. I installed  Geeknote  so  that  I
could  have  access to Evernote in my terminal. It's an environment
with a lot of flexibility, and I can use vim to edit content.  When
I'm  away from my desktop, I can use the Evernote client for web or
one of their mobile apps to access my notes.

Installing Geeknote

First, don't use the  Github  repo  that  the  geeknote.me[1]  site
points  to. It's really old and its OAuth implementation is broken.
Instead, use the more up to date version at https://github.com/jef-
fkowalski/geeknote[2].

I'll  be using Homebrew for this install. If you don't already have
Homebrew installed, you can get it at brew.sh[3].

I used the following command on MacOS to install:

 `$brew  install   --HEAD   https://raw.githubusercontent.com/jef-
fkowalski/geeknote/master/geeknote.rb`

after the install, I had to login to my Evernote account.

 `$geeknote login`

It asked me for a 2FA key, but I didn't have 2FA enabled, so I just
left it blank and I was fine.

Using Geeknote

Using geeknote is pretty straightforward and the  documentation  is
very clear. The commands are a bit verbose, however. Given that the
goal of Evernote is to help you capture information quickly, I  set
up  some  bash  functions  to  make common use cases (create, find,
show,  edit)  more  accessible.  I  added  these  functions  to  my
bash_profile.

 ```
 function gn {
   if [ "$1" ]; then
     geeknote create --content WRITE --title "$*"
   fi
 }
 function gf {
   if [ "$1" ]; then
     geeknote find --search "$*"
   fi
 }
 function gs {
   if [ "$1" ]; then
     geeknote show "$*"
   fi
 }
 function ge {
   if [ "$1" ]; then
     geeknote edit "$*"
   fi
 }
 ```

After  adding these to your .bash_profile or .bashrc, you will need
to source the file to make these functions available in the shell.
 `$source .bash_profile`

Create a new note

When I want to quickly capture a note, I enter a command that looks
like this:
 `$gn  This is the Title of my Note` Geeknote will dump me into my
editor so I can capture my notes.  When I save and  exit,  geeknote
will upload my new note to Evernote.

Finding notes

Since searching is faster than browsing (assuming you know what you
are looking for), I can search for content like this:
 `$gf keyboard` and geeknote will give me  a  listing  of  all  my
notes  that  include  the  word  *keyboard*. To show or edit one of
these notes, I can use my `gs` or `ge` commands along with the  in-
dex  of the note I want to show or edit. Geeknote, by the way, sup-
ports markdown for formatting.

Upload content

Another trick lets you dump the contents of a (text) file into  ev-
ernote:
 `geeknote  --title  "Note Title" --content filename.txt` Geeknote
will upload the contents of filename.txt into a new note  with  the
title Note Title.

Geeknote  has a number of other features that will let you make use
of tags and reminders. With shell integration tools, there are lots
of  cool things you could do to automatically add notes to Evernote
or make information capture fast and fun. If you really  just  want
to browse through your notes, or if using images is required, using
the desktop, mobile, and web clients are better for those use  cas-
es.

[1]: geeknote.me
[2]: https://github.com/jeffkowalski/geeknote
[3]: https://brew.sh/