Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #261974
| From | Sven Hoexter <sven@stormbind.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Sunrise and Sunset from terminal |
| Date | 2023-09-29 16:10 +0200 |
| Message-ID | <HjmlP-cn5J-3@gated-at.bofh.it> (permalink) |
| References | <HhiPn-b1JP-3@gated-at.bofh.it> <HizO9-bT9s-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Sep 27, 2023 at 11:12:02AM +0100, Carles Pina i Estany wrote:
>
> Hi,
>
> sudo apt install python3-ephem
>
> And in one line:
>
> """
> (LATITUDE=51.5; LONGITUDE=0.12; python3 -c "import ephem; o=ephem.Observer(); o.lat, o.lon = $LATITUDE, $LONGITUDE; print('Sunrise:', o.next_rising(ephem.Sun()).datetime(), 'Sunset:', o.next_setting(ephem.Sun()).datetime())")
> """
>
Some more options for the fun of it:
python3-suntime / https://github.com/SatAgro/suntime
I converted that code into a Lua script [1] to run it
on OpenWrt based systems, in case someone is up for something to
run in more constrained environments.
https://git.sven.stormbind.net/?p=sven/scripts.git;a=blob_plain;f=weblogpro/suntime.lua;hb=HEAD
Cheers,
Sven
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