[Remind-Fans] a slacker syntax for .reminders ?
David F. Skoll
dfs at roaringpenguin.com
Tue Oct 9 19:36:18 EDT 2007
Daniel A Graham wrote:
> Not perl, but here's a python script to do the job:
> remind = re.compile(r'^\s*rem\s.*$', re.IGNORECASE)
The original poster wanted lines cut at the final %. So if you have:
REM Monday MSG I hate %"Mondays%" %
then Remind would be fed:
REM Monday MSG I hate %"Mondays%"
So here's a Perl one-liner:
perl -ne 'print "$1\n" if /^\s*(REM.*)%/i or /^\s*(REM.*)/i'
And a shell script:
#!/bin/sh
perl -ne 'print "$1\n" if /^\s*(REM.*)%/i or /^\s*(REM.*)/i' $1 | remind -
(I am 100% certain a true Perl guru can combine the regexes, but
I'm too lazy.)
Regards,
David.
More information about the Remind-fans
mailing list