[Remind-Fans] Time of day with SPECIAL HTML

Tim Chase remind at tim.thechases.com
Sat Jan 13 12:09:46 EST 2024


On 2024-01-13 16:17, Remind list wrote:
> I'm using rem2html. When I want a link to appear in the
> calendar, I use something like
> 
> REM 14 Jan 2024 AT 11:00 SPECIAL HTML <p class="rem-entry"> 11:00 <a href="url"> text </a></p>
> 
> I'm including the time (hh:mm) twice, once to control the
> order in which reminders are displayed for that day (independent
> of when the reminders are appended to .reminders), and again
> so it appears with the reminder in the calendar. Is there some
> way to avoid having to include the time twice?

I'd use a function for my URLs/links, something like

  FSET url(u, desc) "<p class=rem-entry>" \
    + trigtime() \
    + "<a href=\"" \
    + u \
    + "\"> " \
    + desc \
    + "</a> </p>"
  REM 14 Jan 2024 AT 11:00 SPECIAL HTML [url("http://example.com", "Do the thing")]

You can get fancier, using iif() to check if trigtime() returns a
non-0 value, and selectively choose to emit the time if so, or check
the trigduration() and have both the start & end times of the event
if you want.  But that should get you started.

-tim







More information about the Remind-fans mailing list