Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #261840
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Sunrise and Sunset from terminal |
| Date | 2023-09-24 02:40 +0200 |
| Message-ID | <Hhlkd-b3LN-3@gated-at.bofh.it> (permalink) |
| References | <HhiPn-b1JP-3@gated-at.bofh.it> <Hhjs5-b2dz-3@gated-at.bofh.it> <HhjBL-b2hD-3@gated-at.bofh.it> <HhjV7-b2E2-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello,
On Sat, Sep 23, 2023 at 07:04:17PM -0400, Greg Wooledge wrote:
> So, what to do instead? I would first look for a data source that's
> not intended to be displayed by a Javascript-enabled web browser.
> Something that gives you the results in plain text would be great.
> I doubt such a thing can be found easily. Something that gives the
> results in, say, JSON or XML format might be easier to find.
Here's one:
$ curl -s 'https://api.sunrise-sunset.org/json?lat=51.509865&lng=-0.118092&formatted=0' | jq .
{
"results": {
"sunrise": "2023-09-24T05:47:54+00:00",
"sunset": "2023-09-24T17:57:14+00:00",
"solar_noon": "2023-09-24T11:52:34+00:00",
"day_length": 43760,
"civil_twilight_begin": "2023-09-24T05:16:19+00:00",
"civil_twilight_end": "2023-09-24T18:28:49+00:00",
"nautical_twilight_begin": "2023-09-24T04:37:02+00:00",
"nautical_twilight_end": "2023-09-24T19:08:06+00:00",
"astronomical_twilight_begin": "2023-09-24T03:56:14+00:00",
"astronomical_twilight_end": "2023-09-24T19:48:54+00:00"
},
"status": "OK"
}
The documentation is here:
https://sunrise-sunset.org/api
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Sunrise and Sunset from terminal "sl91@gmx.com" <sl91@gmx.com> - 2023-09-24 00:00 +0200
Re: Sunrise and Sunset from terminal ghe2001 <ghe2001@protonmail.com> - 2023-09-24 00:00 +0200
Re: Sunrise and Sunset from terminal piorunz <piorunz@gmx.com> - 2023-09-24 00:40 +0200
Re: Sunrise and Sunset from terminal Felix Miata <mrmazda@earthlink.net> - 2023-09-24 00:50 +0200
Re: Sunrise and Sunset from terminal piorunz <piorunz@gmx.com> - 2023-09-24 01:00 +0200
Re: Sunrise and Sunset from terminal Felix Miata <mrmazda@earthlink.net> - 2023-09-24 01:30 +0200
Re: Sunrise and Sunset from terminal piorunz <piorunz@gmx.com> - 2023-09-24 01:40 +0200
Re: Sunrise and Sunset from terminal Charles Curley <charlescurley@charlescurley.com> - 2023-09-24 05:00 +0200
Re: Sunrise and Sunset from terminal Greg Wooledge <greg@wooledge.org> - 2023-09-24 01:10 +0200
Re: Sunrise and Sunset from terminal piorunz <piorunz@gmx.com> - 2023-09-24 01:50 +0200
Re: Sunrise and Sunset from terminal Andy Smith <andy@strugglers.net> - 2023-09-24 02:40 +0200
Re: Sunrise and Sunset from terminal piorunz <piorunz@gmx.com> - 2023-09-24 03:00 +0200
Re: Sunrise and Sunset from terminal Greg Wooledge <greg@wooledge.org> - 2023-09-24 05:10 +0200
Re: Sunrise and Sunset from terminal Stefano <sl91@gmx.com> - 2023-09-24 11:30 +0200
Re: Sunrise and Sunset from terminal Nate Bargmann <n0nb@n0nb.us> - 2023-09-24 05:00 +0200
Re: Sunrise and Sunset from terminal Tom Browder <tom.browder@gmail.com> - 2023-09-24 22:40 +0200
Re: Sunrise and Sunset from terminal Carles Pina i Estany <carles@pina.cat> - 2023-09-27 12:20 +0200
Re: Sunrise and Sunset from terminal Curt <curty@free.fr> - 2023-09-27 17:50 +0200
Re: Sunrise and Sunset from terminal Sven Hoexter <sven@stormbind.net> - 2023-09-29 16:10 +0200
Re: Sunrise and Sunset from terminal Bruno Kleinert <fuddl@debian.org> - 2023-09-29 18:50 +0200
Re: Sunrise and Sunset from terminal Karl Vogel <vogelke@pobox.com> - 2023-09-29 23:40 +0200
csiph-web