At the Forge - Dynamically Generated Calendars

Want to remind your Web site's users about upcoming events or get the whole company synced on a common calendar? Get started creating iCalendar files with Python.
Conclusion

This month, we looked at the creation of a dynamic calendar using the iCalendar module for Python wrapped inside of a simple CGI program. At the same time, we saw the limitations of having a calendar whose entries need to be on disk. A better solution would be to put that event information in a relational database, which has built-in support for dates, as well as security mechanisms for user and group access. Next month, we will extend our calendar program so that it retrieves information from a database, turning PostgreSQL tables into iCalendar files.

Resources for this article: /article/8197.

Reuven M. Lerner, a longtime Web/database consultant and developer, now is a graduate student in the Learning Sciences program at Northwestern University. His Weblog is at altneuland.lerner.co.il, and you can reach him at reuven@lerner.co.il.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The webpage for this module s

ewindisch's picture

The webpage for this module seems to have been moved to http://codespeak.net/icalendar/ where there are much more current releases available than reviewed here. Amongst other things, it now supports installation via the command "python setup.py install"

The old webpage still exists and makes no acknowledgement of the new site, thus I understand the author's confusion.

iCalendar/vCalendar

Anonymous's picture

I really liked the article, and I like where it's going. I'm a member of more than one non-profit org that would benefit greatly from a calendar system like the one proposed.

Unfortunately, MS Outlook, the calendar used by most of the members, does not seem to like iCalendar files generated by Mozilla. I don't know if MSO's iCalendar/vCalendar import works at all.

On MSO 2000, it just says it can't read the file. On MSO 2003, it displays the message

"This error can appear if you have attempted to save a recurring Lunar appointment in iCalendar format.
To avoid this error, set the appointment option to Gregorian instead of Lunar."

So I tried a file that had only 2 appointments, both non-recurring. Still got the same message. Configuring Mozilla to store universal time didn't help either.
MSO will not export an .ics/.vcs file, so it's difficult to see what it thinks is a good example.

I think this problem will somehow have to be resolved to make this idea really useful, since unfortunately I can't dictate to the other members what calendar app they should use. Any ideas?

Thanks,
--Jeff in Austin, TX

MSO exports icalendar files j

Anonymous's picture

MSO exports icalendar files just fine. Just send an appointment using internet format or drag and drop an appointment on an email after setting the default format to iCalendar. Then you can examine the format of a MSO iCalendar file.

White Paper
Fabric-Based Computing Enables Optimized Hyperscale Data Centers

Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.

Learn More

Sponsored by AMD

White Paper
Red Hat White Paper: Using an Open Source Framework to Catch the Bad Guy

Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6

Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.

Learn more about catching the bad guy in this free white paper.

Learn More

Sponsored by DLT Solutions