Import Sidearm athletic events RSS feed into UNL Event Publisher

20 views
Skip to first unread message

Kirk Turner-Rustin

unread,
Oct 22, 2012, 9:57:29 AM10/22/12
to unl-event...@googlegroups.com
Greetings, all:

At Ohio Wesleyan University, we've implemented a Perl script that parses athletic event information from our Sidearm RSS feed and automatically inserts or updates events in our UNL Event Publisher campus event calendar. In case any of you uses Sidearm and would like to do the same, I've attached the script to this message. I've marked places in the script where you'll need to make local changes with the word 'FIXME'.

Things to be aware of:
  • You'll need these Perl modules: DBI, DBD::mysql, LWP::UserAgent, XML::Simple.
  • The script uses database transactions to control inserts/updates, so be sure that your MySQL backend is InnoDB or some other engine that supports transactions. If you find that you're using an engine that doesn't support transactions, it's easy to change engines with a simple 'ALTER TABLE [tablename] ENGINE = [new-engine]'.
  • The script stores the Sidearm unique gameid number in event.privatecomment and uses that value to do updates on subsequent runs. If you use the privatecomment field for some other purpose, then you'll want to change that by repurposing some other field.
  • The user running the script must have his or her MySQL login credentials stored in a file named ".sqlscrt" in the user's home directory. See the script for details about the file.
  • We created location table records for 'Home' and 'Away' and point to one of those locations when creating the new event. You can get much fancier than that depending on how you setup your Sidearm RSS feed. Search the script for 'location' to see where to make changes.
That's it. Enjoy.

Cheers,
Kirk
Sidearm2UNLEvent.pl

Kirk Turner-Rustin

unread,
Nov 2, 2012, 1:36:05 PM11/2/12
to unl-event...@googlegroups.com
Folks:

Here's a bug fix release, using localstartdate and localenddate XML nodes for event start and end dates and times, instead of using the GMT equivalent.

Cheers,
Kirk
Sidearm2UNLEvent.pl
Reply all
Reply to author
Forward
0 new messages