- Notifications
You must be signed in to change notification settings - Fork97
🌖 ASCII Art Phase of the Moon (Python version)
License
chubin/pyphoon
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ASCII Art Phase of the Moon (Python version)
Based on the original version of Jef Poskanzerjef@mail.acme.com (Twitter: @jef_poskanzer)written in Pascal in 1979 (and later translated by himself into C, and now by me into Python).
$ sudo snap install pyphoon --edge$ pyphoon --helpusage: pyphoon [-h] [-n LINES] [-x] [-l [LANGUAGE]] [-s {north,south} | -S {north,south}] [date]Show Phase of the Moonpositional arguments: date Date for that the phase of the Moon must be shown. Today by defaultoptional arguments: -h, --help show this help message and exit -n LINES, --lines LINES Number of lines to display (size of the moon) -x, --notext Print no additional information, just the moon -l [LANGUAGE], --language [LANGUAGE] locale for that the phase of the Moon must be shown. English by default -s {north,south}, --hemisphere {north,south} Earth hemisphere from which to observe the Moon. North by default -S {north,south}, --hemispherewarning {north,south} The same as -s and --hemisphere, but shows an hemisphere reminder under the phase text.By default the number of lines is 30 and the date is today.
Pyphoon only displays thenear side of the Moonbecause thefar side is never visible from Earth.This said, the near side either shows North pole up(for people living in northern Earth hemisphere)or South pole up(for people living in southern Earth hemisphere).This in turn changes the direction of the observable crescent:e.g. 🌒 or 🌘 for the first quarter.To accomodate this, pyphoon draws the moon as seen from either hemisphere on request,defaulting to-s northern hemisphere.If you happen to live in equatorial zones,then the Moon shows either pole updepending onhow you rotate your feet,so you only need to pick the one you like most.
Supported dateformats:
- 2016-Mar-01
- 2016-03-01
- 03-01-2016
- 03/01/2016
- etc.
Displayed information:
- time after the previous state (-)
- time to the next state (+)
- Hemisphere from which the moon is observed (with
-Sswitch on).
There are several changes in PyPhoon that were not present in the original Jef Pokazner's version of 1979:
- Localization: pyphoon is translated into many languages; language is configured using the system locale (
$LANG) - Hemisphere: pyphoon can show the moon as seen from the north or south hemisphere (south hemisphere is upside-down, waxes and wanes in the opposite direction).
- dateutil
Latest version:
pip install git+https://github.com/chubin/pyphoon.git.
Append--upgrade if you have an older version.
Longer way:
Assuming thatgit,python andpip are already installed,install pyphoon with the following commands in your O.S. terminal (bash, command prompt, powershell, etc):
git clone https://github.com/chubin/pyphooncd pyphoonpip install -r requirements.txtpython setup.py installafter that you can simply callpyphoon from your terminal.
If you don't have git installed to usegit clone, it's possible todownload this repository and unzip it instead.
Depending on your O.S. it may be needed to prependsudo topython setup.py install,or even changepython topython3 andpip topip3.
About
🌖 ASCII Art Phase of the Moon (Python version)
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
