hoschi has asked for the wisdom of the Perl Monks concerning the following question:
just registered to ask this question as I feel lost. I'm neither a programmer nor do I have the broad wisdom I'm searching for here.
As a small background:
We have a shift rooster whichs is changing quite often and is managed in an xlsx sheet. Now I figured out how to get all the data out of that Excel sheet and stored it in a hash of hashes.
As I thought it would be a good idea to have me and my colleagues sync their calendars on their phones or pads with a caldav server I am looking for a way how to push the gathered data into that calendar. I installed a Baikal server on one of my machines here which is already setup.
First thing im not aware of - what modules to use. I found http:dav, Data:iCal, Cal:DAV but none of them (or their description in cpan.org) shed a light on me how to use them. It seems I am even a lil too dumb to google it properly, so I hope for the wisdom of the perl monks.
What I have so far is just a simple:
my $user = "test"; my $pass = "test"; my $url = "http://baikal.local/cal.php/principals/test/testshift"; #my $url = "http://baikal.local/cal.php"; my $cal = Cal::DAV->new( user => $user, pass => $pass, url => $url); my $dav = $cal->dav; print Dumper($cal); print Dumper($dav);
which finally gives me only
$VAR1 = bless( { 'url' => 'http://baikal.local/cal.php/principals/test +/testshift', '_dav' => bless( { '_lockedresourcelist' => bless( { +'_resources' => undef }, + 'HTTP::DAV::ResourceList' ), '_comms' => bless( { '_headers' => + bless( {}, 'HTTP::DAV::Headers' ), '_user_agent' + => bless( { + 'max_redirect' => 7, + 'protocols_forbidden' => undef, + 'show_progress' => undef, + 'handlers' => { + 'response_header' => bless( [ + { + 'owner' +=> 'LWP::UserAgent::parse_head', + 'callbac +k' => sub { "DUMMY" }, + 'm_media +_type' => 'html', + 'line' = +> '/usr/share/perl5/LWP/UserAgent.pm:612' + } + ], 'HTTP::Co +nfig' ) + }, + 'no_proxy' => [], + 'protocols_allowed' => undef, + 'local_address' => undef, + 'use_eval' => 1, + 'requests_redirectable' => [ + 'GET', + 'HEAD' + ], + 'timeout' => 180, + 'def_headers' => bless( { + 'user-agent' => 'DAV.pm/v0.47' + }, 'HTTP::Headers' ), + 'proxy' => {}, + 'basic_authentication' => { + 'baikal.local:80' => { + + 'default' => [ + + 'test', + + 'test' + + ] + +} + }, + 'max_size' => undef + }, 'HTTP::DAV::UserAgent' ) }, 'HTTP::DAV:: +Comms' ) }, 'HTTP::DAV' ), '_auto_commit' => undef }, 'Cal::DAV' ); $VAR1 = bless( { '_lockedresourcelist' => bless( { '_resources' => und +ef }, 'HTTP::DAV::Resour +ceList' ), '_comms' => bless( { '_headers' => bless( {}, 'HTTP:: +DAV::Headers' ), '_user_agent' => bless( { 'max_r +edirect' => 7, 'proto +cols_forbidden' => undef, 'show_ +progress' => undef, 'handl +ers' => { + 'response_header' => bless( [ + { + 'owner' => 'LWP::UserAgent: +:parse_head', + 'callback' => sub { "DUMMY" + }, + 'm_media_type' => 'html', + 'line' => '/usr/share/perl5 +/LWP/UserAgent.pm:612' + } + ], 'HTTP::Config' ) + }, 'no_pr +oxy' => [], 'proto +cols_allowed' => undef, 'local +_address' => undef, 'use_e +val' => 1, 'reque +sts_redirectable' => [ + 'GET', + 'HEAD' + ], 'timeo +ut' => 180, 'def_h +eaders' => bless( { + 'user-agent' => 'DAV.pm/v0.47' + }, 'HTTP::Headers' ), 'proxy +' => {}, 'basic +_authentication' => { + 'baikal.local:80' => { + 'default' => [ + 't +est', + 't +est' + ] + } + }, 'max_s +ize' => undef }, 'HTTP +::DAV::UserAgent' ) }, 'HTTP::DAV::Comms' ) }, 'HTTP::DAV' );
On the Baikal Server the user test with password test is there and has a calendar created named testshift.
I found some sniplets in the web but none of them enabled me to understand HOW to add an entry. Most of them even only show how to write .ics files which I guess is not what io want.
Anyone ?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Perl to add entries in iCal Calendar (cpan secrets)
by Anonymous Monk on May 01, 2014 at 02:47 UTC | |
by hoschi (Initiate) on May 01, 2014 at 13:46 UTC | |
by Anonymous Monk on May 02, 2014 at 08:40 UTC | |
by hoschi (Initiate) on May 12, 2014 at 17:56 UTC | |
|
Re: Using Perl to add entries in iCal Calendar
by locked_user sundialsvc4 (Abbot) on May 01, 2014 at 18:59 UTC |