Remind::Client - class for working with remind's daemon mode
package Remind::Client::something; use base 'Remind::Client'; sub reminder { my ($self, %args) = @_; say "Got the message: $args{message}"; } package main; my $rc = Remind::Client::something->new(); $rc->run();
This module provides methods for communicating with the "Server Mode" of remind. It
Construct a new Remind::Client object. Takes the following named parameters:
The filename of the reminders file to use. Defaults to $ENV{DOTREMINDERS}, if it exists, or ~/.reminders.
Start up an instance of remind in server mode, and begin to listen for events.
This handler is fired whenever a reminder is sent from remind. So, for a timed reminder like:
REM 01 Oct 2009 AT 10:50 +10 *5 MSG It's time%
This would be fired at 10:40, 10:45, and 10:50.
It receives the following named parameters:
The reminder message; chomped. In the above example, it would be "It's time".
The time this reminder is set for. In the above example, it would always be '10:50am'.
The time this reminder fired. In the above example, it would be '10:40am', '10:45am', and '10:50am'.
The TAG from the reminder. If there is no TAG, then it defaults to '*'.
The default implementation does nothing; most subclasses of Remind::Client will want to implement this.
This is fired when the day changes over. Use it to do things like check for new daily reminders.
This receives no parameters.
The default implementation does nothing.
This is fired when the number of reminders in the queue changes because the day has changed, or because of a REREAD command. The recommendation is to issue a 'STATUS' command in response to this.
This is fired as a result of a STATUS command. It receives the following named parameters:
The number of reminders that are queued.
Send a command to the remind server.
Takes one named parameter, command. It may be one of:
command
Tell the remind server to exit. This will also finish the current run().
Request the current number of queued reminders from the server. This will result in a queued() event being fired.
Request that the server reread the configuration. This will result in a reread() event being fired.
This is fired once, after $rc->run() has started up the remind server. It is useful for checking for things like daily reminders, etc.
It receives no parameters.
Default SIGHUP handler. Sends a REREAD command to the server.
This doesn't provide any useful support for non-timed reminders (yet).
"SERVER MODE" in tkremind(1), remind(1)
Remind::Parser for a tool to parse the calendar output.
Remind's Homepage: http://www.roaringpenguin.com/products/remind
Mike Kelly <pioto@pioto.org>
Copyright (C) 2009, Mike Kelly.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses at <http://www.perlfoundation.org/artistic_license_1_0>, and <http://www.gnu.org/licenses/gpl-2.0.html>.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
To install Remind::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Remind::Client
CPAN shell
perl -MCPAN -e shell install Remind::Client
For more information on module installation, please visit the detailed CPAN module installation guide.