{"id":30799421,"url":"https://github.com/triole/astrocalc","last_synced_at":"2025-09-05T19:12:07.120Z","repository":{"id":143197938,"uuid":"350330891","full_name":"triole/astrocalc","owner":"triole","description":"do some basic astro calculations related to moon and sun","archived":false,"fork":false,"pushed_at":"2024-08-28T22:10:50.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-29T22:57:48.449Z","etag":null,"topics":["astrocalc","moon","sun","suncalc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/triole.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-22T12:13:37.000Z","updated_at":"2024-08-28T22:10:53.000Z","dependencies_parsed_at":"2023-05-23T19:00:18.995Z","dependency_job_id":null,"html_url":"https://github.com/triole/astrocalc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/triole/astrocalc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fastrocalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fastrocalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fastrocalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fastrocalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triole","download_url":"https://codeload.github.com/triole/astrocalc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triole%2Fastrocalc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273806205,"owners_count":25171569,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["astrocalc","moon","sun","suncalc"],"created_at":"2025-09-05T19:11:51.710Z","updated_at":"2025-09-05T19:12:07.108Z","avatar_url":"https://github.com/triole.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Astrocalc ![build](https://github.com/triole/astrocalc/actions/workflows/build.yaml/badge.svg) ![test](https://github.com/triole/astrocalc/actions/workflows/test.yaml/badge.svg)\n\n\u003c!-- toc --\u003e\n\n- [Synopsis](#synopsis)\n- [Howto](#howto)\n- [Http server use](#http-server-use)\n- [Command line use](#command-line-use)\n- [Data output example](#data-output-example)\n\n\u003c!-- /toc --\u003e\n\n## Synopsis\n\nA command line tool to do simple astro calculations. Different output formats are supported.\n\n## Howto\n\n## Http server use\n\nRun `astrocalc -s` to spin up server. Do stuff like...\n\n```shell\ncurl http://localhost:8080?loc=london\n\ncurl http://localhost:8080?lat=51.5073509\u0026lon=-0.1277583\n```\n\n## Command line use\n\nRun for example `astrocalc london` or `astrocalc 51.507 -0.127`\n\n## Data output example\n\n```go mdox-exec=\"r london\"\n{\n  \"time\": \"2024-09-01T10:34:54.166370333+02:00\",\n  \"location\": {\n    \"lat\": 51.5073509,\n    \"lon\": -0.1277583,\n    \"name\": \"London\"\n  },\n  \"sun\": {\n    \"light\": {\n      \"dawn\": \"2024-09-01T04:40:05.100157952Z\",\n      \"dusk\": \"2024-09-01T19:23:50.837085952Z\",\n      \"golden_hour\": \"2024-09-01T18:04:21.184260352Z\",\n      \"golden_hour_end\": \"2024-09-01T05:59:34.752983296Z\",\n      \"nadir\": \"2024-09-01T00:01:57.968621824Z\",\n      \"nautical_dawn\": \"2024-09-01T03:57:18.178896896Z\",\n      \"nautical_dusk\": \"2024-09-01T20:06:37.758346752Z\",\n      \"night\": \"2024-09-01T20:53:50.73799168Z\",\n      \"night_end\": \"2024-09-01T03:10:05.199251968Z\",\n      \"solar_noon\": \"2024-09-01T12:01:57.968621824Z\",\n      \"sunrise\": \"2024-09-01T05:14:57.656500224Z\",\n      \"sunrise_end\": \"2024-09-01T05:18:29.378023424Z\",\n      \"sunset\": \"2024-09-01T18:48:58.280743424Z\",\n      \"sunset_start\": \"2024-09-01T18:45:26.559220224Z\"\n    },\n    \"position\": {\n      \"altitude\": 0.5180177725094327,\n      \"azimuth\": -1.100788368879874\n    }\n  },\n  \"moon\": {\n    \"light\": {\n      \"always_down\": false,\n      \"always_up\": false,\n      \"rise\": \"2024-09-01T04:00:00+02:00\",\n      \"set\": \"2024-09-01T20:00:00+02:00\"\n    },\n    \"position\": {\n      \"altitude\": 0.81738638265308,\n      \"azimuth\": -0.9305146132357468,\n      \"distance\": 398068.5939872828,\n      \"parallactic_angle\": -0.5540484171960416\n    },\n    \"illumination\": {\n      \"angle\": 2.1114360879257674,\n      \"fraction\": 0.026634652557527283,\n      \"phase\": 0.9478180102947805\n    }\n  }\n}\n```\n\n## Help\n\n```go mdox-exec=\"r -h\"\nUsage: astrocalc [\u003clocation\u003e ...] [flags]\n\nsimple astronomical calculation\n\nArguments:\n  [\u003clocation\u003e ...]    location to use\n\nFlags:\n  -h, --help             Show context-sensitive help.\n  -s, --server           run web server, http instead of command line use\n  -p, --port=8080        web web server port\n  -f, --format=\"json\"    output format, can be: json, toml, yaml\n  -V, --version-flag     display version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriole%2Fastrocalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriole%2Fastrocalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriole%2Fastrocalc/lists"}