EDITOR=vim
journal() {
mkdir -p ~/journal/`date +%Y`
$EDITOR ~/journal/`date +%Y`/`date +%m-%d`
}
alias j=journal EDITOR=vim
journal() {
mkdir -p ~/journal/`date +%Y`
$EDITOR ~/journal/`date +%Y`/`date +%m-%d`
}
alias j=journal:-)
EDIT: guess I should have "/humor"
It has gone through multiple forms, once where i created a new file everyday, and it wasnt automated much. One day I realized I could be even MORE lazy and started automating a bit. Now i have one file, with a heading for each day. I have the vim command saved as an alias now 'journal'. It opens up the file, moves to the end, and enters insert mode :p
alias journal='vim "+normal Go" +startinsert /worklog/start_20160426'# Pull Notes to make sure you are completely up to date before editing.
function pull_notes() {
(
cd $NOTES_DIR
git stash
git pull
git stash pop
)
}# Push Notes up the git repo that these are attached to.
function push_notes() {
date=$(date)
(
cd $NOTES_DIR
git add .
if [[ $(git status -s) ]]; then
git commit -m "Notes Updated: $date"
git push
fi
)
}My scripts for writing, and recording audio:
(cd writes/journal/; vi $(date '+%Y-%m-%d-%H:%M:%S') -c 'startinsert')
arecord -D plughw:$1,0 ditties/$(date '+%Y-%m-%d-%H:%M:%S').wav -f FLOAT_LE -r 48000
It's a single, self-contained HTML file. You download it, add data, then overwrite the file with a new version which includes changes.
If you want to go fancy, you can install it on a server with Node.js and stuff, but there's not a need to go there.
These days you might run across some hiccups in getting it to work in your browser of choice. Over the years the browser vendors became less and less inclined to allow javascript and extensions attain local file editing permissions. That's pretty reasonable, but annoying.
A pretty decent alternative that I've been using for months, now, is an app called Tiddly Desktop. It's an NW.js-based app so it has no trouble accessing the local filesystems.
Never experienced any problems whatsoever across FF/Chrome/etc
I just generate a new HTML file with changes for saving.
Requires remembering to do something to save changes, but I come from the time where autosaving wasn't the norm anyway :)