From 2531010d10599fcbb9a79240434e1d08075d99e0 Mon Sep 17 00:00:00 2001 From: borisneubert Date: Sun, 24 Jun 2012 09:32:47 +0000 Subject: [PATCH] added get summary to Calendar, amended documentation git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1641 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/57_Calendar.pm | 5 +++-- docs/commandref.html | 46 +++++++++++++++++++++++++++++--------------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/FHEM/57_Calendar.pm b/FHEM/57_Calendar.pm index 7a2d8cdf8..e693f256d 100644 --- a/FHEM/57_Calendar.pm +++ b/FHEM/57_Calendar.pm @@ -714,7 +714,7 @@ sub Calendar_Get($@) { my @events; my $cmd= $a[1]; - if($cmd eq "text" || $cmd eq "full") { + if($cmd eq "text" || $cmd eq "full" || $cmd eq "summary") { return "argument is missing" if($#a != 2); my $reading= $a[2]; @@ -734,6 +734,7 @@ sub Calendar_Get($@) { foreach my $event (sort { $a->start() <=> $b->start() } @events) { push @texts, $event->asText() if $cmd eq "text"; push @texts, $event->asFull() if $cmd eq "full"; + push @texts, $event->summary() if $cmd eq "summary"; } } return join("\n", @texts); @@ -749,7 +750,7 @@ sub Calendar_Get($@) { return join(";", @uids); } else { - return "Unknown argument $cmd, choose one of text full find"; + return "Unknown argument $cmd, choose one of text summary full find"; } } diff --git a/docs/commandref.html b/docs/commandref.html index 586d26a93..a009bfbc9 100644 --- a/docs/commandref.html +++ b/docs/commandref.html @@ -1374,8 +1374,6 @@ A line ending with \ will be concatenated with the next one, so long lines