Child pages
  • Calendar on Windows
Skip to end of metadata
Go to start of metadata

Overview

With the abundance of computer screens throughout the college, and the almost identical computer statistics displayed on each one, there seems to be a wasted potential for conveying information to students. With a quick survey of the labs, one can see that the Windows boxes are the most popular and readily viewable computers in the building. By displaying upcoming calendar events on the Windows machines, students can be easily informed of happenings throughout the college.

Requirements

ccisevents

  • Python 2.4+
    • datetime
    • re
    • xml.dom.minidom
    • urllib2
  • env command Standard on unix?

Middle Layer

  • A web accessible machine
  • Cron daemon to run ccisevents every night

Windows Machines

  • BGInfo Already Installed
  • A way to restart BGInfo
    • Possible restart of lab computer nightly/weekly.

Process Flow

  1. A Cron job runs ccisevents. This should happen twice a day, to ensure all updates of calendars are captured
  2. The output of the script is piped into a text file in a web accessible directory on the box.
  3. The text file is taken by Systems and put into a secure location.
  4. The text file is read by the BGInfo process and parsed into the proper text for the computers.
  5. On restart of process/machine, new calendar events are displayed.

Details

ccisevents
As of revision 8 of the script, the script works in the following manner:

  1. The combined calendar is fetched off the calendar server in xml/atom format.
  2. The result is converted into a dom object, and all the 'entry' items are extracted.
  3. The date, title and summary of each event is extracted and converted into Event objects.
  4. The Event objects are passed into a Calendar object.
  5. That object cleans, breaks and outputs a string format of the events. That string is printed.

The script has the following default configuration variables:

Variable

Purpose

CURL

Provide base location of the calendar atom/xml

CSTART

How many days in the past to look for events. Default is 0.

CEND

How many days in the future to look for events. Default is 7.

CWIDTH

The number of characters wide to display the output

The script may be run by either changing it to executable and running straight from shell, or by running through python.

$ ./ccisevents [options]
$ python ccisevents

The script has a help option, found by running the command with the --help option.

Security

The whole process is a pull down system.
BGInfo >>pulls>> Text/Daemon >>pulls>> Calendar
The implementation is all on Crew and System machines, with no possibility of pushing hazardous code into any part.

Issues

As of revision 8, the Unicode seems to be solved.
As of revision 4, Unicode is an elusive bug. Though instances of it seem to be corrected in the parsing, more testing is necessary on unusual input. Also, tests should be issued for transferring unicode'd information from the Unix to Windows environment.

As of revision 8, the Windows machines are being restarted on a nightly basis. 
A major issue is the one of restarting the BGInfo process. While remotely restarting the process will accomplish this, if a CCIS user is logged in, this will wreak havoc on their background settings. The restart would be at night though, and this becomes an issue of leftover logins from the day. Systems is considering a nightly reboot of Windows machines to free up resources and login sessions at the moment, and this could solve the issue.

  • No labels