Skip to content
WonderMrPublic

About

Python prototype that computes lunar days with PyEphem and adds them to Google Calendar

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

pyMoonCal

pyMoonCal is a small Python script that calculates lunar days (the periods from one moonrise to the next) for the current lunar month at your location and adds them to Google Calendar as "Moon Day N" events. It is aimed at people who follow a lunar calendar and want the lunar days in their regular calendar. Key pieces: PyEphem (moon rise times and new moons), Windows geolocation (winsdk) and the Google Calendar API with a service account.

Status: unfinished prototype (last change in 2023). The lunar-day calculation is implemented, but the event-creation step has known bugs and does not create events yet; see AGENTS.md.

Requirements

  • Windows (location is read through the Windows geolocation API).
  • Python 3 with ephem, numpy, google-auth, google-api-python-client and winsdk (package names inferred from the imports; there is no requirements file).
  • A Google Cloud service account key saved as .keys/client_secret.json next to the scripts. This path is git-ignored; never commit the key.

Usage

python pyMoon.py

Intended behaviour: the script prints the start and end of the current lunar month, then checks Google Calendar for each "Moon Day" event and creates the missing ones.

Files

  • pyMoon.py: main script.
  • cal.py: Google Calendar helpers.
  • loc.py: current coordinates from Windows geolocation.

About

Python prototype that computes lunar days with PyEphem and adds them to Google Calendar

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages