Hey, this seems like it could be really useful! I'm going to play with it for a few weeks and I might come back with some feedback or changes I've made! Thanks for sharing:)
Edit:
So I've edited the script to work on my mac. A neat difference with the date command on macOS seems to be the -j and -f options. It allowed me to turn your complex statement for getting the month from the week to just doing this: date -j -f "%Y-%W" $1 +"%B %Y"
I also had to specify the -e option for echo so that newlines weren't printed as the characters. Finally, I had to use \033 for the colours in dids rather than \e.
Hey, this seems like it could be really useful! I'm going to play with it for a few weeks and I might come back with some feedback or changes I've made! Thanks for sharing:)
Edit:
So I've edited the script to work on my mac. A neat difference with the
date
command on macOS seems to be the-j
and-f
options. It allowed me to turn your complex statement for getting the month from the week to just doing this:date -j -f "%Y-%W" $1 +"%B %Y"
I also had to specify the
-e
option for echo so that newlines weren't printed as the characters. Finally, I had to use\033
for the colours indids
rather than\e
.Gist: gist.github.com/shnupta/28231011ee...