[Remind-Fans] a slacker syntax for .reminders ?
Justin Alcorn
justin at jalcorn.net
Wed Oct 10 10:16:37 EDT 2007
Everybody OK it I post this and the python script on the wiki?
David F. Skoll wrote:
> 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.
> _______________________________________________
> Remind-fans mailing list
> Remind-fans at lists.whatexit.org
> http://lists.whatexit.org/mailman/listinfo/remind-fans
More information about the Remind-fans
mailing list