I've built a similar system from scratch - also using this Dropbox daily notes file technique - except my script generates folders and sub folders for each year (YYYY) and each month within each year (YYY-MM) whenever I instantiate a file on a certain day. Makes long term management much easier than having thousands of files in one folder. Same grep principles apply (and I use hashtags within my notes to track keywords).
notes hello world appends the text to the YYYY-MM.txt dated file
echo cool | notes same as above except you can pipe in text
notes opens the YYYY-MM.txt file in your configured $EDITOR
I use all 3 methods of input on a regular basis depending on what I want to jot down.
I also manage my notes on the go by opening the Dropbox app on my phone and editing the txt files from there. Having subfolders helps with navigation on the Dropbox app.
It's a script called "d" (for diary) that I keep in my home folder. I try minimise mouse usage, so I've got a keyboard shortcut for opening a terminal, and then in the terminal I run ./d
=== start of script ===
#!/bin/bash
y=`date +%Y`;
ym=`date +%Y-%m`;
ymd=`date +%Y-%m-%d`;
if [ ! -d "Dropbox/diary/$y" ]; then
mkdir Dropbox/diary/$y
fi
if [ ! -d "Dropbox/diary/$y/$ym" ]; then
mkdir Dropbox/diary/$y/$ym
fi
vim Dropbox/diary/$y/$ym/$ymd.txt
=== end script ===
I could probably refactor the hell out of this. But I'm an old beard that prefers explicit readability. For example I don't need to use YYYY-MM for the month sub-folders (I could just use MM), and similarly I don't need the full YYYY-MM-DD.txt for the day files (I could just use DD.txt) - so your preference may vary.
And yeah I use .txt files because I can edit those natively in the Dropbox app on my phone too. Don't need any special apps installed to manage my notes on the go.
In terms of the contents of the files, I've kept the searchability really simple by using hashtags, example:
=== Dropbox/diary/2020/12/04.txt ===
## #keyword1 #keyword2
Here be notes on keyword1 and keyword2.
## #keyword3
Here be notes captured later on the same day on keyword3.
These can span multiple lines if I want.
## #keyword4
Here be notes on keyword4 captured even later in the day.
===
I use the single hashtag keyword system for quick grepping (and future indexing if I want to build a searchable database out of this one day), and the double hashtag ## at the start of each note snippet so that I can parse individual snippets more easily.