How to use Evernote in Linux Command lines
This week, we continue to learn how to use Linux Command lines to manage and organize information. After you manage your personal expenses in the command line, I suggest you manage your notes in the command line, especially when you use Evernote to record pen notes. If you have never heard of it, Evernote has a user-friendly online service dedicated to synchronizing notes between different devices. In addition to providing fancy Web-Based APIS, Evernote also released clients on Windows, Mac, Android, and iOS. However, no official Linux client is available yet. To be honest, one of the many unofficial Linux clients attracts all command line enthusiasts as soon as it appears. It is Geeknote.
Install Geeknote
Geeknote is developed using Python. Therefore, before you start, make sure that you have installed Python (preferably version 2.7) and git.
In Debian, Ubuntu, and Linux Mint
- $ Sudo apt-get install python2.7 git python-setuptools
- $ Git clone git: // github.com/VitaliyRodnenko/geeknote.git
- $ Cd geeknote
- $ Sudo python2.7 setup. py install
In Fedora or CentOS/RHEL
- $ Sudo yum install git
- $ Git clone git: // github.com/VitaliyRodnenko/geeknote.git
- $ Cd geeknote
- $ Sudo python setup. py install
In Arch Linux
For ArchLinux users, you only need to use the package in AUR.
Basic use of Geeknote
Once you have installed Geeknote, you should associate Geeknote with your Evernote account:
- $ Geeknote login
Enter your email address, password, and your two-step verification code. If you do not have the latter, ignore it and press Enter.
Obviously, you need an Evernote account to complete these steps, so register first.
After that, you can create new notes and edit them.
First, you need to set your favorite Text Editor:
- $ Geeknote settings -- editor vim
Then, the syntax for creating a new note is:
- $ Geeknote create -- title [title of the new note] (-- content [content] -- tags [comma-separated tags] -- notebook [comma-separated notebooks])
In the preceding command, only 'title' is required. It is associated with the title of a new note. Other annotations can add additional metadata for the notes: Add tags to associate with your notes and specify to put them in that notebook. Similarly, if your title or content contains spaces, do not forget to put them in quotation marks.
For example:
- $ Geeknote create -- title "My note" -- content "This is a test note" -- tags "finance, business, important" -- notebook "Family"
Then you can edit your notes. Syntax is similar:
- $ Geeknote edit -- note [title of the note to edit] (-- title [new title] -- tags [new tags] -- notebook [new notebooks])
Note that the optional parameters, such as the new title, tag, and notebook, are used to modify the metadata of the notes. You can also rename the notes using the following command:
- $ Geeknote edit -- note [old title] -- title [new title]
Now the basic creation and editing are complete. More advanced features are search and deletion. You can search for your notes using the following syntax:
- $ Geeknote find -- search [text-to-search] -- tags [comma-separated tags] -- notebook [comma-separated notebooks] -- date [date-or-date-range] -- content-search
By default, the above commands search for notes by title. You can use the "-- content-search" option to search by content.
For example:
- $ Geeknote find -- search "* restaurant" -- notebooks "Family" -- date 31.03.2014-31.08.2014
Show notes with the specified title:
- $ Geeknote show [title]
One of my favorite tips is:
- $ Geeknote show "*"
This will display all the notes and allow you to select one.
Delete a note:
- $ Geeknote remove -- note [title]
Be careful that this is the real deletion. It will delete this note from cloud storage.
Finally, there are many options to manage tags and laptops. I think the most useful thing is to display the notebook list.
- $ Geeknote notebook-list
The following commands are very similar. As you can guess, you can use the following command to list all labels:
- $ Geeknote tag-list
Create a notebook:
- $ Geeknote notebook-create -- title [notebook title]
Create a tag:
- $ Geeknote tag-create -- title [tag title]
Once you understand the tips, it is obvious that these syntaxes are very natural and clear.
If you want to learn more, do not forget to view the official documentation.
Benefits
As a benefit, the gnsync tool provided by Geeknote allows you to synchronize data between Evernote and the local computer. However, I found its syntax a bit boring:
- $ Gnsync -- path [where to sync] (-- mask [what kind of file to sync] -- format [in which format] -- logpath [where to write the log] -- notebook [which notebook to use])
The meanings of these parameters are as follows.
- -- Path/home/adrien/Documents/notes/: Synchronize notes with Evernote.
- -- Mask "*. txt": Only plain text files are synchronized. By default, gnsync will attempt to synchronize all files.
- -- Format markdown: you want them to be in plain text or markdown format (the default format is plain text ).
- -- Logpath/home/adrien/gnsync. log: Location of the log to be synchronized. To prevent errors, gnsync writes log information there.
- -- Notebook "Family": the notebook to which the notes are synchronized. If you leave it blank, the program will create a notebook that uses your synchronization folder command.
In general, Geeknote is a pretty Evernote command line client. I personally do not often use Evernote, but it is still very beautiful and useful. On the one hand, the command line makes it extremely popular and easy to combine with shell scripts. In addition, there is a branch project of Geeknote on Git, which is called geeknote-improved-git on ArchLinux AUR. It seems that it has more features and is more active in development than other branches. I think it is worth looking.
What do you think about Geeknote? What do you want to use? Or do you prefer to use traditional programs? Let us know in the comment area.
This article permanently updates the link address: