An open API service indexing awesome lists of open source software.

https://github.com/paepckehh/daylight

location based information about daylight for humans, not robots (a, sunrise, sunset, noon, current status (app/lib/api)
https://github.com/paepckehh/daylight

daylight geolocation go golang gps location sun sunrise sunset

Last synced: 4 months ago
JSON representation

location based information about daylight for humans, not robots (a, sunrise, sunset, noon, current status (app/lib/api)

Awesome Lists containing this project

README

          

# OVERVIEW
[![Go Reference](https://pkg.go.dev/badge/paepcke.de/daylight.svg)](https://pkg.go.dev/paepcke.de/daylight) [![Go Report Card](https://goreportcard.com/badge/paepcke.de/daylight)](https://goreportcard.com/report/paepcke.de/daylight) [![Go Build](https://github.com/paepckehh/daylight/actions/workflows/golang.yml/badge.svg)](https://github.com/paepckehh/daylight/actions/workflows/golang.yml)

Do you need to collaborate in a worldwide distributed team?

![ai_generated_cat_in_front_of_a_sunrise](https://github.com/paepckehh/paepckehh/raw/main/artwork/daylightXS.png)

[paepcke.de/daylight](https://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 or imports.

Backend is a minimized, boiled down internal and heavy adapted static
refactored fork of [github.com/sj14/astral](https://github.com/sj14/astral),
who was forked from [github.com/sffjunkie/astral](https://github.com/sffjunkie/astral).
See pkg sun/sun.go for details (ALL CREDITS GOES TO THE AUTHOR(S))

# RUN

```
IATA=BER go install paepcke.de/daylight/cmd/daylight@latest
```

# INSTALL

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

[github.com/paepckehh/daylight/releases](https://github.com/paepckehh/daylight/releases)

# SHOWTIME (APP)

## Set location via gps coordinates.
```Shell
GPS_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.
```Shell
IATA=BER 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](https://pkg.go.dev/paepcke.de/daylight)

# ARTWORK

Generated by OpenAI.

# CONTRIBUTION

Yes, Please! PRs Welcome!