Last active
July 22, 2020 02:15
-
-
Save pmbauer/9285d6a6c72fc86d9300f28042642ca6 to your computer and use it in GitHub Desktop.
roam weekly plan
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
#/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
roam_date() { | |
date -d "${*}" '+%B %eXX, %Y' \ | |
| sed -e 's/11XX/11th/; s/12XX/12th/; s/13XX/13th/' \ | |
-e 's/1XX/1st/; s/2XX/2nd/; s/3XX/3rd/' \ | |
-e 's/XX/th/; s/ / /' | |
} | |
ONE_DAY=$((60 * 60 * 24)) | |
week_start=$(date -d "${*:-next Monday}" "+%s") | |
cat <<END | |
Week:: [[$(roam_date @$((${week_start} + ${ONE_DAY} * 0)))]] | |
## Top Weekly Goals | |
## [[Weekly Habits]] | |
- | |
## Daily Goals | |
- Monday: [[$( roam_date @$((${week_start} + ${ONE_DAY} * 0)))]] | |
- Tuesday: [[$( roam_date @$((${week_start} + ${ONE_DAY} * 1)))]] | |
- Wednesday: [[$(roam_date @$((${week_start} + ${ONE_DAY} * 2)))]] | |
- Thursday: [[$( roam_date @$((${week_start} + ${ONE_DAY} * 3)))]] | |
- Friday: [[$( roam_date @$((${week_start} + ${ONE_DAY} * 4)))]] | |
- Saturday: [[$( roam_date @$((${week_start} + ${ONE_DAY} * 5)))]] | |
- Sunday: [[$( roam_date @$((${week_start} + ${ONE_DAY} * 6)))]] | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this on Manjaro linux and when I type "roam_wp" afterwards the terminal closes on me. Any idea why?
Thanks