-
-
Save semifor/674716 to your computer and use it in GitHub Desktop.
Create/edit a journal entry for the current date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # Edit a "journal file" in YYYY-MM-DD.txt format for the current date in | |
| # ~/writings/journal or the specified directory (use '.' for the current | |
| # directory). | |
| EXT="txt" | |
| BASE=$(date +%Y-%m-%d) | |
| DIR=${1:-~/writings/journal} | |
| exec ${EDITOR:=vim} "$DIR/$BASE.$EXT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment