Re: Addressbook For Mutt

2000-10-05 Thread Pyuesh Daya

Is it possible to run two external programs to run with mutt.  I am already running 
the "Shift Q" to query an external perl script which queries an Ldap ServerIs this 
possible...

How do I bind another stroke key to query another external Program !!

Regards

On Tue, Oct 03, 2000 at 09:42:55PM +0200, Roland Rosenfeld wrote:
 On Tue, 03 Oct 2000, Adahma wrote:
 
  I've not seen abook before, but it's very nice.  Is there a way to
  integrate it closely with mutt, such as if I hit tab when
  addressing a mail, it would send me there and allow me to select and
  pull addresses back into mutt.
 
 Have a look at the query feature of mutt (chapter "4.5. External
 Address Queries" in the mutt manual).  You should try something like
  set query_command="abook --mutt-query '%s'"
 
 Then you can use Ctrl-q (like TAB) to expand a query string to the
 addressbook entry.
 
 Alternatively you can use abook as a backend of lbdb (see lbdb
 documentation for more information about this).
 
  And if I hit 'a' to add an alias, it would add to abook, rather than
  my mutt alias file.
 
 Don't know, whether this is possible (never used abook myself), but it
 shouldn't be hard to write a little script which appends the address
 to ~/.abook.addressbook.  Maybe this could be based on mail2muttalias
 (http://webrum.uni-mannheim.de/jura/moritz/mail2muttalias.shtml).
 
 Tscho
 
 Roland
 
 -- 
  * [EMAIL PROTECTED] * http://www.spinnaker.de/ *
---end quoted text---



Re: Addressbook For Mutt

2000-10-05 Thread Roland Rosenfeld

On Thu, 05 Oct 2000, Pyuesh Daya wrote:

 Is it possible to run two external programs to run with mutt.  I am
 already running the "Shift Q" to query an external perl script which
 queries an Ldap ServerIs this possible...

If you are only talking about Shift-Q (not Ctrl-T), it should be easy
to define some macros, which change query_command and run query after
this.  Something like:

macro index \eq ":set query_command=\"abook --mutt-query '%s'\"\nquery"
macro index Q   ":set query_command=\"ldap_query '%s'\"\nquery"

(not tested!!!)

So ESC q queries abook, while Shift-Q queries ldap.

I personally suggest to use lbdb for situations like this, because
lbdb is able to collect data from different sources by simply
including special modules.  The only problem with this is, that nobody
wrote a LDAP module yet...

Tscho

Roland

-- 
 * [EMAIL PROTECTED] * http://www.spinnaker.de/ *



Re: Addressbook For Mutt

2000-10-05 Thread David Champion

On 2000.10.05, in [EMAIL PROTECTED],
"Pyuesh Daya" [EMAIL PROTECTED] wrote:
 Is it possible to run two external programs to run with mutt.  I am already running 
the "Shift Q" to query an external perl script which queries an Ldap ServerIs 
this possible...
 
 How do I bind another stroke key to query another external Program !!

Assuming you want to query both sources each time, I'd just use a
wrapper:
#!/bin/sh
for query_source in local ldap qi; do
mutt_query_${query_source} "$*"
done | sort | uniq

set query_command="query_wrapper '%s'"

or something like that.  All untested, of course; I only use one
directory source.

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago



Re: Addressbook For Mutt

2000-10-03 Thread Dave Pearson

On Tue, Oct 03, 2000 at 03:01:47PM -0700, Pyuesh Daya wrote:

 Does anybody out there know of an address book that I can use with Mutt. I
 already am using the Perl script that interface with an Ldap server. I am
 looking for an address book that I can using locally on My PC !!

Have a look at URL:http://www.spinnaker.de/lbdb/. You'll find a pointer to
an address book program but you might also find LBDB itself to be useful.

-- 
Take a look in Hagbard's World: | lbdb.el - LBDB interface.
http://www.hagbard.demon.co.uk/ |  sawfish.el - Sawfish mode.
http://www.acemake.com/hagbard/ |  uptimes.el - Record emacs uptimes.
emacs software, including...| quickurl.el - Recall lists of URLs.



Re: Addressbook For Mutt

2000-10-03 Thread Roland Rosenfeld

Hi Pyuesh!

On Tue, 03 Oct 2000, Pyuesh Daya wrote:

 Does anybody out there know of an address book that I can use with
 Mutt.  I already am using the Perl script that interface with an
 Ldap server.  I am looking for an address book that I can using
 locally on My PC !!

I don't exactly know, what you expect an address book to do for you,
but did you have a look at lbdb (http://www.spinnaker.de/lbdb/) or
abook (http://www.linuxstart.com/~jheinonen/abook/)?

Tscho

Roland

-- 
 * [EMAIL PROTECTED] * http://www.spinnaker.de/ *



Pine addressbook to Mutt alias

1999-12-05 Thread Jan Ulrich Hasecke

Hi!

I am looking for a skript, which converts pines addressbook to mutts
alias-file. Do you have a hint?

Ciao!
juh

-- 
Heute ist der 3. Oktober! Basta!
http://www.sudelbuch.de/1999/19991109.html



Re: Pine addressbook to Mutt alias

1999-12-05 Thread Wilhelm Wienemann

Hello Jan!

On Sun, 05 Dec 1999, Jan Ulrich Hasecke wrote:

 I am looking for a skript, which converts pines addressbook to mutts
 alias-file. Do you have a hint?

--- cut here  -
#!/usr/bin/perl

# convert the pine address book to mutt (for the query command).
# First argument (if present) must be a valid reg ex.

open( ADDR, "/usr/home/root/.addressbook" ) or die;
if( $#ARGV = 0 ) {
$match = $ARGV[0];
} else {
$match = ".*";
}

print "Pine's address book, regex=$match\n";

while( ADDR ) {
chomp;
next if /^ /;   # comment lines
next if /^#DEL/;# deleted line
while( /=\?(.*)\?=/ ) {
$a = $1;
$a =~ s/^ISO[^?]*\?.\?//;
$a =~ s/_/ /;
$a =~ s/=(..)/chr(hex($1))/ge;
s/=\?.*\?=/$a/;
}
next unless /$match/oi;
@line = split( /\t/ );
print "$line[2]\t$line[1]\t$line[0]\n";
}

--- cut here  -

bye - Wilhelm

-- 
 Wilhelm Wienemann, Amselweg 10, D-47546 Kalkar/Germany 
==   E-Mail: [EMAIL PROTECTED]  ===
"And since you are the future keepers of everything, including music, we
 hope you will keep it well, with love, and in joy." (Frederick Fennell)