daylight

package module
v0.1.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

README

OVERVIEW

Go Reference Go Report Card Go Build

Do you need to collaborate in a worldwide distributed team?

ai_generated_cat_in_front_of_a_sunrise

paepcke.de/daylight

The human brainstem will always adjust performance according to available daylight. If you want your team to perform optimally, take into account the local available daylight, disregarding artificial time zones and banking hours.

100% pure golang, lib/api has no external dependencies Example app has one. Use it as APP or api (see api.go).

Backend is a minimized, boiled down and heavy adapted static fork of github.com/sj14/astral, who is afork of github.com/sffjunkie/astral. see pkg sun/sun.go for details (ALL CREDITS GOES TO THE AUTHOR(S))

INSTALL

go install paepcke.de/daylight/cmd/daylight@latest
DOWNLOAD (prebuild)

github.com/paepckehh/daylight/releases

SHOWTIME (APP)

Set location via gps coordinates.

GSP_LAT=53.564432 GPS_LONG=9.95118 daylight 
Sunrise: 04:00:39 || Sunset 18:37:09 || Noon: 11:18:23 || Daylight: 14h36m30s

Set location via nearest 3 letter Airport code.

IATA=TXL daylight 
Sunrise: 04:00:39 || Sunset 18:37:09 || Noon: 11:18:23 || Daylight: 14h36m30s

Ask if we have daylight @ Berlin

IATA=BER daylight ask
true

Ask if we have daylight @ Perth

IATA=PER daylight ask
false

Set Shell env variablesv via 3 letter Airport code

IATA=PER daylight unix 
#!/bin/sh
export GPS_LAT="-31.94"
export GPS_LONG="115.97"
export GPS_ELEVATION="0"
export GPS_SUN_RISE="23:04:38"
export GPS_SUN_SET="09:21:26"
export GPS_SUN_NOON="04:13:07"
export GPS_SUN_DAYLIGHT="10h16m48s"

DOCS

pkg.go.dev/paepcke.de/daylight

ARTWORK

Generated by OpenAI.

CONTRIBUTION

Yes, Please! PRs Welcome!

Documentation

Overview

package daylight provides information about site local sunrise, sunset, daylight phase

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Daylight

func Daylight(loc *Location)

Daylight calc site local data

func Display

func Display(loc *Location)

Display prepares the information as ascii output files

func IsDay

func IsDay(loc *Location) bool

IsDay responds true if site local is daylight phase

func Script

func Script(loc *Location)

Script provides an unix env variable script

Types

type Location

type Location struct {
	Latitude    float64
	Longitude   float64
	Elevation   float64
	Sunrise     time.Time
	Sunset      time.Time
	Noon        time.Time
	LongestDay  bool
	ShortestDay bool
	Daylight    time.Duration
}

Location holds the site configuration

func NewLocation

func NewLocation() *Location

NewLocation provides an default location

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL