added vimperator, updated folder filter for email, updated vdirsyncer url
[dotfiles.git] / .mutt / offlineimap.py
1 import subprocess
2 import datetime
3 import re
4
5
6 def mailpasswd():
7 return subprocess.check_output('pass mail/mart@martlubbers.net',
8 shell='/bin/bash').strip()
9
10
11 def folderfilter(x):
12 match = re.match('archive\.(\d\d\d\d).(\d\d)', x)
13 if match:
14 return abs(datetime.date.today() -
15 datetime.date(int(match.group(1)), int(match.group(2)), 1)
16 ).days <= 31*2
17 else:
18 return not x.startswith('archive')