Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🌖 ASCII Art Phase of the Moon (Python version)

License

NotificationsYou must be signed in to change notification settings

chubin/pyphoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyphoon

pyphoon

ASCII Art Phase of the Moon (Python version)

Screenshots

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).

Installation via snap

$ sudo snap install pyphoon --edge

Usage

$ 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-S switch on).

Own changes

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).

Dependencies

  • dateutil

Installation

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 install

after 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors20


[8]ページ先頭

©2009-2025 Movatter.jp