Crates.io | moon-phases |
lib.rs | moon-phases |
version | 0.3.3 |
source | src |
created_at | 2023-10-02 16:45:43.245144 |
updated_at | 2023-10-02 20:59:26.998937 |
description | Fast command-line application to show the moon phase |
homepage | |
repository | https://github.com/mirrorwitch/moon-phases |
max_upload_size | |
id | 990126 |
size | 30,173 |
Command-line application to show the moon phase for a given date and time, as a text string, emoji, or numeric value. It can also show the moon sign.
Designed to be fast, for use in window manager bars, shell prompts and the like. (On a raspberry pi 4, latency has been under 10ms for all modes; on a modern desktop, under 1.5ms.)
Based on the Schaefer algorithm as implemented by Fallen4Eyes's crate moon-phase
.
Accepts dates in any format from crate human-date-parser
, such as:
Includes an option to set Unicode variation characters for colour emoji or
monochrome text. See --help
for documentation.
$ moon-phases
Waning Gibbous
$ moon-phases 2023-10-31
Full
$ moon-phases --emoji # color or monochrome left for system to decide
🌕
$ moon-phases --text-emoji # displays as monochrome in browsers etc.
🌕︎
$ moon-phases --face-emoji "in 7 days"
🌜
$ moon-phases --numeric
0.60
$ moon-phases --numeric "next Friday"
0.94
$ moon-phases --zodiac
Taurus
$ moon-phases --zodiac --emoji
♉
Panicking when passed dates out of range rather than gracefully exiting (reported to human-date-parser https://github.com/technologicalMayhem/human-date-parser/issues/1 )