Add new script, move blog to better path.

This commit is contained in:
CronyAkatsuki 2024-03-23 21:33:00 +01:00
parent 7ce24d937c
commit 22a1922ce9
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,44 @@
#!/usr/bin/env sh
# Based on day script from mischavandenburg
# url: https://github.com/mischavandenburg/dotfiles/blob/main/scripts/day
today=$(date +"%Y-%m-%d")
tomorrow=$(date -d "tomorrow" '+%Y-%m-%d')
yesterday=$(date -d "yesterday" '+%Y-%m-%d')
file="$SECOND_BRAIN"'/periodic/daily/'"$today.md"
cd "$SECOND_BRAIN" || exit 1
new_note() {
touch "$file"
# Give me a nice format
cat <<EOF >"$file"
# $today
[[$yesterday]] - [[$tomorrow]]
## Intention
What do I want to achieve today and tomorrow?
## Tracking
- [ ] Cycle
- [ ] Strength training
- [ ] Watch a movie or tv show episode
- [ ] Play/finish a game
- [ ] Post a blog post
- [ ] Check servers
- [ ] Check backups
## Log
EOF
}
if [ ! -f "$file" ]; then
new_note
fi
nvim '+ normal Gzzo' "$file"