[Remind-Fans] Can I know if a reminder is a separator?

Paul Pelzl pelzlpj at eecs.umich.edu
Tue Sep 19 16:55:14 EDT 2006


On Tue, Sep 19, 2006 at 12:10:46PM -0400, Justin Alcorn wrote:
> I have a .reminders file with lines like:
> 
> IF defined("web")
>      SET NrmPre "<span class='normal'>"
>      SET Nrm   "</span>"
>      SET Blk   "<span>"
>      SET Red   "<span class='important'>"
>      SET Grn   "<span>"
>      SET Ylw   "<span>"
>      SET Blu   "<span class='notice'>"
>      SET Mag   "<span>"
>      SET Cyn   "<span>"
>      SET Wht   "<span>"
>      SET Gry   "<span>"
>      SET BrRed "<span class='urgent'>"
>      SET BrGrn "<span>"
>      SET BrYlw "<span>"
>      SET BrBlu "<span class='warning'>"
>      SET BrMag "<span>"
>      SET BrCyn "<span>"
>      SET BrWht "<span>"
>      SET Bull  "&bull;"
>      FSET msgprefix(x) iif(x<999, BrRed, x<1001, Red, x<1400, 
> BrBlu,x<5000, Blu, NrmPre)
>      FSET msgsuffix(x) Nrm
> ENDIF
> MSG %"%"%
> MSG Reminders: %"%"%
> REM 25 +7 MSG Check Cars %"%"%
> 
> And it is called by my personal portal as:
> 
> remind -q -iweb=1 .reminders
> 
> So the result is:
> <span class='normal'> </span>
> <span class='normal'>Reminders: </span>
> <span class='normal'>Check Cars </span>
> 
> And it looks nice in the portal.  The question is can I set an IF 
> statement to tell the difference between a separator:
> 
> MSG Reminders: %"%"%
> 
> And a "real" reminder:
> 
> REM 25 +7 MSG Check Cars %"%"%


I imagine you could just use a special PRIORITY value to represent
separators, something like this:

   IF defined("web")
      ...
      FSET msgprefix(x) iif(x==0, Bull+NrmPre, x<999, BrRed, x<1001, Red, x<1400, BrBlu,x<5000, Blu, NrmPre)
      ... 
   ENDIF

   REM PRIORITY 0 MSG Reminders: %"%"%
   REM 25 +7 MSG Check Cars %"%"%

Is that about what you're looking for?

Paul





More information about the Remind-fans mailing list