by beza1e1 · 15y ago · 0 comments
$ cat bin/journal
#!/bin/bash
FILE=${HOME}/Dropbox/journal.txt
echo >>${FILE}
date >>${FILE}
echo >>${FILE}
vim + ${FILE} jr () {
echo "---"
echo "\n##"`date +" %a %D %l:%M%P"` >> ~/journal.txt
cat >> ~/journal.txt
}
It usually emits 72 dashes, so that I can stay within that margin (manually, heh). Edited to not break HN. The '##' is because I habitually markdown format everything. #!/bin/bash
echo "%%" >> ~/.journal
date +"%a %Y-%m-%d :: %X" >> ~/.journal
cat - >> ~/.journalEdit: you also don't have file timestamps to show when an entry was actually written, in case that matters to you.
I also decided host the repo at bitbucket. This will let me have 'offsite' backups and the ability to pull my journal whenever I have a computer and internet... which is always.
I don't write daily though, only when I feel like it.