Created
April 15, 2020 06:55
-
-
Save asigner/0795ea706cdbcee19e8de64b457d24df to your computer and use it in GitHub Desktop.
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
# Function to create a journal entry for the day and open it in VSCode. | |
# The following structure is create in $HOME/wiki or $WIKI_ROOT when set. | |
# | |
# journal: | |
# - 2019: | |
# - 12-December: | |
# - 2020-12-24.md | |
# - 2020-12-25.md | |
# - 2020-12-26.md | |
# - 2020: | |
# - 01-Januar: | |
# - 2020-01-01.md | |
# - 2020-01-02.md | |
function jc { | |
mkdir -p "${WIKI_ROOT:-$HOME/wiki}/journal/$(date +'%Y/%m-%B')" \ | |
&& code --folder-uri="${WIKI_ROOT:-$HOME/wiki}" --file-uri="${WIKI_ROOT:-$HOME/wiki}/journal/$(date +'%Y/%m-%B/%Y-%m-%d.md')" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment