Plain-text note taking system
Find a file
2024-11-18 02:37:24 +00:00
flake.lock Add nix flake files 2024-11-17 03:52:35 +00:00
flake.nix Add nix flake files 2024-11-17 03:52:35 +00:00
LICENSE Initial version of the notes.sh rewrite 2024-11-17 03:48:51 +00:00
notes.sh Better integration with FZF 2024-11-18 02:37:24 +00:00
README.md Better integration with FZF 2024-11-18 02:37:24 +00:00

Plain-text note taking system

This is a script that helps you with taking notes and looking them up later. It uses a simple system of putting notes in individual directories under ~/Notes. The directory names look like 20241116091658-some_note, and each contains at least one note.md file.

The script doesn't have any user interface itself, but relies on a combination of fzf and your default $EDITOR.

The previous iteration of this tool used to store notes in MIME envelopes, but that created problems with opening the same note simultaneously from multiple places. So this version uses plain directories.

Features

  • No need to manually assign directory names (they are chosen for you and contain the note title)
  • Creating a new note is instant
  • Search by title is very fast / optimized. Even if you have thousands of notes
  • All notes have a unique ID which you can use to link between notes
  • The code is written in bash with standard Unix tools, and is easy to read

Getting started

  • Put notes.sh file from this repo somewhere to your $PATH
  • Install fzf

Then add the following aliases to your ~/.bashrc:

# Type "ne" to look up and edit an existing note, or create a new one
alias ne="notes.sh -l | fzf --tac --with-nth=\"2..-1\" --preview \"notes.sh -p {}\" --print-query --bind 'alt-enter:print-query' | xargs -o -d \"\n\" -n 2 notes.sh -f"

To add a new note:

ne

And then continue typing the note name and press Alt-Enter to create a new one.

To open a previously created note:

ne

Then select a note you want to open and press Enter.

License

Distributed under the terms of the BSD License