[Remind-Fans] controlling the outpur of -s
Andrew Ho
andrewho at andrewho.co.uk
Tue Jun 22 11:47:51 EDT 2010
tsr.offentlig at tsr.se <tsr.offentlig at tsr.se> wrote [2010-06-22 14:09 +0200]:
>I've just discovered remind and I think I've finnaly managed to set
>up my national holidays (will post on 43folders-wiki soon)
Last time I tried, the 43folders wiki wasn't letting me create an
account. If we really have become unable to update that wiki, perhaps
we should think about setting up another one (I have some scripts that
might be of interest to British remind users).
>2) The output is almost perfect (I want to incorporate the
>wekk-nr-thing I saw in the mail archive) but I wonder if I can reformat
>it so that:
>2010/06/22 * peradm 60 900 15:00-16:00 appointment-text-consorship
>becomes:
>Tue 2010-06-22 15:00-16:00 [peradm] appointment-text-consorship Wen
You could this with (g)awk quite easily -- it's what I use to
manipulate remind. Just pipe the output through:
#!/usr/bin/gawk -f
{
date = strftime("%a %Y-%m-%d", mktime(gensub(/\//, " ", "g", $1) " 00 00 00"))
time = $6
tag = ($3 == "*") ? "*" : "[" $3 "]"
body = substr($0, length($1 $2 $3 $4 $5 $6) + 7)
printf "%s %-11s %-8s %s\n", date, time, tag, body
}
YMMV; you may want to tweak that script as it's just what I hacked up
and may not be robust enough.
Regards,
Andrew
More information about the Remind-fans
mailing list