Kevin Schoon 7 months ago
162 commits
34ec4065 main
remove a few depicated usages
file commit size mode time
.gitignore bump/fix dependencies 40 B -rw-r--r-- 2 years ago
.ocamlformat clean up formatting 23 B -rw-r--r-- 3 years ago
LICENSE add LICENSE 33.7 KiB -rw-r--r-- 3 years ago
Makefile update delete doc generation 775 B -rw-r--r-- 2 years ago update README 3.2 KiB -rw-r--r-- 2 years ago
bin remove a few depicated usages NaN B d--------- 7 months ago
completion build updates NaN B d--------- 3 years ago
contrib update contrib scripts for sync support NaN B d--------- 3 years ago
doc revamp search/filter with regular expressions NaN B d--------- 3 years ago
dune-project refactor note as a (Ezjsonm.t * Omd.t) 28 B -rw-r--r-- 3 years ago
lib remove a few depicated usages NaN B d--------- 7 months ago
note.opam bump/fix dependencies 977 B -rw-r--r-- 2 years ago
nvim add basic neovim support NaN B d--------- 2 years ago
test remove a few depicated usages NaN B d--------- 7 months ago

Note 🐪

Note is a hierarchical based note taking application.


Package Managers

A package for ArchLinux is available on the AUR.

The Anatomy of a Note

A note is a simple markdown document that contains zero or more instances of structured data encoded as YAML or JSON. Notes can optionally contain front-matter at the head of each file, which is YAML or JSON enclosed by a pair of ---.

title: This is a Note
tags: [ocaml, programming]
# Hello World!
Today will be a nice day.


The behavior of note can be configured with yaml file stored in ~/.config/note/config.yaml and configure itself per the XDG Base Directory specification. You can view the resolved configuration by running note config:

state_dir: /home/kevin/.local/share/note
lock_file: /home/kevin/.local/share/note.lock
editor: nvim

Structured Data

Notes that contain code blocks with structured data as well as front-matter are automatically parsed and exposed via the command API.


note create -stdin <<EOF
# Musical Styles
- style: Bomba
- style: Plena
- style: Reggaetón
- style: Bachatón
# Now let's inspect the code block with jq
note cat -encoding json "Musical Styles" | jq .data[0]
"style": "Bomba",
"influenced": [
"style": "Plena"
"style": "Reggaetón",
"influenced": [
"style": "Bachatón"

The State Directory

Each note is stored as a flat file inside the state_dir with a slug that corresponds to the date (YYYYMMDD) on which it was created. If multiple notes are created on one day, an index will be appended to the file.

$ tree .
├── manifest.json

Persisting Notes with Git

If the on_modification configuration option is set it will be called each time a note is modified. This feature can be used to automatically commit your notes to a git repository with a script such as below:

# This is an example script that can be used in conjunction with the
# on_modification config option to commit every note change to a git
# repository. You'll need to place it somewhere on your $PATH. This
# script assumes that your state_dir is also a git repository.
set -e
STATE_DIR="$(note config -get state_dir)"
pushd "$STATE_DIR"
git add --all
git commit -m 'automated commit'

Web UI

Notes are stored in a format that is compatible with the static website generator Hugo and thus you can point your state_dir to a Hugo content directory and get a web based interface for all of your notes.







Kevin Schoon: 99%
Kevin Schoon: 0%


Recent Activity (90 days) 0 10 20 30 40 50 60 70 80 90 Composition [1662 LOC] OCaml Lua Makefile BASH Vim script 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%