From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost ([158.37.47.135]) by mx.google.com with ESMTPS id 15sm763404ewy.0.2010.03.12.01.16.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Mar 2010 01:16:38 -0800 (PST) From: Gaute Hope To: sup-talk Subject: Re: [sup-talk] Problem with lbdb and extra contacts hook In-reply-to: <1268341630-sup-7494@guava.lanl.gov> References: <1253481392-sup-4891@harikalardiyari> <1253488117-sup-4560@harikalardiyari> <1268341630-sup-7494@guava.lanl.gov> Date: Fri, 12 Mar 2010 10:16:52 +0100 Message-Id: <1268385173-sup-5542@dolk> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="=-1268385415-213467-4101-1850-1-=" MIME-Version: 1.0 --=-1268385415-213467-4101-1850-1-= Content-Type: text/plain; charset=UTF-8 Excerpts from John Bent's message of 2010-03-11 22:09:04 +0100: > Excerpts from Ali Polatel's message of Sun Sep 20 17:11:04 -0600 2009: > > Ali Polatel yazmış: > > > Hello, > > > I've just started using sup and I'm really loving it. > > > Thanks for the great software. > > > > > > I have a problem with extra-contact-addresses hook and lbdb. > > > Using the hook in the wiki: > > > contacts = [] > > > `lbdbq |awk -F"\t" '{print $2 , "<"$1">"}'`.each { |c| contacts.push(c) } > > > return contacts > > > > Answering myself, removing return from the last line works as expected! > > I'll see if I can edit the wiki. > > > By the way, I recently used this hook as well and found it really slow > so I rewrote it to parse the lbdb by hand instead of calling out to > lbdb. For me, it went from 1.5s to 0.03s. I edited the wiki as well. > Here's the hook: > > file = File.open( ENV['HOME'] + "/.lbdb/m_inmail.list", "r" ) > contacts = [] > while file.gets > email,name = split("\t") > contacts << "#{name} <#{email}>" > end > file.close > contacts This doesn't do the same thou as far as I can see, your hook only uses the addresses returned by the module using m_inmail.list; the former one uses all configured modules. - gaute --=-1268385415-213467-4101-1850-1-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkuaBoQACgkQCLbddHnmqqYHtACfdzmmaQ1+B+oMahqsmO8i9Ll8 KMEAnRrGTjx97b0Nw9TtA16pLV9D4Bq6 =v9Yj -----END PGP SIGNATURE----- --=-1268385415-213467-4101-1850-1-=--