2024-11-17 03:48:51 +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](https://github.com/junegunn/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](https://github.com/junegunn/fzf)
|
|
|
|
|
|
|
|
Then add the following aliases to your `~/.bashrc`:
|
|
|
|
|
|
|
|
```bash
|
2024-11-18 02:37:24 +00:00
|
|
|
# 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"
|
2024-11-17 03:48:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
To add a new note:
|
|
|
|
|
|
|
|
```bash
|
2024-11-18 02:37:24 +00:00
|
|
|
ne
|
2024-11-17 03:48:51 +00:00
|
|
|
```
|
|
|
|
|
2024-11-18 02:37:24 +00:00
|
|
|
And then continue typing the note name and press Alt-Enter to create a new one.
|
|
|
|
|
2024-11-17 03:48:51 +00:00
|
|
|
To open a previously created note:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
ne
|
|
|
|
```
|
|
|
|
|
2024-11-18 02:37:24 +00:00
|
|
|
Then select a note you want to open and press Enter.
|
|
|
|
|
2024-11-17 03:48:51 +00:00
|
|
|
## License
|
|
|
|
|
|
|
|
Distributed under the terms of the BSD License
|