From 71b82fb3850f4176233dad527ef414796cf7ffc0 Mon Sep 17 00:00:00 2001 From: John Goerzen Date: Thu, 4 Jan 2007 23:52:10 +0100 Subject: [PATCH] Removed todo directory from tree Moving todo items to BTS Refs #6. Fixes #4. --- todo/oflpy.py | 57 --------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 todo/oflpy.py diff --git a/todo/oflpy.py b/todo/oflpy.py deleted file mode 100644 index 67720d1..0000000 --- a/todo/oflpy.py +++ /dev/null @@ -1,57 +0,0 @@ -"""oflpy.py - for offlineimaprc use""" -__revision__ = '1.0' - -import re - -# -------------------------------- -folder_s = """\.\.\/|,\ |\/\.|\*|\ \&-\ |\'|\.|\)|\(""" -folder_re = re.compile( folder_s ) - -def getfoldername(foldername): - """substitute for a possibly-buggy IMAP folder name""" - return folder_re.sub('_', foldername) - -def test_gfn(): - """test: substitute for a possibly-buggy IMAP folder name""" - from namet import bad_folders - - for f_name in bad_folders: - #print f_name, '\t\t', getfoldername(f_name) - print getfoldername(f_name) - -# -------------------------------- -filter_s = """^Public Folders|^Calendar|^Contacts|^Tasks|^Drafts|^Journal|^[a-zA-Z0-9 _\-/!]+/\.$""" -filter_s = """^Public Folders|^Calendar|^Contacts|^Tasks|^Drafts|^Journal""" -filter_re = re.compile( filter_s ) - -def filterfolders(foldername): - """test for, and filter out some IMAP folders""" - res = filter_re.match(foldername) - - if res: - return None - else: - return foldername - - -def test_ff(): - """test: test for, and filter out some IMAP folders""" - from namet2 import some_bad - - for f_name in some_bad: - #print f_name, '\t\t', getfoldername(f_name) - print filterfolders(f_name) - -#test_gfn() -# -#test_ff() - -# Then in .offlineimaprc: -# -#[general] -# pythonfile = ~/.offlineimap.py -# -#[Repository Remote] -# nametrans = getfoldername -# -# folderfilter = filterfolders