My criteria for a good note taker is as follows:
- Easy to organize topics / create note
- Full text search
- Sync a copy to internet
- Todo list and other tags in note
- Mathematics formula support
- Simple item folding and expanding
- The editor is stable and feature rich
- At best plain text, to access anywhere
I can roughly classify the notes I am taking. Thus I made several directories: cosmology, computer, etc. Then I put the following line in my .bashrc:
em () { emacsclient --alternate-editor="" -n -c $1; }
takenote () { em /home/wangyi/Dropbox/elite/$1/$2.org; }
nc () { takenote cosmology $1; }
ncs () { takenote computer $1; }
# and a number of other note directories
t () { takenote links todo; }
d () { takenote diary $(date +'%Y-%m-%d'); }
To search notes (also in .bashrc): I use "ns keyword" to search the keyword in all note directories, with matched key word highlighted in red; and then"nse keyword number" to open the note with listed number. "nf" lists all available note files and "nfe number" edit the file with listed number.
RED=`echo -e '\033[31m'` BLUE=`echo -e '\033[34m'` NORMAL=`echo -e '\033[0m'` # replace [number] by the same thing with blue color bluenumber () { sed -e "s/^\[\([0-9]*\)\] .*elite\//$BLUE\[\1\]$NORMAL /g" $1; } ns () { grep --exclude-dir=/home/wangyi/Dropbox/elite/00code -ri $1 /home/wangyi/Dropbox/elite | awk '{print "["NR"] " $0}'|sed -e "s/$1/$RED$1$NORMAL/ig" | bluenumber ; } nse () { em $(grep
--exclude-dir=/home/wangyi/Dropbox/elite/00code
-ril $1 /home/wangyi/Dropbox/elite/ | awk -v LINENUM="$2" '{if (NR==LINENUM) print $0}'); } nf () { find /home/wangyi/Dropbox/elite/ -name *.org | grep -v diary | awk '{print "["NR"] " $0}' | bluenumber; } nfe () { em $(find /home/wangyi/Dropbox/elite/ -name *.org | awk -v LINENUM="$1" '{if (NR==LINENUM) print $0}'); } nhelp() { cat /home/wangyi/Dropbox/elite/computer/note_commands.org; }
Sorry the above script is not well structured, but it works for months now...
No comments:
Post a Comment