[Remind-Fans] how to make my tkremind calendar match my HTML calendar

Dianne Skoll dianne at skoll.ca
Thu Mar 2 08:48:10 EST 2023


On Thu, 2 Mar 2023 06:05:04 -0500
"Ian! D. Allen via Remind-fans" <remind-fans at lists.skoll.ca> wrote:

> I build a lot of entries in my reminder file that look like this:
> 
>     SET t "Some text"
>     SET d "Mon"
>     REM [d] MSG %"%" [t]
>     REM [d] SPECIAL HTML <a href="...some link...">[t]</a>
> 
> This gives me nice output for "rem -g" and nice URL links in my HTML
> calendar.

> So I get no visible reminders for these types of entries in tkremind.
> How do you handle this?

The ways you suggested are fine,  I like setting the tk variable.  Or
you could even do this:

    IF defined("tkremind")
       fset nc(x) x
    ELSE
       fset nc(x) "%\"%\"" + x
    ENDIF

    SET t "Some text"
    SET d Mon
    REM [d] MSG [nc(t)]
    REM [d] SPECIAL HTML <a href="...">[t]</a>

On somewhat of a tangent, it also occurs to me that a couple of
built-in functions might be handy:

1: htmlescape(str) that converts &, < and > to &, < and >
   respectively.
2: htmlstriptags(str) that strips HTML tags.  In other words:

 htmlstriptags("<a href=\"foo\">something</a>") would return "something"

I might add those if I feel inclined to hack on Remind.

> I'd love to see some "best practice" examples in the tkremind man
> page.

I don't know that there really *is* a best-practice for this sort of
thing.  I think it belongs in the Cookbook section of the Remind wiki
at https://dianne.skoll.ca/wiki/Remind (which could really use some
refreshing and an overhaul...)

Regards,

Dianne.


More information about the Remind-fans mailing list