Anki like note reminders

I use my simple note system to scribble down thoughts, project descriptions, reminders from meetings and the usual note kinda stuff.

Despite of its intrinsic value, most notes gets written down and never revisited. Here is a short snippet that, based on the note's dated titles, email me the note after 2, 7, 14 and 30 days. The repetitions are carefully chosen spaced intervals after the Anki method, optimized for making stuff easier to remember.

#!/bin/bash

notes_dir="$HOME/sync/notes/"
interval="2 7 14 30"

email="note-reminder@torvald.no"

for i in $interval; do
    date=$(date --date="$i days ago" +"%Y-%m-%d")
    while read -r file; do
        subject=$(echo "$i days since $file" | sed "s,$notes_dir,,")
        cat "$file" | mail -r "Note reminder <$email>" -s "$subject" "$email"
    done < <(find "$notes_dir" | grep "$date")
done

I simply have this snippet in my crontab.

screenshot An test email.