Sunrise and Sunset Times (sunwait)

From KlavoWiki
Revision as of 00:34, 9 March 2024 by David (Sọ̀rọ̀ | contribs) (Created page with "<pre> cd /opt git clone https://github.com/risacher/sunwait cd sunwait make </pre> <pre> #!/bin/bash # Replace with your actual latitude and longitude # NOTE: the N and E after the lat and long value. # Right click on Google Maps location for coordinates. LATITUDE="48.8566N" LONGITUDE="2.3522E" # Get sunrise and sunset times SUNRISE=$(/opt/sunwait/sunwait list rise offset 0:00:00 $LATITUDE $LONGITUDE) SUNSET=$(/opt/sunwait/sunwait list set offset 0:00:00 $LATITUDE $L...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
cd /opt
git clone https://github.com/risacher/sunwait
cd sunwait
make


#!/bin/bash

# Replace with your actual latitude and longitude
# NOTE: the N and E after the lat and long value.
# Right click on Google Maps location for coordinates.
LATITUDE="48.8566N"
LONGITUDE="2.3522E"

# Get sunrise and sunset times
SUNRISE=$(/opt/sunwait/sunwait list rise offset 0:00:00 $LATITUDE $LONGITUDE)
SUNSET=$(/opt/sunwait/sunwait list set offset 0:00:00 $LATITUDE $LONGITUDE)

# Print the times
echo "Sunrise time: $SUNRISE"
echo "Sunset time: $SUNSET"

Cateogry : Linux