Wednesday, June 15. 2005
iCal to Remind script
Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Very nice! I tweaked it a little to work with Mac's iCal (changed @cals to the output from `find $cal_dir -name "*.ics"` since iCal puts its calendars in different directories).
I tried to install the iCal::Parser perl module, tried for hours, and don't know what to do, here is what it says:
MacBook:~ root# cpan -i iCal::Parser
CPAN: Storable loaded ok
Going to read /Users/sparc5/.cpan/Metadata
Database was generated on Wed, 18 Jul 2007 23:50:02 GMT
Running install for module iCal::Parser
The module iCal::Parser isn't available on CPAN.
Either the module has not yet been uploaded to CPAN, or it is
temporary unavailable. Please contact the author to find out
more about the status. Try 'i iCal::Parser'.
MacBook:~ root# cpan -i iCal::Parser
CPAN: Storable loaded ok
Going to read /Users/sparc5/.cpan/Metadata
Database was generated on Wed, 18 Jul 2007 23:50:02 GMT
Running install for module iCal::Parser
The module iCal::Parser isn't available on CPAN.
Either the module has not yet been uploaded to CPAN, or it is
temporary unavailable. Please contact the author to find out
more about the status. Try 'i iCal::Parser'.
On my Linux system, I have it installed:
# grep -i ical .cpan/Bundle/Snapshot_*.pm
DateTime::Event::ICal 0.09
DateTime::Format::ICal 0.08
Mail::DKIM::Canonicalization::Base undef
Mail::DKIM::Canonicalization::DkCommon undef
Mail::DKIM::Canonicalization::DkimCommon undef
Mail::DKIM::Canonicalization::dk_nofws undef
Mail::DKIM::Canonicalization::dk_simple undef
Mail::DKIM::Canonicalization::nowsp undef
Mail::DKIM::Canonicalization::relaxed undef
Mail::DKIM::Canonicalization::simple undef
iCal::Parser 1.14
Check your CPAN sources. Perhaps you're using a broken mirror.
You could also just download it from cpan.org and install it by hand. Not that you should have to do that, but it's better than running the same command for hours.
# grep -i ical .cpan/Bundle/Snapshot_*.pm
DateTime::Event::ICal 0.09
DateTime::Format::ICal 0.08
Mail::DKIM::Canonicalization::Base undef
Mail::DKIM::Canonicalization::DkCommon undef
Mail::DKIM::Canonicalization::DkimCommon undef
Mail::DKIM::Canonicalization::dk_nofws undef
Mail::DKIM::Canonicalization::dk_simple undef
Mail::DKIM::Canonicalization::nowsp undef
Mail::DKIM::Canonicalization::relaxed undef
Mail::DKIM::Canonicalization::simple undef
iCal::Parser 1.14
Check your CPAN sources. Perhaps you're using a broken mirror.
You could also just download it from cpan.org and install it by hand. Not that you should have to do that, but it's better than running the same command for hours.
A couple comments:
To users: If it complains about missing Perl modules, you may be able to install them like this as root:
cpan -i iCal::Parser
To the author: Could this be released under a standard open source license? Why not release it under the GPL? That allow the possibility that it could be distributed with 'remind', or at least through the same channels.
To users: If it complains about missing Perl modules, you may be able to install them like this as root:
cpan -i iCal::Parser
To the author: Could this be released under a standard open source license? Why not release it under the GPL? That allow the possibility that it could be distributed with 'remind', or at least through the same channels.
I've re-released the software under GPL. Get it from http://jalcorn.net/public/ical2rem.pl
I second Mark's request. It would be nice if this were released under a GPL-compatible license so it could be distributed alongside 'remind'.
Is it possible to have recurring events really be recurring like in the remind application and how come the starting year is this year. All older events don't get converted. Is there something that can be done about it?
You'd have to write it without iCal::Parser, because that library breaks out recurring events. The Event Hash defined in iCal::Parser has no recurrence field. Since the intention was to have it run under cron every few minutes, recurring events really aren't critical.
iCal::Parser defaults to January of the current year, but if you want to go back, then change
my $parser =iCal::Parser->new();
to
my $startdate = DateTime->new( year => 2006, month => 1, day => 1, time_zone => 'US/Eastern', );
my $oneyear = DateTime::Duration->new( years => 1);
my $enddate = DateTime->now + $oneyear;
my $parser = iCal::Parser->new('start' => $startdate, 'end' => $enddate);
iCal::Parser defaults to January of the current year, but if you want to go back, then change
my $parser =iCal::Parser->new();
to
my $startdate = DateTime->new( year => 2006, month => 1, day => 1, time_zone => 'US/Eastern', );
my $oneyear = DateTime::Duration->new( years => 1);
my $enddate = DateTime->now + $oneyear;
my $parser = iCal::Parser->new('start' => $startdate, 'end' => $enddate);
I am novice with perl. I try your script. I successfully install Ical::Parser but when I run the script, i have this error and I don't howto resolve it :
Cannot determine local time zone
Attempt to free unreferenced scalar: SV 0x88517b8, Perl interpreter: 0x8152008.
Could you help me ?
Cannot determine local time zone
Attempt to free unreferenced scalar: SV 0x88517b8, Perl interpreter: 0x8152008.
Could you help me ?
Sometime within the last few weeks I started having the same unreferenced scalar problems after using ical2rem.pl for months without a hitch. I'm on ubuntu and do apt-get updates pretty regularly so maybe something's changed on the perl side.
Thanks for the note "You'd have to write it without iCal::Parser" this did trick for me.
remind isn't intended as a calendaring app - it's intended to remind you of events. It makes no sense to have event durations for a reminder app.
But remind does have the DUR function built in it , so why not extend it to ical2rem as well? (if possible of course .. )
Indeed. I use wyrd as a frontend as well, and DURATION would be most useful. I'll take a look at it when time permits.
Sorry Justin
I tried for days to use ical for several days but could not find the error in process
It always give me back
daniel@martins:~$ ical2rem.pl basic.ics
REM MSG Calendar Events:%"%"%
Invalid local time for date in time zone: America/Sao_Paulo
But I selected timezone with tzselect to America/Sao_Paulo
I tried for days to use ical for several days but could not find the error in process
It always give me back
daniel@martins:~$ ical2rem.pl basic.ics
REM MSG Calendar Events:%"%"%
Invalid local time for date in time zone: America/Sao_Paulo
But I selected timezone with tzselect to America/Sao_Paulo
Hi,
as I'm looking for something to view/read ical files on the console I found your script ical2rem.pl but something seems wrong with the download link?
http://jalcorn.net/public/ical2rem.pl -> Forbidden
with regards
as I'm looking for something to view/read ical files on the console I found your script ical2rem.pl but something seems wrong with the download link?
http://jalcorn.net/public/ical2rem.pl -> Forbidden
with regards
I get a 403 Forbidden trying to access the script. Please fix, I need this script.
Thanks a lot for this script.
I would like to use remind on a freerunner Phone.
I have exported my thunderbird calendar to an ics file and I have an error using ical2rem.pl :
Can't call method "clone" on an undefined value at /usr/lib/perl5/DateTime/Duration.pm line 278, line 2432.
Any idea ?
I would like to use remind on a freerunner Phone.
I have exported my thunderbird calendar to an ics file and I have an error using ical2rem.pl :
Can't call method "clone" on an undefined value at /usr/lib/perl5/DateTime/Duration.pm line 278, line 2432.
Any idea ?
I don't think I ever call Duration directly, so it's a call from another library. I usually debug these by inserting a bunch of print statements and seeing what piece of data caused the problem, but I'm not sure how you're going to do that on your phone. Does the same file run OK on a linux installation?
Actually I did try from my PC under Debian:
cat home.ics | /tmp/ical2rem.pl > /tmp/test
cat home.ics | /tmp/ical2rem.pl > /tmp/test


