{"id":18027753,"url":"https://github.com/sj14/astral","last_synced_at":"2025-07-07T21:44:46.833Z","repository":{"id":52249317,"uuid":"356880697","full_name":"sj14/astral","owner":"sj14","description":"☀️ Go calculations for the position of the sun and moon.","archived":false,"fork":false,"pushed_at":"2024-10-28T16:44:44.000Z","size":4292,"stargazers_count":35,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-22T22:04:14.152Z","etag":null,"topics":["blue-hour","dawn","dusk","go","golang","golden-hour","hacktoberfest","midnight","moon","moon-phase","noon","sunrise","sunset"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sj14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-11T13:50:56.000Z","updated_at":"2024-10-28T16:43:11.000Z","dependencies_parsed_at":"2024-06-25T11:43:45.983Z","dependency_job_id":"8d0597ce-c115-44bf-ab39-0963d26c22f8","html_url":"https://github.com/sj14/astral","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fastral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fastral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fastral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sj14%2Fastral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sj14","download_url":"https://codeload.github.com/sj14/astral/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245769256,"owners_count":20669149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blue-hour","dawn","dusk","go","golang","golden-hour","hacktoberfest","midnight","moon","moon-phase","noon","sunrise","sunset"],"created_at":"2024-10-30T08:12:24.694Z","updated_at":"2025-03-27T02:30:58.798Z","avatar_url":"https://github.com/sj14.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Astral\n\n![Action](https://github.com/sj14/astral/workflows/Go/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sj14/astral)](https://goreportcard.com/report/github.com/sj14/astral)\n[![GoDoc](https://godoc.org/github.com/sj14/astral?status.png)](https://godoc.org/github.com/sj14/astral)\n\nCalculations for the position of the sun and moon.\n\nThis is a Go port of the Python [astral](https://github.com/sffjunkie/astral) package.\n\nThe `astral` package provides the means to calculate the following times of the sun:\n\n* dawn\n* sunrise\n* noon\n* midnight\n* sunset\n* dusk\n* daylight\n* night\n* twilight\n* blue hour\n* golden hour\n* ~~rahukaalam~~ TODO\n\nplus solar azimuth and elevation at a specific latitude/longitude.\nIt can also calculate the moon phase for a specific date.\n\n## CLI\n\nBesides the package for usage in you own programs, we also provide a tool for showing the data.\n\n![screenshot](screenshot.png)\n\n### Installation\n\n#### Homebrew\n\n```text\nbrew install sj14/tap/astral\n```\n\n#### Manually\n\n```text\ngo get -u github.com/sj14/astral/cmd/astral\n```\n\n### Usage\n\n```text\nUsage of astral:\n  -elev float\n        elevation of the observer\n  -lat float\n        latitude of the observer\n  -long float\n        longitude of the observer\n  -time string\n        day/time used for the calculation (defaults to current time)\n```\n\n### Example\n\n```text\n$ astral -lat 51.58 -long 6.52\nDate/Time\tFri Apr 30 21:12:11 CEST 2021\nLatitude\t51.58\nLongitude\t6.52\nElevation\t0\n\nDaylight\t14h48m11s\nNight-Time\t9h9m55s\nMoon Phase\tFull Moon (17.611222222222224)\n\nApr 30 03:39 (-17:32)   Dawn (Astronomical)\nApr 30 04:39 (-16:32)   Dawn (Nautical)\nApr 30 05:28 (-15:43)   Dawn (Civil)         Twilight Start    Blue Hour Start\nApr 30 05:43 (-15:28)   Golden Hour Start                      Blue Hour End\nApr 30 06:07 (-15:04)   Sunrise              Twilight End\nApr 30 06:53 (-14:18)   Golden Hour End\nApr 30 13:31 (-07:41)   Noon\nApr 30 20:09 (-01:02)   Golden Hour Start\nApr 30 20:55 (-00:16)   Sunset               Twilight Start\n┈┈┈┈┈┈ 21:12 ┈┈┈┈┈┈┈┈   ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈\nApr 30 21:19 (+00:07)   Golden Hour End                        Blue Hour Start\nApr 30 21:34 (+00:22)   Dusk (Civil)         Twilight End      Blue Hour End\nApr 30 22:24 (+01:12)   Dusk (Nautical)\nApr 30 23:25 (+02:13)   Dusk (Astronomical)\nMay  1 01:31 (+04:18)   Midnight\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsj14%2Fastral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsj14%2Fastral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsj14%2Fastral/lists"}