This is a Scriptable script that makes a widget with various info about the sun, moon, and day length. I made it because all similar apps I tried were ad-filled, require you to sign up for a premium subscription, or just weren't customizable enough to show the exact info I want to see.
The widget shows:
- The current day length, and the difference from yesterday
- The current sunrise/sunset times, and the differences from yesterday
- The yearly min and max day lengths, and the "percent of the way" between them. For example, if the shortest day of the is 8h, the longest day is 16h, and the day length is currently 9h, it'll read 12.5%
- The current moon phase, illumination, and moonrise/moonset times
- The time and location of the last refresh
TODO actually good instructions, but you essentially need to copy
dist/Soluna.mjs into Scriptable, either via the UI or iCloud.
- Clone this repo
npm installdependencies- Copy
.example.envto.env - Optional: if you want to sync the build to your device's Scriptable storage
via iCloud Drive after each compilation change the
ICLOUD_SCRIPTABLE_PATHenv var.envto the correct value. - Optional: if you want to send
logstatements to an HTTP server instead of having to access them on-device, change theLOG_URLenv var in.envto your desired endpoint. A simple server that just prints everything POSTed to it is included and can be started withnode log-server.mjs. - Run
npm run dev, which will watch for changes tomain.mjsand build todist/Soluna (Dev).mjs - Run
npm run buildto write a production build todist/Soluna.mjs
