Net-ICal
view release on metacpan
or search on metacpan
BUGS
view on Meta::CPAN
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | RFC2445 allows user- defined properties: for example: BEGIN:VALARM
X-FOOBAR;some string the module user wants to toss in
...
END:VALARM We need a way to solve this problem. It looks
non-trivial, but at least one person has asked about it
on reefknot-users.
bug id: 411208
~~~~~~~~~~~~~~
Summary: Allow multiple Periods in a FreebusyItem
Submitted by: Shane Landrum (srl) Date: 2001-03-25 12:49
Category: Net-ICal
Assigned to: Nobody/Anonymous (nobody) Priority: 6
RFC2445 specifies that FREEBUSY items can have multiple
periods attached to them; right now, we can't do that.
We should be able to. Someone who knows more than me
about C::MM should look at this.
bug id: 404132
|
BUGS
view on Meta::CPAN
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | Assigned to: Martijn van Beers (lotr) Priority: 5
We need to work on the cross-library testing tools for
Net::ICal that we talked about. This will be a set of
iCal files which exercises every feature of the RFC and
makes sure a library is consistent with the RFC. See
the mailing list archives for more detail.
bug id: 408531
~~~~~~~~~~~~~~
Summary: implement Freebusy
Submitted by: Shane Landrum (srl) Date: 2001-03-14 08:33
Category: Net-ICal
Assigned to: Shane Landrum (srl) Priority: 5
We need to implement Freebusy---- checking to see when
a given calendar has time free, for purposes of meeting
scheduling.
bug id: 408536
~~~~~~~~~~~~~~
Summary: Make sure that timezones work
Submitted by: Shane Landrum (srl) Date: 2001-03-14 08:44
Category: Net-ICal
Assigned to: Martijn van Beers (lotr) Priority: 5
|
ChangeLog.detailed
view on Meta::CPAN
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 2001-08-04 01:07 srl
* Makefile.PL: Oops, Test::More has been rolled into Test::Simple
now. Minor fix to Makefile.PL.
2001-08-04 00:59 srl
* Makefile.PL, lib/Net/ICal/Attendee.pm, lib/Net/ICal/Component.pm,
lib/Net/ICal/Daylight.pm, lib/Net/ICal/ETJ.pm,
lib/Net/ICal/Event.pm, lib/Net/ICal/Freebusy.pm,
lib/Net/ICal/FreebusyItem.pm, lib/Net/ICal/Period.pm,
lib/Net/ICal/Property.pm, lib/Net/ICal/Recurrence.pm,
lib/Net/ICal/Standard.pm, lib/Net/ICal/Time.pm,
lib/Net/ICal/Timezone.pm, lib/Net/ICal/Util.pm: Now that TODO tests
work in Test::More 0.10, I upgraded N::I's dependency on it and
converted a lot of the failing "write this test" tests to TODO
tests, which don't formally fail. I also did some bugfixes as I
went along to make failing tests work.
2001-08-03 00:47 srl
|
ChangeLog.detailed
view on Meta::CPAN
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | 2001-07-23 13:36 lotr
* Makefile.PL: add some prerequisites
2001-07-23 11:10 lotr
* examples/README: oops, forgot lunchtime.pl
2001-07-23 11:09 lotr
* examples/: cal2fb.pl, freebusy_demo.pl, gtk_todo.pl,
html_calendar.pl, lunchtime.pl, recurrence_test.pl, test_alarm.pl,
2001-07-23 11:06 lotr
* examples/README: put something semi-useful in README.
2001-07-23 10:49 lotr
* t/rfc2445.t: fix up the test-filename info extracting RE
|
ChangeLog.detailed
view on Meta::CPAN
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | tests to Property and Recurrence--- mostly stubs to flag places
that need better tests written.
Reorganized Recurrence.pm to flow more logically, sort of. Someone
with time on their hands should refactor it.
updated the TODO.
2001-07-19 00:50 srl
* lib/Net/: ICal.pm, ICal/Freebusy.pm, ICal/FreebusyItem.pm,
ICal/Period.pm: Added a bunch of tests, including failing tests to
mark where tests aren't written yet. Corrected some of Period.pm to
bring it up to date with the newer Time.pm and Duration.pm APIs.
Freebusy.pm 's tests are still failing to load for reasons I don' t
understand, but FreebusyItem has some tests now.
2001-07-18 23:54 srl
* lib/Net/ICal/Freebusy.pm: Added beginnings of tests to Freebusy.
However, its call to N::I::Util->create_uuid is failing because of
create_uuid 's assumptions about how it gets called. The error I' m
getting is:
Can't use string ( "Net::ICal::Util" ) as a HASH ref while "strict refs" in use at lib/Net/ICal/Util.pm line 67.
Writing further tests for Freebusy would be great, but there's not
much to test until someone adds more validation routines.
2001-07-18 23:32 srl
* lib/Net/ICal/: Alarm.pm, Calendar.pm, Event.pm: Added some basic
tests for Alarm, Calendar, and Event. Look particularly at the
Event module's last test for a way to test ical output. Thanks to
Michael Schwern for suggesting that approach.
2001-07-18 23:31 srl
|
ChangeLog.detailed
view on Meta::CPAN
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | * test-data/rfc2445/4/8/2/: 1/1-pass-correct.ics, 1/2-fail-utc.ics,
3/1-pass-due-datetime.ics, 3/2-pass-due-date.ics,
3/3-fail-due-date.ics, 3/4-fail-invalid-due- time .ics: Add a few
more tests to the parsing test suite. Some are supposed to fail
since they uncover bugs :)
2001-07-09 10:35 lotr
* lib/Net/ICal/: Attendee.pm, Component.pm, ETJ.pm, Event.pm,
Freebusy.pm, Journal.pm, Todo.pm: Big validation commit featuring:
* move of errlog list to Component * some validation code in the
_parse_lines callback * validate at the end of _parse_lines, and
move the list of parse errors to a listref in $@ if the
validation failed * use of Net::ICal::Util create_uuid for generating the uid in ETJ and Freebusy * an _init in ETJ to call
from new to do automatic setting of properties like uid and
dtstamp. This can't go in _create, since that gets called from
new_from_ical too * cleanup of map definitions so the differences
between Event, Todo and Journal are taken care of better *
validate running after _create, and working on the object instead
of the args hash, so it can be called from new_from_ical too *
some vi modelines and a bit of indenting cleanup *
removed/commented out/modified some tests
2001-07-09 08:37 lotr
|
ChangeLog.detailed
view on Meta::CPAN
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | changes. I'm expecting some breakage but I thought it was better
to commit them than not.
2001-07-02 16:43 lotr
* t/ time .t: fix for new Time.pm
2001-06-30 16:44 lotr
* lib/Net/ICal/: Alarm.pm, Calendar.pm, Component.pm, Duration.pm,
Event.pm, Freebusy.pm, FreebusyItem.pm, Journal.pm, Period.pm,
Property.pm, Recurrence.pm, Time.pm, Todo.pm: - remove ' use
UNIVERSAL' where not used - remove the qw(isa) bit, and use
UNIVERSAL::isa ( $foo , $class ); instead
2001-06-30 16:42 lotr
* lib/Net/ICal/: Attendee.pm, ETJ.pm, Trigger.pm: clean up existing
tests a bit and add first rudimentary tests for Trigger
2001-06-30 15:14 lotr
|
ChangeLog.detailed
view on Meta::CPAN
625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | * lib/Net/ICal/Time.pm: Reverting to 1.6 version but retaining
history.
2001-05-22 02:54 coral
* lib/Net/ICal/Todo.pm: a Todo requires an organizer. Check added
to validate routine.
2001-05-22 02:43 coral
* lib/Net/ICal/Freebusy.pm: When the GUID code was pasted from
ETJ.pm someone forgot a couple things ( $count , $date ). It's fixed.
2001-05-22 02:29 coral
* lib/Net/ICal/Duration.pm: BUG
$self ->method( $args ), not $args ->method( $args ). Oops. Thanks,
anonymous.
2001-05-14 23:18 srl
* lib/Net/ICal/: Event.pm, Freebusy.pm: Added some more pointers to
sourceforge bugs.
Added a UID generation routine to Freebusy.pm. There's a similar
one in ETJ.pm; they should probably both be pulled out to a utility
module somewhere.
2001-05-14 22:51 srl
* lib/Net/ICal/: Attendee.pm, Calendar.pm, Component.pm,
Duration.pm, ETJ.pm: Added a bunch of references to Sourceforge bug
tracking numbers for TODO/FIXME items that I originated.
2001-05-12 16:09 coral
* lib/Net/: ICal.pm, ICal/Alarm.pm, ICal/Calendar.pm,
ICal/Duration.pm, ICal/Freebusy.pm, ICal/FreebusyItem.pm,
ICal/Journal.pm, ICal/Period.pm, ICal/Recurrence.pm, ICal/Time.pm,
ICal/Trigger.pm: Ran podchecker on all files; all errors fixed, two
or three warnings of no concern to us remain (duplicate =items).
2001-05-12 12:57 coral
* lib/Net/ICal/: Alarm.pm, Attendee.pm, Calendar.pm, Component.pm,
Duration.pm, ETJ.pm, Event.pm, Freebusy.pm, FreebusyItem.pm,
Journal.pm, Period.pm, Property.pm, Recurrence.pm, Time.pm,
Todo.pm, Trigger.pm: Switched over to 'use base' instead of
modifying @ISA ; this also corrects bugs in two modules where they
changed @ISA but forgot to use the module that had just been put into @ISA .
2001-05-12 12:06 coral
* MANIFEST: Added 4.3 tests in test-data.
|
ChangeLog.detailed
view on Meta::CPAN
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | tests would fail again, but it seemed easier to fix the bug.
2001-05-10 01:46 coral
* lib/Net/ICal/: ETJ.pm, Recurrence.pm: Extra
FIXME to a large comment of that topic.
2001-05-09 09:09 coral
* lib/Net/ICal/: Alarm.pm, Attendee.pm, Calendar.pm, Component.pm,
Duration.pm, ETJ.pm, Event.pm, Freebusy.pm, FreebusyItem.pm,
Journal.pm, Period.pm, Property.pm, Recurrence.pm, Time.pm,
Todo.pm, Trigger.pm: Added L<Net::ICal> to the SEE ALSO sections; a
bit of removal of section 3 notation from L<Net::ICal(3)> links as
well.
2001-05-09 08:36 coral
* lib/Net/ICal/: Alarm.pm, Attendee.pm, Calendar.pm: All the
examples use "email@address" ; this isn't valid perl5 code. Fixed.
|
ChangeLog.detailed
view on Meta::CPAN
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 | * examples/html_calendar.pl: Added copyright, whitespace,
formatting nits.
2001-05-09 08:05 coral
* examples/gtk_todo.pl: Updated copyright, whitespace nitpicks.
2001-05-09 08:04 coral
* examples/freebusy_demo.pl: Added copyright notice, added
[DOC] entry.
2001-05-09 08:03 coral
* examples/cal2fb.pl: Added copyright notice, a bit of
clarification of code (commented "P60D" ).
2001-05-09 08:02 coral
* t/rfc2445.t: Clarified comments, updated copyright, re-enabled
|
ChangeLog.detailed
view on Meta::CPAN
896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | - code changes
rearrange the code for consistency
- pod changes
rearranged the pod for consistency
2001-05-05 21:34 srl
* lib/Net/ICal/FreebusyItem.pm: Patches from coral to FreebusyItem:
updated the licensing agreement
- code changes
- pod changes
changed the NAME slightly
|
ChangeLog.detailed
view on Meta::CPAN
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
moved a line of code below the pod where it seems to belong
- pod changes
moved things around to be consistent small example change - now
it's actually perl code
2001-05-05 21:31 srl
* lib/Net/ICal/Freebusy.pm: patches from coral to Freebusy:
updated the licensing agreement
- code changes
rearrange the code for consistency
- pod changes
rearranged the pod for consistency
|
ChangeLog.detailed
view on Meta::CPAN
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 | still love to see some regression tests, but those should really go
in t/.
2001-04-20 22:14 srl
* lib/Net/ICal/Recurrence.pm: Fixed an occurrence of "our" which
was causing breakage under Perl 5.005.
2001-04-20 13:35 shutton
* examples/cal2fb.pl: Simple calender->freebusy generator.
2001-04-20 13:25 shutton
* examples/showical.perl: * Use ::Time's format () method to display
event times , rather than deprecated as_localtime method.
2001-04-20 13:22 shutton
* examples/recurrence_test.pl: Pruned this down a bit.
Demonstrates occurrence() method.
|
ChangeLog.detailed
view on Meta::CPAN
1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 | 2001-04-01 01:55 srl
* examples/: recurrence_test.pl, reply.perl, showical.perl: Cleaned
up some of the examples so that they: - have comments explaining
what they do - work properly out of the box.
2001-04-01 00:44 srl
* BUGS, MANIFEST, lib/Net/ICal/Component.pm, lib/Net/ICal/ETJ.pm,
lib/Net/ICal/Freebusy.pm, lib/Net/ICal/Period.pm,
lib/Net/ICal/Property.pm, lib/Net/ICal/Recurrence.pm, t/rfc2445.t:
Made a bunch of changes to make Net::ICal's make/make test process
play nicely with Perl 5.00503. Notably:
File::Find, which t/rfc2445.t was using, seems to behave
differently between 5.00503 and 5.6.0, so I changed the test to not
Recurrence.pm as it was used "use warnings" and "method" , which
seem to be 5.6isms. I removed them. Let's stick to 5.005
|
ChangeLog.detailed
view on Meta::CPAN
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | * MANIFEST: Minor changes to MANIFEST
2001-03-28 22:05 srl
* BUGS, FAQ, MANIFEST, README, TODO: Miscellaneous cleanups in
preparation for 0.13 release.
2001-03-25 15:37 srl
* examples/freebusy_demo.pl, lib/Net/ICal/Freebusy.pm,
lib/Net/ICal/FreebusyItem.pm, lib/Net/ICal/Period.pm,
lib/Net/ICal/Property.pm: Fixed the Freebusy class to implement
FREEBUSY lines properly. There's a new module, FreebusyItem, which
is a Property that outputs lines like
FREEBUSY;FBTYPE=BUSY:19970101T120000/19970101T123000 . Freebusy.pm
handles VFREEBUSY objects. This is kind of a confusing naming
scheme, but all the other ways I could think of were equally bad.
Modified some of the as_ical adhackery in Period so that Periods
will display properly on FREEBUSY (FreebusyItem) lines.
TODO: The RFC specifies that FREEBUSY lines can contain multiple
periods separated by commas, like this:
FREEBUSY;FBTYPE=BUSY:19970101T120000/19970101T123000,
19970101T190000/19970101T210000 I haven't yet understood how C::MM
works well enough to make this happen.
2001-03-25 13:54 srl
* README, examples/README, lib/Net/ICal.pm,
|
ChangeLog.detailed
view on Meta::CPAN
1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 |
Documented N::I::Journal and added a test for basic Journal
read / write in test/test_journal.pl. Journal seems to work at a
basic level now; someone wanna write a more elaborate example?
Discovered a bug in Component that was causing it to break lines in
the middle of words; fixed the bug.
2001-03-25 03:57 srl
* examples/freebusy_demo.pl, lib/Net/ICal/Freebusy.pm: Added POD to
Freebusy and changed the call syntax for new() to take a hash of
parameters.
There are still some fairly significant bugs in Freebusy; it
doesn't handle multiple FREEBUSY lines within a VFREEBUSY, and it
doesn't handle the properties on the FREEBUSY lines properly. I
suspect we need a FreebusyItem class or similar. The basic code is
there, as is the POD, so that's half the battle.
2001-03-25 01:33 srl
* examples/freebusy_demo.pl, lib/Net/ICal/Duration.pm,
lib/Net/ICal/ETJ.pm, lib/Net/ICal/Event.pm,
lib/Net/ICal/Freebusy.pm, lib/Net/ICal/Period.pm,
lib/Net/ICal/Property.pm, lib/Net/ICal/Time.pm: Miscellaneous
cleanups preparing for the upcoming release; some docco fixes; some
bugfixes. I'm still trying to standardize the headers.
Why does Time->as_ical return strings with : at the beginning?
That's not quite right. I tossed some ad-hackery in here in various
places (particularly Duration and Period) that's pretty evil. It
works, but it's ugly.
While poking through docco, I ran into the Freebusy module, which
was only vaguely sketched out in POD, but it was sketched out in a
way that didn 't make sense to me. So I implemented it. There' s no
POD yet, but I'll fix that soon.
2001-03-24 19:15 srl
* lib/Net/ICal/Alarm.pm, lib/Net/ICal/Calendar.pm,
lib/Net/ICal/Component.pm, lib/Net/ICal/Duration.pm, t/duration.t:
Fixed a few bugs in Alarm.
|
ChangeLog.detailed
view on Meta::CPAN
1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 | Started cleaning up the N::I documentation and standardizing the
license/credits header. This is in preparation for the release of
Net::ICal 0.13 sometime in the next few days.
2001-03-18 19:15 srl
* FAQ, lib/Net/ICal/Component.pm, t/rfc2445.t: Made a few syntax
cleanups so that the tests will run closer to correctly. 'make
test ' still isn' t quite right though. It's still returning an error
for me during the rfc2445.t test though: "Can't use string ( "freebusys" ) as a HASH ref while "strict refs" in use at /usr/ local /lib/perl5/site_perl/5.6.0/Class/MethodMapper.pm line
166, <CALFILE> chunk 1."
Added a reference to the SF bug tracker and the BUGS file in the
FAQ how-to-report-a-bug section.
2001-03-18 10:03 srl
* Makefile.PL: Added a requirement for Class::MethodMapper 0.9 to
Makefile.PL.
|
ChangeLog.detailed
view on Meta::CPAN
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 | * lib/Net/ICal/ETJ.pm: Fixed some syntax errors.
2001-02-06 13:44 lotr
* TODO, test/testcal.pl: added some TODO items and cleaned up
testcal.pl a bit
2001-02-06 12:36 srl
* lib/Net/ICal/ETJ.pm, lib/Net/ICal/Event.pm,
lib/Net/ICal/Freebusy.pm, lib/Net/ICal/Todo.pm, test/testcal.pl:
Documented ETJ.pm more thoroughly with RFC sections and which
properties are required in which types of object. Started templates
for Event, Todo, and Freebusy, which are still very rough.
Modified output in testcal.pl so that it says that VCALENDAR input
from ical is working now.
2001-02-06 12:06 lotr
* lib/Net/ICal/: Alarm.pm, Component.pm, Duration.pm, Property.pm,
Trigger.pm: - fix indenting - add a reclass domain so alarming.pl
can work - added recursive component parsing - probably more, but I
forget
|
MANIFEST
view on Meta::CPAN
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ChangeLog
ChangeLog.detailed
FAQ
INSTALL
MANIFEST
Makefile.PL
README
TODO
examples/README
examples/cal2fb.pl
examples/freebusy_demo.pl
examples/gtk_todo.pl
examples/html_calendar.pl
examples/lunchtime.pl
examples/recurrence_test.pl
examples/reply.perl
examples/showical.perl
examples/test_alarm.pl
examples/test_duration.pl
examples/test_journal.pl
examples/test_todo.pl
|
MANIFEST
view on Meta::CPAN
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | examples/timezone_test.pl
lib/Net/ICal.pm
lib/Net/ICal/Alarm.pm
lib/Net/ICal/Attendee.pm
lib/Net/ICal/Calendar.pm
lib/Net/ICal/Component.pm
lib/Net/ICal/Daylight.pm
lib/Net/ICal/Duration.pm
lib/Net/ICal/ETJ.pm
lib/Net/ICal/Event.pm
lib/Net/ICal/Freebusy.pm
lib/Net/ICal/FreebusyItem.pm
lib/Net/ICal/Journal.pm
lib/Net/ICal/Period.pm
lib/Net/ICal/Property.pm
lib/Net/ICal/Recurrence.pm
lib/Net/ICal/Standard.pm
lib/Net/ICal/Time.pm
lib/Net/ICal/Timezone.pm
lib/Net/ICal/Todo.pm
lib/Net/ICal/Trigger.pm
lib/Net/ICal/Util.pm
|
TODO
view on Meta::CPAN
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - grab any bug off the BUGS list for Date::ICal and fix it. Net::ICal
uses Date::ICal extensively.
Major components:
- VCALENDAR (half-done)
- VALARM - (done? part-done?); see Alarm.pm.
- VEVENT - in progress; see Event.pm.
- VTODO - in progress; see Todo.pm.
- VJOURNAL - in progress; see Journal.pm.
- VFREEBUSY - in progress; see Freebusy.pm.
- VTIMEZONE - not yet functional; see Time.pm and Date::ICal.
- handle METHOD, which is a property of a VCALENDAR that specifies
whether this calendar is a request for an event, a response to a request,
or what. See RFC 2446 (iTIP) and Calendar.pm's method property.
Net::ITIP is probably what you want to look at; it's in the Reefknot
Other pieces, smaller subtasks of the above, roughly in priority order:
|
examples/README
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | README for Net::ICal examples
* cal2fb.pl
Converts a calendar to a list of times you're free and busy.
This is in flux, as Freebusy.pm is half-rewritten.
* freebusy_demo.pl
Also in flux.
* gtk_todo.pl
You'll need Gnome.pm, Gtk.pm, and Date::Parse for this
* html_calendar.pl
You'll need CGI and HTML::CalendarMonthSimple for this
* lunchtime.pl
Supposed to be a timezone demo; shows what your local lunchtime
|
examples/cal2fb.pl
view on Meta::CPAN
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | sub help {
my $help = <<EOH;
|
examples/cal2fb.pl
view on Meta::CPAN
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | my $calfh = IO::File->new( $calfile , 'r' ) || die "can't open $calfile: $!\n" ;
my $caldata ;
$calfh -> read ( $caldata , -s $calfile );
$calfh -> close ();
my $cal = Net::ICal::Calendar->new_from_ical( $caldata );
my @busyperiods ;
my $now = Net::ICal::Time->new( epoch => time ());
my $dur = Net::ICal::Duration->new( $durstr );
my $rperiod = Net::ICal::Period->new( $now , $now ->add( $dur ));
if ( my $ar_events = $cal ->events) {
foreach my $event ( @$ar_events ) {
my $status = $event ->status || 'BUSY' ;
next if $status eq 'CANCELLED' ;
my $fbtype = $status eq 'TENTATIVE' ? 'BUSY-TENTATIVE' : 'BUSY' ;
foreach my $period (@{ $event ->occurrences( $rperiod )}) {
next unless ref ( $period ) eq 'Net::ICal::Period' ;
my $start = $period ->start->timezone( 'UTC' );
my $end = $period ->end->timezone( 'UTC' );
$period = Net::ICal::Period->new( $period ->start, $period ->end);
$period ->start->timezone( 'UTC' );
my $fbitem = Net::ICal::FreebusyItem->new( $period );
$fbitem ->fbtype( $fbtype );
push ( @busyperiods , $fbitem );
}
}
}
my $organizer = Net::ICal::Attendee->new( $ENV {USER});
my $dtstamp = Net::ICal::Time->new( epoch => time (), timezone => 'UTC' );
my $fbs = Net::ICal::Freebusy->new( freebusy => \ @busyperiods ,
organizer => $organizer ,
dtstamp => $dtstamp ,
dtstart => $rperiod ->start,
dtend => $rperiod ->end);
my $fbcal = Net::ICal::Calendar->new( freebusys => [ $fbs ]);
print $fbcal ->as_ical;
|
examples/freebusy_demo.pl
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #!/usr/bin/perl -w
my $p1 = new Net::ICal::Period( "19970101T120000" , "19970101T123000" );
my $p2 = new Net::ICal::Period( "19970101T133000" , "19970101T140000" );
my $item1 = new Net::ICal::FreebusyItem( $p1 , ( fbtype => 'BUSY' ));
my $item2 = new Net::ICal::FreebusyItem( $p2 , ( fbtype => 'BUSY' ));
my $item3 = new Net::ICal::FreebusyItem([ $p1 , $p2 ], ( fbtype => 'BUSY' ));
my $f = new Net::ICal::Freebusy( freebusy => [ $item1 , $item2 ], comment => 'foo' );
print $f ->as_ical . "\n" ;
|
lib/Net/ICal.pm
view on Meta::CPAN
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
lib/Net/ICal.pm
view on Meta::CPAN
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
lib/Net/ICal/Calendar.pm
view on Meta::CPAN
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | sub new {
my ( $class , %args ) = @_ ;
return undef unless ( defined $args { 'events' } ||
defined $args { 'journals' } ||
defined $args { 'todos' } ||
defined $args { 'freebusys' } ||
defined $args { 'timezones' } );
my $self = &_create ( $class , %args );
$self ->version ( '2.0' );
|
lib/Net/ICal/Calendar.pm
view on Meta::CPAN
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | },
journals => {
type => 'parameter' ,
doc => 'my notes' ,
domain => 'ref' ,
options => 'ARRAY' ,
value => undef ,
},
freebusys => {
type => 'parameter' ,
doc => 'when am i free or busy?' ,
domain => 'ref' ,
options => 'ARRAY' ,
value => undef ,
},
timezones => {
type => 'parameter' ,
doc => 'when am i free or busy?' ,
domain => 'ref' ,
options => 'ARRAY' ,
value => undef ,
},
alarms => {
type => 'parameter' ,
doc => 'warn me when some things happen' ,
domain => 'ref' ,
options => 'ARRAY' ,
|
lib/Net/ICal/Freebusy.pm
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
lib/Net/ICal/Freebusy.pm
view on Meta::CPAN
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
lib/Net/ICal/Freebusy.pm
view on Meta::CPAN
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | $self ->uid (create_uuid);
}
return undef unless ( $self ->validate);
return $self ;
}
my $count = 0;
|
lib/Net/ICal/Freebusy.pm
view on Meta::CPAN
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | type => 'parameter' ,
doc => '' ,
domain => 'ref' ,
options => 'Net::ICal::Time' ,
value => undef ,
},
freebusy => {
type => 'parameter' ,
doc => 'one or more Net::ICal::Periods' ,
domain => 'ref' ,
options => 'ARRAY' ,
},
organizer => {
type => 'parameter' ,
doc => '' ,
domain => 'ref' ,
options => 'Net::ICal::Attendee' ,
value => undef ,
|
lib/Net/ICal/FreebusyItem.pm
view on Meta::CPAN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
lib/Net/ICal/FreebusyItem.pm
view on Meta::CPAN
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | defaults to BUSY.
BUSY means there's already something scheduled in this time slot. FREE
means that this time slot is open . BUSY-UNAVAILABLE means that this
time slot can't be scheduled. BUSY-TENTATIVE means that this time slot
has something tentatively scheduled for it.
sub new {
my ( $class , $content , %args ) = @_ ;
|
lib/Net/ICal/FreebusyItem.pm
view on Meta::CPAN
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | sub _create {
my ( $class , %args ) = @_ ;
my $map = {
fbtype => {
type => 'parameter' ,
doc => '' ,
domain => 'enum' ,
options => [ qw(FREE BUSY BUSY-UNAVAILABLE BUSY-TENTATIVE) ],
},
content => {
type => 'volatile' ,
doc => 'the value of the trigger' ,
domain => 'reclass' ,
options => { default => 'Net::ICal::Period' },
|
lib/Net/ICal/FreebusyItem.pm
view on Meta::CPAN
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | my $self = $class ->SUPER::new ( 'FREEBUSY' , $map , %args );
return $self ;
}
1;
|
test-data/rfc2445.ics
view on Meta::CPAN
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | DTEND:19971016T050000Z
DTSTAMP:19970901T083000Z
END:VFREEBUSY
BEGIN:VFREEBUSY
ORGANIZER:MAILTO:jane_doe @host1 .com
ATTENDEE:MAILTO:john_public @host2 .com
DTSTAMP:19970901T100000Z
FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M,
19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M
COMMENT:This iCalendar file contains busy time information for
the next three months.
END:VFREEBUSY
BEGIN:VFREEBUSY
ORGANIZER:jsmith @host .com
DTSTART:19980313T141711Z
DTEND:19980410T141711Z
FREEBUSY:19980314T233000Z/19980315T003000Z
FREEBUSY:19980316T153000Z/19980316T163000Z
FREEBUSY:19980318T030000Z/19980318T040000Z
END:VFREEBUSY
BEGIN:VTIMEZONE
TZID:US-Eastern
LAST-MODIFIED:19870101T000000Z
BEGIN:STANDARD
DTSTART:19971026T020000
RDATE:19971026T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
|
test-data/rfc2445.ics
view on Meta::CPAN
344 345 346 347 348 349 350 351 352 353 354 355 356 357 | BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//RDU Software//NONSGML HandCal//EN
BEGIN:VFREEBUSY
ORGANIZER:MAILTO:jsmith @host .com
DTSTART:19980313T141711Z
DTEND:19980410T141711Z
FREEBUSY:19980314T233000Z/19980315T003000Z
FREEBUSY:19980316T153000Z/19980316T163000Z
FREEBUSY:19980318T030000Z/19980318T040000Z
END:VFREEBUSY
END:VCALENDAR
|