# sun-moon-builder

> Create jpegs with data about sunrise/sunset and moonrise/moonset

Latest version **1.1.3** (published 2024-05-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install sun-moon-builder
pnpm add sun-moon-builder
yarn add sun-moon-builder
bun add sun-moon-builder
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2024-05-24 |
| First published | 2021-09-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 396 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 4 |
| Author | Ken Faubel |
| Maintainers | kfaubel |

## Links

- npm: https://www.npmjs.com/package/sun-moon-builder
- Repository: https://github.com/kfaubel/sun-moon-builder
- Homepage: https://github.com/kfaubel/sun-moon-builder#readme
- Issues: https://github.com/kfaubel/sun-moon-builder/issues
- npm.io page: https://npm.io/package/sun-moon-builder

## Dependencies (6)

- [axios](https://npm.io/package/axios.md) ^1.6.8
- [dotenv](https://npm.io/package/dotenv.md) ^16.4.5
- [moment](https://npm.io/package/moment.md) ^2.30.1
- [jpeg-js](https://npm.io/package/jpeg-js.md) ^0.4.4
- [pureimage](https://npm.io/package/pureimage.md) ^0.4.13
- [moment-timezone](https://npm.io/package/moment-timezone.md) ^0.5.45

## Recent versions

- 1.1.3 (latest) — 2024-05-24
- 1.1.2 — 2024-05-14
- 1.1.1 — 2023-08-10
- 1.1.0 — 2023-08-09
- 1.0.13 — 2022-05-24
- 1.0.12 — 2022-02-10
- 1.0.11 — 2022-02-04
- 1.0.10 — 2021-12-21
- 1.0.9 — 2021-12-15
- 1.0.8 — 2021-12-15
- 1.0.7 — 2021-12-13
- 1.0.6 — 2021-09-30
- 1.0.5 — 2021-09-20
- 1.0.4 — 2021-09-18
- 1.0.3 — 2021-09-18
- … 2 more at https://npm.io/package/sun-moon-builder/versions

## README

# sun-moon-builder
Retrieve sunrise/sunset, moonrise/moonset and create a graphic image

test.ts shows how to use the module

The normal use of this module is to build an npm module that can be used as part of a bigger progress.

index.d.ts describes the interface for the module

The LoggerInterface, KacheInterface and ImageWriterInterface interfaces are dependency injected into the module.  Simple versions are provided and used by the test wrapper.

Once instanciated, the CreateImages() method can be called to create today's current chart.

To use the test wrapper to build a screen, run the following command.  

```shell
$ git clone https://github.com/kfaubel/sun-moon-builder.git
$ cd sun-moon-builder
$ echo "IPGEOLOACATION_API_KEY=<key>" > .env
$ npm install
$ npm start
```

## Dependencies
You will need an API key from https://api.ipgeolocation.io

---
_Source: https://npm.io/package/sun-moon-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
