On Tue, 24 Feb 2004, Jason Greenwood wrote:

> As statey others, it does work perfectly in Mozilla, pops up the address
> book nicely. BUT, I wonder if any OSS can CREATE these 'vcards'?? That
> is the real question.

Here you go - this is nothing fancy, but you can modify or extend it
as you need it. If you would like me to write you a custom
application, contact me off list :-)

BTW, since the amount of data involved is normally not huge, and the
computational effort is quite low, interpreted languages would be
equally appropriate.


#include <stdio.h>

int main(int argc, char **argv)
{
   char * surname, * firstname, * phone, * street;

   if(argc != 5)
   {
      printf("\nERROR!\nUsage:%s firstname surname phone street\nPlease quote any 
arguments containing whitespace.\n", argv[0]);
      return -1;
   }

   surname = argv[2];
   firstname = argv[1];
   phone = argv[3];
   street = argv[4];

   printf("BEGIN:VCARD\nVERSION:2.1\n");
   printf("N:%s;%s\n", surname, firstname);
   printf("TEL;HOME;VOICE:%s\n", phone);
   printf("ADR:;;%s\n", street);
   printf("END:VCARD\n\n");
}


Kind regards,

Helmut.

+----------------+
| Helmut Walle   |
| [EMAIL PROTECTED] |
| 03 - 388 39 54 |
+----------------+


Reply via email to