From: John Bent <johnbent@lanl.gov>
To: Ali Polatel <alip@exherbo.org>
Cc: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] Problem with lbdb and extra contacts hook
Date: Thu, 11 Mar 2010 14:09:04 -0700 [thread overview]
Message-ID: <1268341630-sup-7494@guava.lanl.gov> (raw)
In-Reply-To: <1253488117-sup-4560@harikalardiyari>
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
John
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
next prev parent reply other threads:[~2010-03-11 21:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-20 21:16 Ali Polatel
2009-09-20 23:11 ` Ali Polatel
2009-09-26 13:48 ` William Morgan
2010-03-11 21:09 ` John Bent [this message]
2010-03-12 9:16 ` Gaute Hope
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1268341630-sup-7494@guava.lanl.gov \
--to=johnbent@lanl.gov \
--cc=alip@exherbo.org \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox