joecreighton / moon-phase Goto Github PK
View Code? Open in Web Editor NEWA widget for Übersicht.
License: MIT License
A widget for Übersicht.
License: MIT License
This widget expects you're running it for the location you're in, not some remote location.
The file timezone-snippet.txt grabs the remote time zone based on location and seems to work well for DST. I'm not sure there's a reason to have this; using the local date +%z
saves an API call.
The math to determine which icon to use looks right (and the proper code appears in console.error) but I'm a Javascript/Coffeescript/SVG neophyte. I need to learn why this is failing.
The file illumtab.txt.* is a plain text, space-formatted table of the moon's illumination from USNO, created and deleted by get-phase.sh. It's parsed using grep and cut to pull data from the proper row and column, which works well enough.
I have no idea if this can be done any other way given the format of the source data.
I have been getting a message "Failed to reach USNO illumination table" for about a week now. When I checked the USNO website it appears to be be unreachable... Anyone know what is going on?
It would be nice to have 30 icons instead of 28.
The icon font has a (roughly) 2.5:1 aspect ratio. Equatorial will widen the layout and might break the CSS display; should be no issue for the southern hemisphere (180 degree flip).
For more visual accuracy, one could rotate the icon based on the current phase. For example, a one-day old crescent will be rotated about 90 degrees as it leads/follows the sun.
I just have to figure out how.
Another API call to USNO would give an oversized image, good for the northern hemisphere only I suspect. It would have to be scaled and rotated on the fly. Or, collect a representative sample set.
I pull astronomical data from USNO but, as of today, the site is no longer serving the public:
"You have attempted to access a blocked website. Access to this website has been blocked for operational reasons by the DOD Enterprise-Level Protection System."
I've added a check to help with parsing this and I'll give the issue some time to resolve itself but I may be forced to switch data sources.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.