[Remind-Fans] Re: reminders as XML or HTML?

Jason Jenkins jj at aol.net
Mon Mar 28 15:10:28 EST 2005


On Sat, 2005-03-26 at 12:07 -0500, Ingo Weiss wrote:
 >Hi,
 >
 >I was wondering whether it is possible to have remind output reminders
 >in a structured format such as XML or a HTML bulleted list. I would 
like
 >to put my reminders on my browser default page.
 >

In a nutshell, I pipe the output of remind through the Markdown 
text-to-xhtml conversion utility to generate an chunk of html that I 
then include in on my person work homepage.  If you're not familiar 
with it, [Markdown](http://daringfireball.net/projects/markdown/) is a 
very nifty perl script that takes semi-structured plain text and 
converts it to (x)html. (FYI, the text of this email is an example of 
the plain-text syntax that Markdown uses.)

To get the output of remind into a format that Markdown likes, I 
include the following in my .reminders:

     BANNER ##Reminders for %w, %d%s %m, %y%o:##
     # Create a default sortbanner function if it hasn't already
     # been defined
     if args("sortbanner") != 1

         fset sortbanner(x) "###Things to do %b ###%"
     endif
     fset msgprefix(x) "* "
     fset msgsuffix(x) ""

With that, running `/usr/local/bin/rem -m -b1 -q -ga` will produce for 
example:

     ##Reminders for Monday, 28th March, 2005 (today):##

     ###Things to do today ###
     * DNR Daily Status Meeting at 10:45am
     * DNR Iteration Planning Meeting in Matisse: 2I00 today at 1:00pm

     ###Things to do in 3 days' time ###
     * My 4th Wedding Anniversary

     ###Things to do in 28 days' time ###
     * Claire's 2nd Birthday

Which I think is pretty readable in and of itself.  I then pipe this 
through Markdown (`/usr/local/bin/remind -m -b1 -q -ga 
/Users/jenkinsj/.reminders| /usr/local/bin/Markdown.pl`) to produce the 
following xhtml:

     <h2>Reminders for Monday, 28th March, 2005 (today):</h2>

     <h3>Things to do today</h3>

     <ul>
     <li>DNR Daily Status Meeting at 10:45am </li>
     <li>DNR Iteration Planning Meeting in Matisse: 2I00 today at 
1:00pm</li>
     </ul>

     <h3>Things to do in 3 days' time</h3>

     <ul>
     <li>My 4th Wedding Anniversary</li>
     </ul>

     <h3>Things to do in 28 days' time</h3>

     <ul>
     <li>Claire's 2nd Birthday</li>
     </ul>

I then use an `<iframe>` to include that bit of xhtml on the home page 
of the wiki that I use as a person content management system.  Hope 
that helps.

Jason


  
    




More information about the Remind-fans mailing list