Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

repost - import a csv file as addressbook for mutt (abook)

163 views
Skip to first unread message

Sandip P Deshmukh

unread,
Nov 11, 2002, 11:52:26 PM11/11/02
to
hello all!

i could convert my outlook contact folder information into a csv file. it has several fields
that are uncommon - spouse's name, etc.

now, i have started using mutt and will like to use information in the same file. either as
aliases or through abook.

i tried abook --convert option but it does not work.

any suggestions on how can i do that?

thanx in advance

sandip p deshmukh
------***--------

The sky is blue so we know where to stop mowing.
-- Judge Harold T. Stone


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org


Rob Weir

unread,
Nov 12, 2002, 7:12:03 AM11/12/02
to

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 12, 2002 at 10:21:43AM +0530, Sandip P Deshmukh wrote:
> hello all!
>=20


> i could convert my outlook contact folder information into a csv file.
> it has several fields that are uncommon - spouse's name, etc.

>=20


> now, i have started using mutt and will like to use information in the
> same file. either as aliases or through abook.

Mutt aliases are designed to handle email aliases; they're not going to
support things like someones' spouses' name and "Internet Free Busy".
Even abook doesn't support all the fields you posted. My suggestion
would be to make this your very first perl project. Start simple,
learning how to load the file into an array of lines, then splitting
each line into a bloody enormous hash (with the field names as keys),
then searching through, then adding new records and deleting old ones.
It wouldn't take more than a couple hundred lines, I'd wager. My big
hint would be to have a look at the 'split' function (man perlfunc), how
arrays and hashes work (man perldata) and Data::Dumper (man
Data::Dumper).

If you felt extra eager, you could either hack on abook (it's written in
C, AFAICT) to support either the extra fields or arbitrary fields or
write a script to store all the non-abook-compatible stuff as key=3Dvalue
pairs in the 'notes' field.

If you have any problems, then I'm sure there's dozens of
Perl-knowledgeable people on this list who would be happy to help you.
Also try to find a Perl Mongers list near you (http://www.pm.org/,
IIRC).

-rob

--G4iJoqBmSsgzjUCe
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE90M07vQ+DhR5zt80RAlMGAJ98Ibkt6wexifiDSxudzFo3tsQtBACfd96+
oFpJhuMUuYWwFOXg5VbA1v4=
=Zc8z
-----END PGP SIGNATURE-----

--G4iJoqBmSsgzjUCe--

0 new messages