Building a personal note-taking tool

Homebrew

© Photo by Robert Anasch on Unsplash

© Photo by Robert Anasch on Unsplash

Article from Issue 253/2021
Author(s):

If you're tired of the privacy problems and feature bloat of high-end note-taking utilities, try rolling your own.

For many people, online note-taking and time management tools are useful and sometimes essential, but they come with a potential privacy cost. I decided to try to build a usable replacement for the services I had come to rely on using some simple Linux tools and a Raspberry Pi.

If you are like me, your phone is a constant companion in both work and free time. I work as a sys admin and part-time writer, and I have come to rely on "free" note-taking apps to keep track of work, jot down ideas, and generally manage my life. I started out with the now-defunct Catch Notes in the early '00s; the ability to write a quick note on my phone and have near-instant access to it on my PC via a browser (and vice-versa) made Catch Notes an invaluable tool. I could write a note on my phone, then open it on the PC to paste it into a document or follow a link, without having to manually save or import anything on either platform. Being able to add a simple reminder to to-do items was handy too.

Sadly, Catch Notes went the way of so many '00s startups and shut down. Forced to look elsewhere, I exported my notes and imported them into Evernote. Although Evernote was undeniably useful, it was a noticeably more commercial tool that was moving away from the simplicity I craved. Moreover, it began to worry me that my data – my precious shopping lists, ideas for a novel, and other random jottings (but nevertheless MY data) – was being held on someone else's computer and could in theory be lost if Evernote went out of business.

When Evernote announced a change to their subscription model that would restrict the number of devices from which I could access my notes, I decided enough was enough and resolved to take back control of my notes. But how?

Several options are available for self-hosting note-taking apps, including powerful suites such as Nextcloud and sophisticated notebook apps such as Joplin. However, these tools were either overkill (I didn't need an entire groupware suite such as Nextcloud just to use one notes plugin) or too inflexible and tied to certain apps or platforms. I felt certain that most, if not all, of what I needed probably existed on my Linux PC already. I just needed to tie the pieces together, the Unix way.

File Format

Choosing a file format was crucial. I prefer to use plain text wherever possible, as you can find a text editor on pretty much any platform and it can easily be converted to other formats if required. In order to give more options for formatting and embedding links, I decided to use Markdown, which allows me to add simple formatting such as italics and bold text by adding asterisks around words or mark some lines as headings with a #, for example.

Storage

I could see some advantages to storing notes in a database (fast indexing and searching, for example), but for me, the benefits of a database were outweighed by the simplicity of storing notes as plain files in a directory tree. A tree of text files is still searchable, and it fits my requirement for not being tied to any particular platform. I could easily run an SQL database on my Linux PC but not so much on my phone.

So, notes are stored in a folder called Notes as plain text files. Subfolders underneath Notes allow me to stick notes in categories, if required, as follows:

Notes
   Important
   Writing
   Ideas
   Organizing

For physical storage, I decided to use a Raspberry Pi server that I run with a USB drive plugged in for extra space. The Pi's main job is a home media server, but it also runs a simple lighttpd web server that I use for various projects. In this case, though, all it needs to do is store the Notes folder and sync with the other platforms that I use.

Synchronizing

To sync data between the Pi, my laptop, and my phone, I decided to use Syncthing [1]. Syncthing is really easy to set up and does one job – keep folders in sync between different devices. If I make a change to the Notes folder on my PC (by adding a note or editing an existing note), Syncthing will replicate the change to the Pi and from there to my phone.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News