relsqui / doily

A script for managing daily writing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optionally, insert timestamps when a file is opened/reopened.

relsqui opened this issue · comments

It's nice to know when exactly you were writing, especially when you come back after a pause. Given modification times, we could even note how long the gap was!

We might want to have some time formatting options. It wouldn't be necessary to implement this feature, but it wouldn't be that hard to add since we're just going to make a call to time anyway. (I'm not too worried about sanitization, since there's no one to hose but yourself.)

Here's a SO post relevant to the time gap thing: http://stackoverflow.com/questions/8903239/how-to-calculate-time-difference-in-bash-script

Removing from the milestone, since this is blocking on the plugin system.

Specifically, I want to use this date -ud "0 NEWTIMESTAMP seconds - OLDTIMESTAMP seconds" +"%H:%M:%S" which is from here http://stackoverflow.com/a/27442175/252125

This yields the date format that I use in my dailies: date +%-I:%M%P | sed 's/.$//'