On Tue, 22 Apr 2025 16:40:24 -0500
Tim Chase via Remind-fans <[email protected]> wrote:

> I suspect it might be possible to cobble together something to
> post-process the output but `rem -p+` doesn't seem to emit the COLOR
> information like `-s` provides, and `-s` doesn't seem to support the
> "+" according to the man-page:

Yes, -p+ supports COLOR information:

echo "REM Wed SPECIAL COLOR 255 0 0 Foo" | remind -p+ -

does include the color info in the entry.  If I prettify the JSON,
there's this excerpt:

      "entries" : [
         {
            "b" : 0,
            "body" : "255 0 0 Foo",
            "date" : "2025-04-23",
            "g" : 0,
            "passthru" : "COLOR",      <---- NOTE
            "plain_body" : "Foo",
            "priority" : 5000,
            "r" : 255,
            "rawbody" : "Foo",
            "wd" : [
               "Wednesday"
            ]
         }
      ],

The "r", "b" and "g" entries are the color components.

-pp[p] and -p+ are the official ways to integrate back-ends;
they output JSON with all sorts of information (including COLOR info.)
The JSON format is documented in "man rem2ps" and "-s" output is...
well, not exactly deprecated, but it's more for human consumption than
for interchange with other tools, though it can be used as an
interchange format for very simple cases.

Regards,

Dianne.
_______________________________________________
Remind-fans mailing list
[email protected]
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/

Reply via email to