Dave | 5 Mar 2012 20:18
Picon

MSG and RUN possible, or something similar?

Dear Remind-Fans,

I am a relatively new user to remind and have been reading the 
documentation and experimenting with the software for the last couple of 
weeks.  It seems like very powerful and flexible software and thanks to 
Mr. Skoll for writing it and making it available to the community.

I do have a challenge I am trying to solve, and I'm hoping someone on 
the list could point me in the right direction.  Mostly I am looking to 
use remind to do two things; (1) provide a visual alert to my terminal 
when a reminder occurs, and (2) send me a reminder via email of an 
upcoming appointment (in case I'm not at the terminal).  For many cases, 
but not all, I want both 1 & 2 to happen for the same event.  In order 
to satisfy both things, I seem to need to add each appointment or 
reminder entry twice, once using MSG to output to the terminal and once 
using RUN to get remind to send me a reminder email.  For example, this 
is what I am currently doing:

REM Mar 5 AT 11:00 MSG Important Appointment
REM Mar 5 AT 11:00 RUN echo "Appointment to review stuff." | mail -s 
"Time for Appt." user@...

Is there any way I can have remind do both of these things without 
having to enter each appointment twice?  I also want to see appointments 
cleanly in the calendar view (as I can now), and have found that RUN 
statements are ignored there, but MSG statements show cleanly, so it 
would great to have that work with any solution which is proposed as well.

Thanks for any tips in this regard.
-Dave
(Continue reading)

David F. Skoll | 5 Mar 2012 20:17
Favicon

Re: MSG and RUN possible, or something similar?

On Mon, 05 Mar 2012 14:18:37 -0500
Dave <davo812@...> wrote:

> REM Mar 5 AT 11:00 MSG Important Appointment
> REM Mar 5 AT 11:00 RUN echo "Appointment to review stuff." | mail -s 
> "Time for Appt." user@...

> Is there any way I can have remind do both of these things without 
> having to enter each appointment twice?

You can invoke Remind like this:

remind '-kmy_magic_script %s' ...

Then you only use the MSG form and write a program called
my_magic_script that both echoes its argument to the terminal and
sends off an email.

See the man page for documentation on the "-k" option.

Regards,

David.
Dave | 6 Mar 2012 00:51
Picon

Re: MSG and RUN possible, or something similar?

Thanks for the suggestion David.  That sounds like it should work and I 
will certainly give it a try.

Regards,
Dave

On 3/5/2012 2:17 PM, David F. Skoll wrote:
> On Mon, 05 Mar 2012 14:18:37 -0500
> Dave<davo812@...>  wrote:
>
>> REM Mar 5 AT 11:00 MSG Important Appointment
>> REM Mar 5 AT 11:00 RUN echo "Appointment to review stuff." | mail -s
>> "Time for Appt." user@...
>> Is there any way I can have remind do both of these things without
>> having to enter each appointment twice?
> You can invoke Remind like this:
>
> remind '-kmy_magic_script %s' ...
>
> Then you only use the MSG form and write a program called
> my_magic_script that both echoes its argument to the terminal and
> sends off an email.
>
> See the man page for documentation on the "-k" option.
>
> Regards,
>
> David.
> _______________________________________________
> Remind-fans mailing list
(Continue reading)

Dave | 6 Mar 2012 19:25
Picon

Re: MSG and RUN possible, or something similar?

Using -kcmd seems to be working relatively well, and I am using a 
trigger character to determine if that particular message should be 
emailed or just displayed.  Basically, if the message ends in a period, 
I send an email as well.  I have one followup question for now.

After instantiating remind using -k<magic-script>, will changes to the 
script be picked up by remind or does it need to be killed and restarted 
to see the changes?

I also have an unrelated question regarding the calendar.  Is it 
possible to display the calendar in an ncurses-based terminal such that 
the screen is not cleared after the calendar is shown?  The screen 
clearing is the opposite behavior I want or would expect.  This could be 
something with my terminal, but I don't think so.

Thanks very much,
Dave

On 3/5/2012 2:17 PM, David F. Skoll wrote:
> On Mon, 05 Mar 2012 14:18:37 -0500
> Dave<davo812@...>  wrote:
>
>> REM Mar 5 AT 11:00 MSG Important Appointment
>> REM Mar 5 AT 11:00 RUN echo "Appointment to review stuff." | mail -s
>> "Time for Appt." user@...
>> Is there any way I can have remind do both of these things without
>> having to enter each appointment twice?
> You can invoke Remind like this:
>
> remind '-kmy_magic_script %s' ...
(Continue reading)

David F. Skoll | 6 Mar 2012 19:39
Favicon

Re: MSG and RUN possible, or something similar?

On Tue, 06 Mar 2012 13:25:32 -0500
Dave <davo812@...> wrote:

> After instantiating remind using -k<magic-script>, will changes to
> the script be picked up by remind or does it need to be killed and
> restarted to see the changes?

Changes will be picked up since Remind executes the script anew each time.

> I also have an unrelated question regarding the calendar.  Is it
> possible to display the calendar in an ncurses-based terminal such
> that the screen is not cleared after the calendar is shown?  The
> screen clearing is the opposite behavior I want or would expect.
> This could be something with my terminal, but I don't think so.

AFAIK, "remind -c ..." does not clear the terminal.  If you pipe it into
"less", that might be the culprit.

Regards,

David.
Dave | 6 Mar 2012 21:26
Picon

Re: MSG and RUN possible, or something similar?

So changes will be picked up in cmd as well as changes in the reminders 
file.  Good to know.

As far the terminal clearing goes, I am not using less and have tried 
various terminal settings (i.e. xterm, vt100, vt220), but so far, the 
screen always instantly clears after displaying the calendar.  Maybe 
this is something particular to the OpenBSD package of remind, but I 
would be surprised if that were the case.  I'm am just running "remind 
-c1 .reminders" and in fact, if I use less, that actually helps as it 
stops the screen from clearing, at least while less is running.

Any other thoughts on that?
Thanks again,
Dave

On 3/6/2012 1:39 PM, David F. Skoll wrote:
> On Tue, 06 Mar 2012 13:25:32 -0500
> Dave<davo812@...>  wrote:
>
>> After instantiating remind using -k<magic-script>, will changes to
>> the script be picked up by remind or does it need to be killed and
>> restarted to see the changes?
> Changes will be picked up since Remind executes the script anew each time.
>
>> I also have an unrelated question regarding the calendar.  Is it
>> possible to display the calendar in an ncurses-based terminal such
>> that the screen is not cleared after the calendar is shown?  The
>> screen clearing is the opposite behavior I want or would expect.
>> This could be something with my terminal, but I don't think so.
> AFAIK, "remind -c ..." does not clear the terminal.  If you pipe it into
(Continue reading)

David F. Skoll | 6 Mar 2012 21:29
Favicon

Re: MSG and RUN possible, or something similar?

On Tue, 06 Mar 2012 15:26:35 -0500
Dave <davo812@...> wrote:

> "remind -c1 .reminders" and in fact, if I use less, that actually
> helps as it stops the screen from clearing, at least while less is
> running.

Ah... Remind outputs a form-feed (^L) after each page of the calendar.
This might be what's clearing your screen.  On Linux, at least, piping
it like this:

   remind -c1 ... | sed -e 's/\xc//'

gets rid of the form-feed.

Regards,

David.
Dave | 6 Mar 2012 21:55
Picon

Re: MSG and RUN possible, or something similar?

Yes, the ^L at the bottom of the less screen make me realize the 
situation as I received your reply.  The sed expression of \xc didn't 
work for me, but using  tr -d "\f"  did the trick.

Thanks very much for your help!
Best regards,
Dave

On 3/6/2012 3:29 PM, David F. Skoll wrote:
> On Tue, 06 Mar 2012 15:26:35 -0500
> Dave<davo812@...>  wrote:
>
>> "remind -c1 .reminders" and in fact, if I use less, that actually
>> helps as it stops the screen from clearing, at least while less is
>> running.
> Ah... Remind outputs a form-feed (^L) after each page of the calendar.
> This might be what's clearing your screen.  On Linux, at least, piping
> it like this:
>
>     remind -c1 ... | sed -e 's/\xc//'
>
> gets rid of the form-feed.
>
> Regards,
>
> David.
> _______________________________________________
> Remind-fans mailing list
> Remind-fans@...
> http://lists.roaringpenguin.com/cgi-bin/mailman/listinfo/remind-fans
(Continue reading)

Ted Rolle, Jr. | 7 Mar 2012 00:37
Picon

Simplicity

Here's my remind command:
rem
The program is a script at /usr/local/bin/rem
Contents:
remind -b1c+$1 ~/.remind

Invoking just 'rem' defaults to one week.  If I want two weeks, it's
rem 2

I run Ubuntu Linux 11.10.  No screen blanking here.
Most of the time I just 'rem' and get the current week's events.

Ted
hubert depesz lubaczewski | 7 Mar 2012 07:31
Gravatar

Problem with timed events with long warning time

hi
i have following line in my .reminders:

REM Wed AT 16:00 +1140 *60  MSG whateves

the problem is that *no* reminders are sent on Tuesday.
First reminder is actually sent at 1am Wednesday.

Is there anything that can be done about it, short of adding new
reminder that would ping me 3 times on tuesday?

Best regards,

depesz

--

-- 
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/

Gmane