Sncli, use SimpleNote from the Ubuntu terminal

about sncli

In the next article we will take a look at sncli. This is a Python application that will allow users to access our account Simplenotote via command line. The application will give us the possibility to access our notes through a customizable GUI, which implements keys of type vi or through a simple command line interface.

With this application notes can be viewed, created or edited in both online and offline mode. All changes are cached locally on disk and automatically synced with our Simplenote account when sncli goes online.

General characteristics of sncli

example notes

  • The application provide us full bi-directional sync with Simplenote performed dynamically in the background. We will also be able to force this full two-way sync with Simplenote
  • All actions can be easily recorded and reviewed.
  • We will have the possibility of create a new note via stdin or using our favorite editor.
  • We can mark notes as markdown.
  • We will be able sort the notes by date, by title, labels and they can also be fixed at the top.
  • We can also search for notes using a Google-style search pattern or regular expression.
  • The application gives us the opportunity to view the content of the notes and metadata. Another thing that it will allow us to do is restore previous versions of notes.
  • We will have the possibility of create and edit notes using our editor, which we will have to configure.
  • We will be able edit the labels of each note.
  • The notes we remove them.
  • The program will offer us vi type keys, which are also fully configurable.
  • Colors are also fully configurable.

These are just a few features of this program. They can consult all of them in the project GitHub page.

Sncli installation

We can install this program using the PIP3 package manager. When we are sure that we have this package manager installed, in a terminal (Ctrl + Alt + T) we will only have to write:

sncli installation with pip3

pip3 install sncli

Sncli configuration

After the installation, the default configuration file path is /home/user-name/.snclirc. We are going to have to create this file ourselves, at least that's what I had to do while I tested this application. We can do this by typing in the terminal (Ctrl + Alt + T) the command:

touch ~/.snclirc

Configure username and password

Now we will have to add the necessary configuration to the file we just created to be able to use our account in SimpleNote. The template that we are going to add to the file will be something like the following:

[sncli]
cfg_sn_username = direccion-correo-cuenta-simplenote
cfg_sn_password = contraseña-cuenta-simplenote

Replace the email address and password with the ones you use to access SimpleNote.

Change the text editor to edit the notes

We will do this by editing the configuration file to put my nano notes as a text editor. Here you can use the editor that you like the most. In a terminal (Ctrl + Alt + T) we will only have to write:

nano ~/.snclirc

Now we will add this line below the credentials that we wrote in the previous point:

example configuration for sncli

cfg_editor = nano +{line}

Once the file is saved, we can write in the terminal:

sncli

The previous command without arguments, starts the application in the console. This will begin to sync all of our existing notes and we will see a log message at the bottom of the console. These log messages can be consulted at any time by pressing the key l.

Keyboard shortcuts

sncli help

The shortcuts are practically the same that we use in vim. But all of them can be consulted in the official program documentation or using its help, pressing the 'keyh' when we have the program open.

Cache

The notes are saved locally in the directory ~ / .sncli in .json format.

We can get more information about using this program from your page on GitHub or project website.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.