How to import Indian lunar calendar or Panchanga data into Aeon Timeline 3?

Is there any option to create or import data from Google Calendar or an Indian/Hindu calendar (such as via a Panchanga API) into Aeon Timeline 3?
I need a lunar calendar that includes Indian festivals and tithis. What’s the easiest way to set this up or integrate it with Aeon Timeline? Plz help me.

I can imagine two different approaches:

  1. You create a calendar consisting of eras that represent your desired system.
  2. You use a preset calendar and add one or more additional properties to your event type, which contain the date of one or more additional calendars.

We demonstrated an example of approach 1 last year with a zodiac calendar. In this case, I used a script to create a project template in AT2 format, which could then be imported and converted with AT3. If the time periods in your project are manageable, you can of course also enter the eras manually in your calendar definition. You would then need to obtain the data for this from an online Panchanga calculator.

For approach 2, I also have an example that I use regularly myself: My events have a moon phase property. Since I still use AT2, whose file format is easily accessible to me, I can generate the moon phases from a Python script and have them written to the project file. With AT3, however, something like this could work via csv export and reimport.
However, there are other solutions as well. It may be helpful to have a look at the corresponding thread in this forum.

I have AT3. My epic is quite large, almost a span of 3000 thousand year. That’s why i start using AT3. I have a free panchanga api. Is there any easy way to have/make a python script for that type of calender? Manually its almost impossible. Though I have zero knowledge about python but my friend is good in that. But He know nothing about AT3.

As I said, it depends on which of the two approaches you want to pursue. If you have a friend who is good at Python, that’s great. He might want to do a GitHub search for Panchanga to find Python code that either does the calculations or connects to the API.

So if you add your Panchanga dates as event properties (approach 2), this can be done via the Python standard library, using the csv module that reads and writes the csv file format as exported and imported by AT3.

In case you want to specify the entire calendar with Panchanga (approach 1), and there are lots of eras to be created, things are a bit more complicated. Then there’s no way around manipulating an AT file, and that requires a bit of investigative spirit. Your friend might find some inspiration in my code here. and here. There’s also a comprehensive discussion on the aeon file format here in the forum.

In any case, it can’t hurt to first create a calendar for a manageable period of time by hand to see if the result meets your needs. Only then is it worth considering automatically generating the calendar for the entire period.

Good luck,
Peter

1 Like

I must admit that I immediately thought of technical solutions without even knowing the exact problem. In the meantime, I’ve been doing a little digging around on the web and came across the following on Wikipedia:

Unlike the Gregorian calendar which adds additional days to the month to adjust for the mismatch between twelve lunar cycles (354 lunar days) and approximately 365 solar days, the Hindu calendar maintains the integrity of the lunar month, but inserts an extra full month, once every 32–33 months, to ensure that the festivals and crop-related rituals fall in the appropriate season.

So the question is how to create such a calendar with AT. Perhaps my approaches for the zodiac calendar and for the moon phase information are not so helpful here. It seems to me that the first step is to find the right approach to defining the months. The festive days and other events could then actually be generated as a CSV table using a Python script and imported with AT3. By the way: Can calendar markers also be imported via CSV in AT3?

1 Like

Thanks a lot, Peter. Just don’t know it’s possible or not. If someday in future AT3 let us put two calendars in one file, may be then it will be easy.

1 Like

I’m afraid the problem runs a little deeper than that. It’s quite possible that the Panchanga system of leap years cannot be modeled using the parameters of Aeon Timeline. So if we assume for now that we cannot generate a Panchanga calendar, the only option left is a workaround.

Could you accept using a Gregorian calendar and having the “Hindu date” as an event property? In this case, it would be relatively easy to implement the second approach presented above.

The workflow is as follows:

  1. Export your events as a CSV file. The CSV table should have a column for the Hindu date, let’s call it “Panchanga date.” The entries can be left blank.

  2. A Python script reads the events with their Gregorian dates and calculates a “Panchanga date” for each event, which it enters in the correct place.

  3. You let Aeon import the updated CSV file.

In your timeline view, you can display events with the “Panchanga date” property. However, the time scale will show Gregorian dates.

When you create a new event based on a Panchanga date you have defined, you must determine the corresponding Gregorian date outside of Aeon. You can then enter the Panchanga date manually. This may not be an issue for the events in your story if you insert them directly into the timeline view at short intervals. In that case, you can simply go through the workflow shown above from time to time to have the Panchanga dates added or updated.

You can generate Indian festivals and tithis as a CSV data set using a Python script and import them into Aeon. This definitely works with events. Of course, it would be more elegant to have them as calendar markers, which is why I asked the question above.

Programming the corresponding Python scripts is quite easy if you use the standard procedures for CSV processing (see above). However, as I mentioned earlier, you would need to find a suitable helper module for converting between the Gregorian and Hindu calendars. At first glance, though, the chances look good that there is something suitable out there.

3 Likes

Thanks a lot, Peter! Its just a wow idea. Let me talk with my frnd. May be it can be done. If we can do it, I must tell you. Thank you very much for the idea and as you elaborate the workflow that also lovely.
Yeah, if those dates are calender markers then it will be really great. But i think ‘half a loaf is better than none’.

Fine. If that works, you will have solved two other problems that were raised in this forum, namely multiple calendars and the year zero.

You might consider making your Python script open source and setting up a repository on GitHub. That would also be the right place to make an Aeon template available for download, in case you feel like it.

Best of luck,
Peter

1 Like

Hi all, just confirming that there is no way to import a calendar from Google, or an API. We might be able to make some suggestions though @Anku if we could get a bit more info from you.

  • Do you have a link to the source calendar you could share?

  • What are the key aspects of the calendar you would like to be able to implement?

  • Is there a certain visualization or workflow you would like to see?

That’s a very interesting workaround you’ve suggested there, thanks @Peter_T Let us know how you go with that @Anku

Also confirming that it’s not currently possible to import calendar markers. The dev team has taken it onboard as a feature request though.

1 Like

Hi AeonRob,

I try to answer one by one your Questions.

Actually, I currently use three different calendars:

  • Drik Panchang website for Hindu tithis, festival, lunar cycle, sunset-sunrise, indian month/season start-end date etc.
  • Time and Date for eclipses date (though drik-panchang eclipse links are good, but time and date show a very detailed map).
  • Google Calendar for Other Bengali and Indian celebration days like Independence Day, Birthdays of great personalities etc.

The GitHub link Peter shared — GitHub - webresh/drik-panchanga: Observational Indian lunisolar calendar using the Swiss ephemeris (Hindu Drik Panchanga). — seems almost perfect for my needs of Drikpanchang Tithis. Though I don’t have time to download and check it.

Okay, it’s a bit complicated. I think I’ve already explained what I need, but the challenging part is that I want these features to cover a very long time span — roughly a thousand years, about 800 years in the past and 200 years in the future.
I have over 400 events that are based on these special dates. Whenever I have to write a new special event , I have to conisder those tithi, and special dates.

If atleast I can put them as timeline marker (not manually :sob: its too much) then it will be great. Or if i put them just like an era type item (don’t know it can be done or not) that will be also ok.

Thanks a lot to u guys for answering my questions.

Are you using scrivener to write your epic? If so, then you could add a custom metadata field with Hindu exact date for each scene which could be imported into Aeon Timeline and appear in the Inspector. You could then use that information to create a new Item Type Hindu Eras (or a range ) and pick a date range for a group of events. These ranges could be used to filter Narrative events, or the timeline to isolate a group of events related by time to be isolated and analysed.

Added an Item Type Hindu Calendar (would have to set range and could include in info and add events based on keyword tags or text based calendar entry in custom metadata.

Now you can add entries to this and choose a date range
image

and now you use the items added to narrative events to filter your events based on the Hindu calendar values you assigned. Not perfect and not sure if this is what you want, but I hope it helps point you in the right direction.

1 Like

Yeah, I use scrivener. Thanks for suggestion, but those almost are like manual work. I also need lunar calendar marker to detect new moon days/ special day (like Diwali, Durga puja, Independence Day), though i dont have events for each of those days throughout 1000 years span, but its satisfying to see them whenever I an going to create a new event. Otherwise each time I have to consult those three (mainly two) calenders.
Example :
Like hero start journey. Lets start journey on 4 rth monday of August of 2025. Then i googled the date and - Oh no, this year that’s date is in Bhadra month in Bengali, hero cant start journey. Thats month is ominous in hindu culture.

This is the actual prblm with my epic timeline. For each special events I have to considered tithi or other dates. So if i can see those dates in a timeline then it will be easy for me to create a event on a suitable time.

2 Likes

I had some time today and wrote a script that reads the csv file exported by AT and writes it back with the changed “Panchanga Date.”
With that, your friend would only have to write the calculate_alternate_date() function.

In its current state, the script only enters the start date in the “Panchanga Date” property of the events, converting “BC” dates into negative dates in accordance with ISO 8601:2004 (including the year 0000).

This allows you to try out the workflow with a test project that has the new event property. If you have Python installed on your computer, all you need to do is drag the CSV file icon onto the Python script icon in Explorer.

Link to the Python script on GitHub

3 Likes

I see, maybe there is a calculator for putting in an American date and calculating the corresponding Lunar calendar dates so could then have the dates AT holds and add the Indian Dates as a custom metadata field. But you could create block variables as I suggested for periods of time to isolate the calendar so you could focus on events in period one, then shift to another time period for other story events.
A calculator would make it easier and the narrative event could have the other calendar information available. you can control what is seen on the narrative card.