3-year academic calendar Penn home Campus Maps Penn 
Calendar Penn Directories Penn A-Z Penn home
Calendar
previous day  Friday, September 19, 2014  next day Reserve a facility
dayweekmonthyear Help Submit an event
SEPTEMBER    2014
Su Mo Tu We Th Fr Sa
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
           
OCTOBER    2014
Su Mo Tu We Th Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
           

SEARCH BY:
Student-sponsored
Advanced Search
All Events
My View
Penn Calendar Export

3-yr Academic Calendar
 
 SAMPLE DATAFEED APPLICATIONS All events
 
Introduction

The DataFeed feature of the Penn Calendar allows users to retrieve data from Penn Calendar and incorporate it with their own web-site.

The DataFeed types are:

  • XML 1.0 (default)
  • JavaScript 1.3
  • RSS 0.91
  • RSS 2.0
  • iCalendar 2.0 (a.k.a. iCal)
  • Tab delimited file
  • HTML
The arguments available for the DataFeed are the same as for the Penn Calendar

For example, to display today's Exhibitions:

http://www.upenn.edu/calendar-export?category=5

Or, to display an individual owner's events:

http://www.upenn.edu/calendar-export?ownername=editor

Another example, to display events from more than one owner (aggregate owner):

http://www.upenn.edu/calendar-export?ownername=editor&ownername=athletics-ceo-only

DataFeed also includes one feature not directly available in the Penn Calendar.

showndays (show n day(s))

showndays allows the user to specify how many upcoming days to display, including the current day. For example, to display a week's worth of events, the associated URL would be:

http://www.upenn.edu/calendar-export?showndays=7

showndays can also be used with the month,day, and year attribues to display a historical view of past events. The following example displays events from the first week of September 2001:

http://www.upenn.edu/calendar-export?showndays=7year=2001&month=9&day=1

showndays and ownernames can be combined together to create custom views. For example, to display a week's worth of events for a specific owner, the associated URL would be:

http://www.upenn.edu/calendar-export?showndays=7&ownername=editor

Use of DataFeed

Use of DataFeed assumes that the user has a rudimentary knowledge of how to use the format being exported. For high-volume sites it is recommended that DataFeed be queried no more than once an hour.

Samples:

The following sample code is provided as a starting point for incorporating DataFeed data. Please feel free to submit your own examples to calendar@upenn.edu to be included on this page.

XML (default):

XML provides flexibility for incorporating Penn Calendar data. Server-side applications ASP, .NET, Python, Perl, PHP, ColdFusion, JSP, etc.. are all capable of parsing XML data.

http://www.upenn.edu/cgi-bin/calendar/calendar?view=datafeed

The following PHP code will dynamically retrieve data from the Penn Calendar. Please note that this may cause page load delays as the data is retrieved. This is example code only. For a high volume site it is not recommended that you use this script to load the data, because it will exert a large load on the Penn Calendar. Instead a script that retrieves the XML export at set intervals is recommended.

JavaScript:

The following JavaScript code will dynamically retrieve data from the Penn Calendar. Please note that this may cause page load delays as the data is retrieved. Furthermore users with older web browsers or who have disabled JavaScript will not be able to view the JavaScript output.

Place the following code within the HTML contents of your page.

http://www.upenn.edu/calendar-export?type=javascript

RSS:

Based on XML this format provides a "stripped down" export of Penn Calendar data.

http://www.upenn.edu/calendar-export?type=rss

RSS2:

Based on RSS 2.0 specification this format provides a "stripped down" export of Penn Calendar data. RSS 2.0 is compatible with newer RSS readers (i.e. Mozilla's Firefox web browser)

http://www.upenn.edu/calendar-export?type=rss2

iCalendar 2.0:

This format (sometimes refered to as ".ics") is recognized by many popular calendaring programs including MS Outlook and Apple iCal. Individual events may be imported or subscribed to. Please see your calendaring programs documentation to determine compatibility with the Penn Calendar iCalendar 2.0 Data Feed.

webcal://www.upenn.edu/calendar-export?type=ical2

TAB Delimited File:

Simple tab delimited file, useful for importing into various programs.

http://www.upenn.edu/calendar-export?type=tab

HTML:

Simple formatting in HTML. Suitable for use with hand-held devices.

http://www.upenn.edu/calendar-export?type=html

SSI:

For web providers hosted on www.upenn.edu ONLY

http://www.upenn.edu/calendar-export?type=ssi

Calendar can be included on a pages hosted on www.upenn.edu by adding:

<!--#include virtual="/cgi-bin/calendar/calendar?view=datafeed&type=ssi" -->

to the HTML source of a webpage located on www.upenn.edu

This site participates in Penn's Single Sign-On process SSO footer badge

Copyright © 2014, University of Pennsylvania
3451 Walnut Street, Philadelphia, PA 19104 · 215-898-5000
Copyright Information |