17 May 2010

Importing Planet Events into Google Calendar

Deep-Sky Planner 5 can produce reports in various file formats. HTML is popular for users that have a website for their planning information or observing log. Text and CSV are popular for moving data into spreadsheets, but another use popped up recently that I'd like to share.

I wanted to plan some summer camping trips around new moon dates. Since I use Google Calendar, I looked into the possibility of importing moon phase information generated in Deep-Sky Planner's Planet Events report into my Google Calendar. Since Google publishes the import file format, it was easy to convert the CSV format file produced by Deep-Sky Planner into the CSV file format required by Google Calendar. The script could also be used to produce a file with the dates of eclipses, the dates of opposition, greatest elongations, etc.

I wrote a simple script that performs the conversion. I use Python for most scripting tasks like this, so I have made the script available on the Files section of the Deep-Sky Planner Yahoo group. The script is written for Python 2.6 and can be run from a command prompt. If you use Python, that would be something like:

python EventToGoogleCalendar.py

The script prompts you for input and output files. Once you've converted the file, you need to log into your Google Calendar and import the file.

If you prefer a different script language, you can use the Python script as an example in writing your own script. Of course, the idea of sharing planet event information with a personal calendar is applicable to other calendar services. The key is having a calendar service that has import capability and publishes import file format.

No comments:

Post a Comment