I went through a bunch of note-taking apps before I settled on a git directory that's auto-synced once an hour. This bash script is all it takes. cd ~/notes if [[ ''$(git status --porcelain) ]]; then git stash save git pull --rebase git stash pop || true git add . git -c "user.name=Phil Kulak" -c "user.email=nope@kulak.us" commit -m "''$(date)" git push origin main else git pull fi
I also use vdirsyncer with DavX to sync my phone's calendar and contacts to my notes directory, so that is backed up as well - all in the same syncing script.
#!/usr/bin/env bash
cp -a ~/.vdirsyncer/calendars/ ~/Notes/pim/
cp -a ~/.vdirsyncer/contacts/ ~/Notes/pim/
git add \*
git commit -am "$(hostname)"
git pull
git push
echo ''
git status