Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 4.22 KB

README.md

File metadata and controls

49 lines (37 loc) · 4.22 KB

Panchangam

This project computes a Pañcāṅgam for a given location and given year. It uses planetary positions from the jyotisha project to (somewhat accurately) calculate important aspects of a day, particularly the five āṅgams, viz. tithi (moon phase), nakshatram (asterism), yogam, karaṇam and vāram, and also the occurrence of various Hindu festivals, which are usually decided by elaborate rules dependent on the (combinations of the) āṅgams.

Key Features

  1. Generate an A3 PDF of a monthly calendar using Python / TeX (using gen_monthly_cal.sh or write_monthly_panchangam_tex.py)
  2. Generate an A5 PDF of a daily calendar using Python / TeX (using gen_daily_cal.sh or write_daily_panchangam_tex.py)
  3. Generate an ICS calendar file for using with calendaring applications (using gen_ics.sh or write_panchangam_ics.py)

The PDFs and ICS are best generated using a Devanagari (and Tamil) scripts, though IAST works as well (mostly).

Installation

See this issue.

Make sure you have the necessary Python/TeX packages installed, as mentioned below.

Dependencies

  • Both Python 3 and LaTeX are necessary to generate the panchangam PDFs; to generate the ICS alone, only Python 3 suffices
  • Python: jyotisha.
  • XeLaTeX / fontspec and a few other 'regular' packages
  • Fonts: Sanskrit 2003, Candara, Vijaya (for Tamil)

Usage

Organisation

There are helpful scripts in the bin folder, while the Python codes are in the https://github.com/sanskrit-coders/jyotisha repository. Generated PDFs will go to the pdf folder and .ics files will go to the ics folder, from which they can be imported into any calendaring application.

There is a web interface to the same library - please see https://github.com/sanskrit-coders/jyotisha repository for details.

Examples

Please refer to required setup above.

cd panchangam/bin
./gen_daily_cal.sh Chennai 13:05:24 80:16:12 'Asia/Calcutta' 2017 devanagari lagna
./gen_monthly_cal.sh Chennai 13:05:24 80:16:12 'Asia/Calcutta' 2017 devanagari
./gen_ics.sh Chennai 13:05:24 80:16:12 'Asia/Calcutta' 2017 devanagari

The above codes generate two PDF files (daily-cal-2017-Chennai-deva.pdf, cal-2017-Chennai-deva.pdf) and an ICS file (Chennai-2017-devanagari.ics) in the pdf and ics folders respectively.

Downloadable Panchangams (PDF/ICS)

City Monthly Calendar Daily Calendar ICS Calendar
Chennai (13°05'24''N, 80°16'12''E) A3 PDF Kindle friendly PDF Devanagari / IAST names
Mumbai (18°57'36''N, 72°49'12''E) A3 PDF Kindle friendly PDF
London (51°30'00''N, 0°07'00''E) A3 PDF Kindle friendly PDF IAST
Palo Alto (37°23'59''N, 122°08'34''W) A3 PDF Kindle friendly PDF Devanagari / IAST

Documentation & References

Currently, the documentation is sparse, but I hope to populate more in the docs folder. There are also some useful references in the docs/ref folder.