Licence
Creative Commons License

This work by Stephane KATTOOR is licensed under a Creative Commons Attribution 3.0 Unported License.
Feeling like tipping ?
If you find this blog useful, you might consider sending a few bitcoins to support it : 1BTtsC3beGJ6ysd8DhrXjdo6jVw5WD9mvY
RSS
 
RSS Feed
Follow me !
Tech@Sakana on Facebook
Search this site

Newsletter

Get latest posts by email (No spam, only posts):

Enter your email address:

Delivered by FeedBurner

Categories
Monthly archives
November 2005
M T W T F S S
    Dec »
 123456
78910111213
14151617181920
21222324252627
282930  
Month: November 2005
Parsing an ICal file with Perl - November 22, 2005 by Stephane Kattoor

I finally almost got it …

Here is a code snippet for parsing and showing pieces of an ICal file :

use strict;
use warnings;

use Data::ICal;
use Data::ICal::DateTime;
use DateTime;

my $cal = Data::ICal->new(filename => 'holidays.ics');

my @events = $cal->events();

foreach my $event (@events) {
        print "summary:", $event->property('summary')->[0]->value, "n";
        print "dtstart:", $event->start, "n";
        print "dtend:", $event->end, "n";
}
print DateTime->now, "n";

What I want to do ? Drive my home automation events with my Mozilla Calendar !! I’ll soon be there, if I gather enough time to do it !

Some pointers :

  • DateTime perl module : a hell of a lot of computations with dates and times
  • Data::ICal perl modules : for all the parsing stuff
  • Data::ICal::DateTime perl module : to get it to work with DateTime
  • Home automation - November 20, 2005 by Stephane Kattoor

    This is related to one of my geek hobbies : I am playing with home automation.

    Here is what I use :
    * Technology : x10
    * Software : MisterHouse
    * Hardware : a CM11, few AM12, LM12 etc

    This is really great since it allows you to control anything in your house (lights, washing machine, heaters, …) from your computer, while still being fairly simple.

    Using MisterHouse requires to know at least a little bit of Perl to get the most out of it, though.

    First post ! - November 20, 2005 by Stephane Kattoor

    Hello,

    My name is Stephane Kattoor, I work as an IT Engineer, and I created this blog with the idea to use it to store the little technical tips or hints I find in my every day work … with the hope it will help me and perhaps some others as well !

    Come from time to time, I plan to keep it updated !

    Stephane

    Who am I ?
    Ads