Inner Sea Calendars

Inner Sea Calendar

A while back I wrote a Pathfinder adventure set on Golarian which relied on the phases of the Moon. Wanting to keep things consistent, I knocked up a script to calculate the day of week and phase of Moon for any given day using the Inner Sea Calendar.

It can be found on GitHub as a python script (I don’t normally write Python, so it’s probably not the best code in the world).

I think that the algorithms are right, but at the very least they seem to give consistent results for my campaign. So I could keep track of events, I also modified it to output a whole month at a time so I could fill in the days on my campaign wiki.

Now I have another campaign which is based around lunar events, and for this I needed to print out the calendar on paper. Whilst tweaking it to output something to fit a printed page, I got a bit carried away and added support to include a different image for each month, with one month per page. In its basic form, it outputs a basic calendar for either an entire year, a month, or information on a single day. By default it uses Dokuwiki syntax, but can be told to output HTML.

inner_sea_calendar.py [--html] <year> [<month> [<day>]]

If a single day is specified, it just outputs the day of week and Moon phase:

$ inner_sea_calendar.py 4719 5 10
Fireday - Waxing Crescent

If you miss out the day, then it will generate a calendar for that month, or for all months in the year if you miss out the month. Adding the –images options to point at a directory full of numbered images, causes it to take each image for each month of the year, and generate a one month per page calendar. So specifying the following:

$ inner_sea_calendar.py --html --images ~/Pictures/months 4719

Will, assuming that the ~/Pictures/months directory contains files named like this (images aren’t included, you have to supply your own):

then it will generate HTML output something like this:

If you’re not interested in the pretty graphics, then you can simply use it to output plain text, which should put two months per page.

Samuel Penn