[Remind-Fans] Date::Remind::Event - Manipulate remind output with Perl
Mark Lawrence
nomad at null.net
Sat Jun 26 12:41:57 EDT 2010
Recently, David F. Skoll wrote:
>
> That is a job for Perl.
For those more inclinded towards a Perl-based solution (rather than the
recently posted awk-based ones) for manipulating remind output, I have
just uploaded to CPAN a new module called Date::Remind::Event. It will
take a couple of hours to index and propagate to all mirrors, so below
is the documentation for the curious.
There is also a "example/remind-simple" file in the distribution which
shows you one possible way of calling "remind" and parsing its output.
In case you feel inclined to hack on this I have a public repository on
github:
git clone git://github.com/mlawren/date-remind-event.git
Feedback is welcome.
Regards,
Mark.
------------------------------------------------------------------
NAME
Date::Remind::Event - A 'remind' event object
SYNOPSIS
use Date::Remind::Event;
my $e = Date::Remind::Event->new(
'2010/08/15 * * * * My Event'
);
print 'Start: ' . $e->date->hms . "\n";
print 'Duration: ' . $e->dur->minutes . "min\n";
print 'Description: ' . $e->body . "\n";
DESCRIPTION
Date::Remind::Event provides an object interface to remind(1) generated
events.
CONSTRUCTOR
new($text) => Date::Remind::Event
Convert a single line of $text into a Date::Remind::Event object. $text
is expected to be a line of the output produced by the '-s' argument to
remind(1), as defined in the rem2ps(1) manpage under "REM2PS INPUT
FORMAT".
ATTRIBUTES
date => DateTime
The start of the event.
dur => DateTime::Duration
The length of the event.
end => DateTime
The end of the remind event.
tag => string
The TAG value of the event.
body => string
The body of the remind event.
SEE ALSO
DateTime, DateTime::Duration, remind(1), rem2ps(1)
AUTHOR
Mark Lawrence <nomad at null.net>
COPYRIGHT AND LICENSE
Copyright 2010 Mark Lawrence <nomad at null.net>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
--
Mark Lawrence
More information about the Remind-fans
mailing list