Complete.Org: Mailing Lists: Archives: offlineimap: June 2009:
Re: using more than one nametrans in offlineimaprc
Home

Re: using more than one nametrans in offlineimaprc

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: James Smith <metal.lunchbox@xxxxxxxxx>
Subject: Re: using more than one nametrans in offlineimaprc
From: Paul Hinze <paul.t.hinze@xxxxxxxxx>
Date: Tue, 2 Jun 2009 19:29:23 -0500

James Smith <metal.lunchbox@xxxxxxxxx> on 2009-06-01 at 18:00:
> nametrans = lambda foldername: re.sub('^\[Gmail\]/Drafts','Drafts',foldername)
> nametrans = lambda foldername: re.sub('^\[Gmail\]/Sent\ 
> Mail','Sent',foldername)
> How do I combine these two into one statement?

I too use GMail + offlineimap.  You can use one nametrans to simply drop
the "[Gmail]/" off the front of any folder name.  Here is the
line from my offlineimaprc:

nametrans = lambda foldername: re.sub('^\[Gmail\].', '', foldername)

Cheers,

Paul



[Prev in Thread] Current Thread [Next in Thread]