[Cialug] Moon Me

Jonathan A. Kollasch jakllsch at kollasch.net
Fri Jul 13 16:14:29 UTC 2018


On Fri, Jul 13, 2018 at 10:26:17AM -0400, Todd Walton wrote:
> @ ~> grep -A8 'Moon me' ~/.bashrc
> # Moon me
> get-moon-status () { curl -s wttr.in/Moon -o ~/.last-moon-status; sed -ir
> 's/^[[:alnum:]].*$//' ~/.last-moon-status; }
> set-moon-status-date () { date '+%Y%j' > ~/.last-moon-status-date; }
> declare -i MOON_STATUS_DATE=$(cat ~/.last-moon-status-date 2> /dev/null);
> MOON_STATUS_DATE=${MOON_STATUS_DATE:-0}
> if [[ $(date '+%Y%j') -gt $MOON_STATUS_DATE ]]; then
>     get-moon-status;
>     set-moon-status-date;
>     cat ~/.last-moon-status;
> fi;

Or you could just install ACME phoon for offline use.

http://www.acme.com/software/phoon/

See also pom(6) from 'bsdgames'.

	Jonathan Kollasch


More information about the Cialug mailing list