|
|
|
@ -7,7 +7,7 @@ from __future__ import division, print_function
|
|
|
|
|
import os
|
|
|
|
|
import os.path
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
import yaml
|
|
|
|
|
|
|
|
|
|
def maildirs(startdir):
|
|
|
|
|
for dirpath, dirnames, _ in os.walk(startdir):
|
|
|
|
@ -35,9 +35,15 @@ def mailbox_name(maildir, root):
|
|
|
|
|
return name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ignore_zero = True
|
|
|
|
|
ignore = [r'spam']
|
|
|
|
|
sort_by_count = True
|
|
|
|
|
config_filename = '~/.config/maildir-zero.yml'
|
|
|
|
|
config = {}
|
|
|
|
|
try:
|
|
|
|
|
config = yaml.load(open(os.path.expanduser(config_filename)))
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
ignore_zero = config.setdefault('ignore_zero', True)
|
|
|
|
|
ignore = config.setdefault('ignore', [r'spam'])
|
|
|
|
|
sort_by_count = config.setdefault('sort_by_count', True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
root = os.path.expanduser('~/Maildir')
|
|
|
|
|