{"id":27611660,"url":"https://github.com/pascal-fb-martin/housealmanac","last_synced_at":"2025-08-09T03:05:45.699Z","repository":{"id":287313051,"uuid":"964322762","full_name":"pascal-fb-martin/housealmanac","owner":"pascal-fb-martin","description":"A test and fallback service to provide rough estimates of sunrise and sunset time","archived":false,"fork":false,"pushed_at":"2025-04-17T17:55:23.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T08:09:04.621Z","etag":null,"topics":["almanac","service","sunrise","sunset","web"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pascal-fb-martin.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":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-11T03:14:58.000Z","updated_at":"2025-04-17T17:55:26.000Z","dependencies_parsed_at":"2025-04-11T04:33:58.323Z","dependency_job_id":null,"html_url":"https://github.com/pascal-fb-martin/housealmanac","commit_stats":null,"previous_names":["pascal-fb-martin/housealmanac"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-fb-martin%2Fhousealmanac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-fb-martin%2Fhousealmanac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-fb-martin%2Fhousealmanac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascal-fb-martin%2Fhousealmanac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pascal-fb-martin","download_url":"https://codeload.github.com/pascal-fb-martin/housealmanac/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250348897,"owners_count":21415907,"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":["almanac","service","sunrise","sunset","web"],"created_at":"2025-04-23T00:40:12.595Z","updated_at":"2025-08-09T03:05:45.670Z","avatar_url":"https://github.com/pascal-fb-martin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HouseAlmanac\nA fallback service providing rough estimates for almanac information\n\n## Overview\n\nThis service provides very rough data about the current day:\n- Sunrise time.\n- Sunset time.\n\nThese values are estimated based on mid-month static data (from a configuration file). The estimation uses a linear regression method.\n\nThe purpose of this service is either as a test tools for applications that depend on an almanac service, or as a fallback when Internet connectivity is not available.\n\nThis service has no web UI.\n\n## Installation\n\nThis service depends on the House series environment:\n* Install git, icoutils, openssl (libssl-dev).\n* Install [echttp](https://github.com/pascal-fb-martin/echttp)\n* Install [houseportal](https://github.com/pascal-fb-martin/houseportal)\n* Clone this repository.\n* make rebuild\n* sudo make install\n\n## Configuration\n\nThe HouseAlmanac service loads its configuration from the almanac.json file, which syntax matches the example below:\n```\n{\n    \"almanac\": {\n        \"sunrise\": [\"6:58\",\"6:33\",\"6:41\",\"6:24\",\"5:46\",\"5:42\",\"5:50\",\"6:16\",\"6:37\",\"6:54\",\"6:28\",\"6:49\"],\n        \"sunset\": [\"17:33\",\"17:59\",\"19:19\",\"19:49\",\"20:14\",\"20:31\",\"20:40\",\"19:57\",\"19:15\",\"19:33\",\"17:04\",\"17:08\"],\n        \"dst\": [\"03/09\",\"11/02\"]\n    }\n}\n```\n\nAll times are local time. the `dst` array represents the two DST changes dates, spring and fall.\n\nAn example of configuration for the Los Angeles area is provided.\n\n## Web API\n\nThe HouseAlmanac service support the following web requests:\n```\nGET /almanac/tonight\n```\nReturn JSON data that contains the following data for the upcoming or current\nnight:\n- .host: name of the responding host.\n- .timestamp: system time of the response, in seconds.\n- .almanac.priority: a priority level that matches the data quality.\n- .almanac.sunset: system time of tonight's sunset, in seconds (integer).\n- .almanac.sunrise: system time of tonight's sunrise, in seconds (integer).\n\nThe sunset time can be in the past, typically at night time.\n\nFor this statically configured fallback service, the priority is always 1 (low).\n\n```\nGET /almanac/today\n```\nReturn JSON data that contains the almanac data for this current day. The\nformat is the same as for the `/almanac/tonight` endpoint, except that both\nthe sunrise and sunset values are always for the current day.\n\n```\nGET /almanac/selftest\n```\nReturn the complete sunset and sunrise information for the whole year. In this response both the sunset and sunrise fields are arrays of 365 entries, and each entry is a string in the format \"MM/DD HH:MM\". Leap years are not considered (this is just a test endpoint).\n\n## Further References\n\nMore precise sunset and sunrise information can be obtained from [SunriseSunset](https://sunrise-sunset.org). See their [API](https://sunrise-sunset.org/api) for more information.\n\n## Debian Packaging\n\nThe provided Makefile supports building private Debian packages. These are _not_ official packages:\n\n- They do not follow all Debian policies.\n\n- They are not built using Debian standard conventions and tools.\n\n- The packaging is not separate from the upstream sources, and there is\n  no source package.\n\nTo build a Debian package, use the `debian-package` target:\n```\nmake debian-package\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascal-fb-martin%2Fhousealmanac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpascal-fb-martin%2Fhousealmanac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascal-fb-martin%2Fhousealmanac/lists"}