[Remind-Fans] a slacker syntax for .reminders ?

Daniel A Graham daniel.graham at duke.edu
Tue Oct 9 19:14:46 EDT 2007


Not perl, but here's a python script to do the job:
-------------------snip---------------------
#!/usr/bin/env python
# encoding: utf-8

import sys
import os, re

remind = re.compile(r'^\s*rem\s.*$', re.IGNORECASE)

fo = open(sys.argv[1],'r')
lines = fo.readlines()
fo.close()

for line in lines:
	# print line
	if remind.match(line):
		print "%s" % line.strip()

-------------------snip---------------------

If you name it remlines.py then the usage would be

$ remlines.py <path to your file including rem lines>

The relevant lines will be written to stdout.

-Dan



More information about the Remind-fans mailing list