Active Topics

 



Notices


Reply
Thread Tools
Posts: 259 | Thanked: 72 times | Joined on Dec 2007 @ Halifax, NS
#21
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.
 
kudos1uk's Avatar
Posts: 166 | Thanked: 26 times | Joined on Jun 2007 @ Hampshire, UK
#22
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.
 
Posts: 259 | Thanked: 72 times | Joined on Dec 2007 @ Halifax, NS
#23
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.
 
Posts: 215 | Thanked: 44 times | Joined on Dec 2007
#24
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.
 
abby_normal's Avatar
Posts: 48 | Thanked: 4 times | Joined on Jan 2008
#25
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.
 
Posts: 12 | Thanked: 2 times | Joined on Dec 2007
#26
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
 
Posts: 12 | Thanked: 2 times | Joined on Dec 2007
#27
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
 
dubwise's Avatar
Posts: 239 | Thanked: 53 times | Joined on Jan 2008 @ Massachusetts
#28
Originally Posted by DJames1 View Post
Wait, my spreadsheet vcf cleaner is almost done.
Sweet. Gonna do one for ical ics? Pretty please?
__________________
.
---------------------------------------------

---------------------------------------------
 
Posts: 215 | Thanked: 44 times | Joined on Dec 2007
#29
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

Last edited by DJames1; 2008-01-24 at 00:10.
 
Posts: 49 | Thanked: 7 times | Joined on Apr 2007
#30
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.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:39.