Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Importing contacts to GPE

    Reply
    Page 3 of 6 | Prev |   1     2   3   4     5   | Next | Last
    BoxOfSnoo | # 21 | 2008-01-18, 02:10 | Report

    I got it working, but it was a struggle. Try this:

    Get your .vcf file ready. Open it up in a text editor.

    Replace "BEGIN:VCARD" with "ADD VCARD BEGIN:VCARD" (don't use the quotes)

    Next, replace "END:VCARD" with "END:VCARD
    QUIT" (please note that I used a carriage return in there. Find a text editor that allows you to search and replace with regular expressions.

    Now run: gpesyncd < yourfile.vcf

    Please tell me this works. I actually went one step farther to get it to work (I used a short perl script to split each address into separate files). If you don't have to do that, so much better. If you need it, I'll gladly post the script.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    kudos1uk | # 22 | 2008-01-18, 09:37 | Report

    Originally Posted by BoxOfSnoo View Post
    Please tell me this works.
    I was full of hope for a moment...... damn, no luck here.

    I used this web site to convert an Outlook .csv to .vcf

    http://homepage.mac.com/phrogz/CSV2vCard_v2.html

    Then used your text changes but still failed.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    BoxOfSnoo | # 23 | 2008-01-18, 12:07 | Report

    Ok time to pull out the big guns.

    Code:
    #!/usr/bin/perl
    
    my $fn=100;
    my $lastfn=0;
    
    while (<>) {
      if ($_ =~ (/^\n/)) { $fn+=1; print JOUTFILE "\n"; next;}
      if ($fn != $lastfn) {
        if (<JOUTFILE>) {    print JOUTFILE "quit\n"; }
        close(JOUTFILE);
        open(JOUTFILE, ">new$fn.vcf");
        $lastfn=$fn;
        print JOUTFILE "ADD VCARD $_";
      } else {
        if ($_ =~ (/^END:VCARD/)) { print JOUTFILE $_ . "quit\n"; next;}
        print JOUTFILE $_;
      }
    }
    Take your original .vcf (you don't need the manual changes I got you to do before) and pass it to this script. I suggest you make another directory for this, because you're going to have a lot of files.

    Code:
    mkdir vcf
    cd vcf
    perl ../vconvert.pl ../yourfile.vcf
    You should have one .vcf file per contact with the gpesyncd changes in there already. Now, it's importing time! Make sure you do this as user, because it's user's contacts.

    Code:
    for i in $(ls new*.vcf); do gpesyncd - ; done
    Again, keep me posted.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    DJames1 | # 24 | 2008-01-18, 16:51 | Report

    Originally Posted by kudos1uk View Post
    I was full of hope for a moment...... damn, no luck here.

    I used this web site to convert an Outlook .csv to .vcf

    http://homepage.mac.com/phrogz/CSV2vCard_v2.html

    Then used your text changes but still failed.
    Wait, my spreadsheet vcf cleaner is almost done.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    abby_normal | # 25 | 2008-01-18, 16:59 | Report

    After the difficulties discussed in this thread, I was a bit surprised (but gratified) that I was able to export my address book as vCard (2.1) from Lotus Notes, then import to GPE, on the first pass. It took a LONG time to import the file, though . . . my address book was only 69K, but it took 20-25 minutes for the import to finish. I thought for sure it had given up the ghost. The addresses were slightly munged in the process (city and state were transposed), but nothing I can't clean up manually.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    scurrie | # 26 | 2008-01-18, 17:00 | Report

    Originally Posted by DJames1 View Post
    Me too, same libraries.

    But I've discovered that the problem is not GPE Contacts, it's in OS2008's network file access!

    As a shortcut in transferring a vcf file from my Windows PC to the N800, I just import it directly from a shared folder on the PC to GPE Contacts. That worked fine using Wizard Mounter in OS2007. In OS2008 it appears to work, but something's going wrong - GPE Contacts says it imported the file successfully, but no data shows up. If I copy the same vcf file to local memory using the File Manager, the operation succeeds and the vcf file contents show up correctly in GPE Contacts.

    Therefore, it looks like there's a bug in the network file access in OS2008.
    Hmmm, this was my problem too. I was importing from a SMB share on my NAS (NSLU2). I copied the file to the local SD card and tried the import again. This time I got contacts, lots of them! That makes you wonder....
    -Scurrie

    Edit | Forward | Quote | Quick Reply | Thanks

     
    scurrie | # 27 | 2008-01-18, 17:05 | Report

    Originally Posted by abby_normal View Post
    After the difficulties discussed in this thread, I was a bit surprised (but gratified) that I was able to export my address book as vCard (2.1) from Lotus Notes, then import to GPE, on the first pass. It took a LONG time to import the file, though . . . my address book was only 69K, but it took 20-25 minutes for the import to finish. I thought for sure it had given up the ghost. The addresses were slightly munged in the process (city and state were transposed), but nothing I can't clean up manually.
    Yeah, my job titles were added to the first names. Made for some interesting names, but easily cleaned up.

    Now that I have a clean contacts list, how does one back up this data? I'm sure there will be another OS update coming sooner or later...
    -Scurrie

    Edit | Forward | Quote | Quick Reply | Thanks

     
    dubwise | # 28 | 2008-01-18, 17:14 | Report

    Originally Posted by DJames1 View Post
    Wait, my spreadsheet vcf cleaner is almost done.
    Sweet. Gonna do one for ical ics? Pretty please?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    DJames1 | # 29 | 2008-01-21, 21:09 | Report

    Ok, I am officially ready to give up. While it's technically possible to import a vcf file to GPE Contacts by editing out enough of the content, it's just too much effort to develop an automated file adapter. So far I've probably made more than 500 painstakingly-slow test imports, stumbling over one idiotic non-robust import restriction after another. The lack of any error reporting except "Import failed" makes it horribly difficult to isolate problems. The vcf import routine in this app should be used as a textbook example of how not to write robust programs.

    A few examples:

    - carriage-return/linefeed are allowed in some fields as the 6-character sequence =0D=0A, but are not allowed in other fields (like the Tel number), disagreeing partly with many of the apps that export vcf files

    - long lines can be continued by a trailing = sign - except for some fields (like the Tel field) where the programmer apparently assumed that it would always be short and forgot to check

    - if a continuation line after a trailing = anywhere in the file contains only one character, the importer fails - the programmer apparently having assumed that all continuation lines must contain more than one character or you wouldn't have bothered to continue it

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by DJames1; 2008-01-24 at 00:10.

     
    jaysin22 | # 30 | 2008-01-21, 21:42 | Report

    Don't know if anyone has a Mac but tried a sample export out of Address Book on Leopard of about 11 contacts into a Vcard. Transfered it to my N800 via bluetooth and then imported into GPE contacts and everything works and showed up exactly as what is on my Mac. Gonna try it tonight with a larger export. Will admit took about 1 minute to process but they were all correct.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 3 of 6 | Prev |   1     2   3   4     5   | Next | Last
vBulletin® Version 3.8.8
Normal Logout