Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

cbrandtbuffalo (4462)

cbrandtbuffalo
  (email not shown publicly)

Perl programmer at the University at Buffalo.
Monday July 02, 2007
07:21 AM

Help Wanted: Care to hack on a google calendar script?

[ #33656 ]
In case folks don't read the TPF blog, I need someone to help me out with a script that grabs info from the Perl calendar on Google calendar. I've got it started, just don't have the time right now to polish it.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I think this is related to my earlier post about the calendar [perl.org], and stennie is working on something to provide a generic feed from it. You might talk to him about how you'd like to tag conference events, but I think he's going to abuse the location input for that.

    My starter script is also available in that earlier post for anyone who wants to help.
    • I modified it a bit from that starter. After reading some of the docs, I think I can get data ranges and possibly specify the search as part of the request. Here's the script after my mods:


      #!/usr/bin/perl
      use strict;

      use Data::Dumper;
      use Template;
      use DateTime;

      use Net::Google::Calendar;

      my $url = "http://www.google.com/calendar/feeds/ngctmrd1cac35061mrjt3hpgng%40group.calenda r.google.com/public/full";

      my $cal = Net::Google::Calendar->new( url => $url );
      my $dt = DateTime->now();

      my @entries = ();

      # Here,
    • I have already provided working code to Jim, but I figured I would share for those following along at home:

      #!/usr/bin/perl
      use strict;
      use warnings;
      use Data::Dumper;
      use DateTime;
      use Getopt::Std;
      use Net::Google::Calendar;
      use XML::Atom::Util 'iso2dt';

      my %opt;
      get_args(\%opt);
      my (%data, %seen);

      my $cal = Net::Google::Calendar->new(url => $opt{url});

      # Google Calendar supports OR'd category queries
      # Google Calendar supports AND'd search string queries
      # Multiple fetches are required for OR'd search string queri
      • Hi - been trying to use this (and other) code, but cant seem to get any sense out of it - it logs on OK and seems to create a 'feed' object - but whatever I do the feed is empty - i.e. I can get the version - but no entries or calendars ... anyone seen this before - its got me stumped (am busy picking my way thorugh the ATOM code ... but its a bit out of my league ...)