[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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

On Tue, Nov 12, 2002 at 08:43:23PM +1100, Rob Weir wrote:
> On Tue, Nov 12, 2002 at 10:21:43AM +0530, Sandip P Deshmukh wrote:
> > 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.
> Mutt aliases are designed to handle email aliases; they're not going to
> support things like someones' spouses' name and "Internet Free Busy".

i know. so only i was asking for a solution. this is a very characteristic microsoft way of
making sure that the users just dont go away

> 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).

frightening. i have -never- done programming myself. i will have to spend hours of time on
this and in the meantime, i am helpless without addressbook!

> If you felt extra eager, you could either hack on abook (it's written in

ohh!! thats even more frightening

 to support either the extra fields or arbitrary fields or
> write a script to store all the non-abook-compatible stuff as key=value
> pairs in the 'notes' field.

this also will do.

thanx for help, anyway

sandip p deshmukh

Entreprenuer, n.:
	A high-rolling risk taker who would rather
	be a spectacular failure than a dismal success.

Reply to: