From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 03 Sep 2009 08:37:50 -0700 Subject: [sup-talk] Dynamic list of maildir folders as sources In-Reply-To: <20090903142640.GB4465@matterhorn.verdurent.com> References: <20090903142640.GB4465@matterhorn.verdurent.com> Message-ID: <1251991617-sup-9735@masanjin.net> Reformatted excerpts from Amit Kucheria's message of 2009-09-03: > I've been watching sup for a while and finally decided to take the > plunge today. Welcome! > I've run sup-config and it seems to expect that I list every maildir > folder I've got. Is there a way to generate this dynamically? If you can generate the list (e.g. with the find command you cited), you can add maildir sources with sup-add directly, instead of having to go through sup-config. If you want to automatically detect and add new folders, we could d something similar in the startup hook. Something like (completely untested): dirs = `find ~/Mail/whatever...` dirs.each do |d| uri = "maildir:#{d}" log "trying #{uri}..." unless SourceManager.source_for uri source = Maildir.new uri SourceManager.add_source source log "Added #{uri}" end end > p.s. sup-sync has been at it on my lkml folder with ~40K mail messages > for 30mins now. Yep, indexing stuff is slow. FWIW, you only have to do it once, and there are new index backends that are significantly faster. (But still far from instantaneous.) -- William