Now I've written a terminal app for this (Mac/Linux)
Features: a colorful summary of daylight times for your location; projected change over the coming days; handles NO_COLOR and a ---short flag if you dislike the output format.
The location is IP-based but you can override this if you're on a VPN. Just create a terminal alias with the --loc flag. The app supports areas in the arctic / antarctic circle too.
Check our the repository for a preview and instructions on how you can install it with Homebrew.
(There is a Windows build but it's not yet tested)
I immediately checked how you do location lookups:
> IP lookup is powered by https://ipinfo.io. They provide a good service so please don't spam requests.
There was a thread about them recently — the scale of their operation was very surprising.
(setq calendar-latitude 12.3456
calendar-longitude -98.7654)
Then, you can `M-x sunrise-sunset` and see the times (and total daylight hours) in the echo area.(Probably not the nicest code and no doubt I've broken a lot of Go idioms, but it was a good learning exercise)
IPInfo is a good service and their developer relations were surprisingly relaxed about me (mis)using their API this way
You can also override the Timezone with `--timezone` (passing an IANA timezone e.g. America/New_York).
Internally, when it comes to API requests, we are doing our best to reach an "unlimited" level of API requests. On the operational side, we are just getting started. The distributed network of a thousand servers we operate only runs a handful of diagnostic tests (ping, traceroute, etc.).
We have a lot of plans, and I hope you will find us providing more fun stuff as we continue to grow!
https://ipinfo.io/blog/ipinfos-ip-hunt-2-2-million-ips-submi...
This is just our user base, to be honest and we like them for their mindset. We are happy to see users try our service in different ways and we learn a ton from them in that process. I certainly learned from you :)