# Summary: run `note <title>` to make a new note
# run `notes` to get a fuzzy finder (if available) to view all notes
function note() {
NOTE_DIR=~/Dropbox/notes
mkdir -p $NOTE_DIR || true
NOTE_NAME="$1"
if [[ -z $NOTE_NAME ]]; then
NOTE_NAME="$(date +%Y-%m-%d)"
else
NOTE_NAME="$(date +%Y-%m-%d)-$NOTE_NAME"
fi
vim $NOTE_DIR/$NOTE_NAME.txt
}
function notes() {
NOTE_DIR=~/Dropbox/notes
mkdir -p $NOTE_DIR || true
pushd $NOTE_DIR > /dev/null
# Use the fuzzy finder if available
if command_exists fzf; then
# Only open the selection if one was actually chosen
NOTEFILE=$(find * -type f -maxdepth 0 | fzf)
if [[ -n $NOTEFILE ]]; then
vim $NOTEFILE
fi
else
vim .
fi
popd > /dev/null
}
I dump my notes in my Dropbox folder so that I get sync for free. And fzf makes finding notes super easy.
Sweet! BTW, this was made by mattn of go-sqlite3 fame.
I had never heard of "peco" before, the self-describe "simplistic interactive filtering tool" that is called if you run $memo edit. Looks pretty handy!
Ease of use points for sure (I could use something like this), but why does it need HTTP calls? Sincere question— my Monday morning brain can't grasp it.
Looking at the code, it looks like that's a work in progress. You can start an http server and use a browser to browse and read your memos. It also looks like you can query for particular memos like you do in the CUI.
It could very well be that the author has plans to be able to create or edit memos using web calls, and pave the way for a browser based memo app.
It references some templates which I don't see in the repo, so not sure how far along it is. Maybe those are included in one of the dependencies.
# Logbook
function lb() { vim ~/Dropbox/logbooks/$(date '+%d-%m-%Y').md }