Librem5 import contacts from file

Maybe also check the points mentioned here: Librem 5 Can't import my VCF file using the the Contacts Importer script in particular whether the name of the .vcf file contains any characters that are not shell-safe.

One could use this small script to load a complete CSV file into the contacts database:

#!/bin/sh

CONTACTDB=$(syncevolution --print-databases | grep "system-address-book" | sed 's#(.*##' | sed 's# ##g' )
echo $CONTACTDB

FILE=$1
TEMP=/tmp/vcf

mkdir -p $TEMP
cd $TEMP
cat $FILE | awk ‘ /BEGIN:VCARD/ { ++a; fn=sprintf(“card_import_L5_%02d.vcf”, a); print “Writing: “, fn } { print $0 » fn; } ‘ $1
#
for f in *; do
     syncevolution --import ${f} backend=evolution-contacts database=${CONTACTDB}
done

hi @guru sorry for being a noob, how to run this script (save it as contact.sh and run ./contact.sh file.csv) ?

I have modified the script setting FILE=$1 and so just run

./contact.sh /home/purism/file.csv

(note the file name as fully qualified)

Contacts app has been updated (Version 43-beta) with vCard Import to/from a file on the system. Also warns you about any configuration issues in your primary address book.

Link to online accounts available as well.

3 Likes

Very nice update. Finally one can see the phone numbers without going into edit mode. Thanks to all who made this happen.

2 Likes

I found a cheesy way to import my contacts file.

I setup my librem.one email in Geary.

On my old droid, I exported my contacts file (internally). It defaults to Contacts.vcf

Then I got into my email on my old 'droid and emailed to myself as an attachment to Geary on my Librem5.

Then I got into geary on my new phone, opened the email and saved the attachment.

Then I got into my Contacts on my new phone and imported it.

1 Like

Desperation is the mother of invention.

Good thing Librem One mail is E2EE. :+1:

Doing that over unencrypted email potentially subjects your list of contacts (and their private data) to exposure/theft across various internet servers on the way from you to you. BTW, you could have just saved it as an attachment in your LibremOne account, then opened it on the other device, right?

(Preaching to the choir here, though. Lol!)

Well it was sent from a librem one email account to another.

The highest risk of exposure is the original 'droid. With every pick-a-ninny app wanting access to all one’s files anyway. If so it has already been collected before I started.

In-between internet servers, yes could be exposed. And would also be liable. They have a vested interest in keeping thier own data protected. Usually this gets revealed years later in some news announcement about a breach. Should I wait for the class action case where millions have to be paid? Each individual household would get two dollars and eighty-five cents in a settlement check.

The next highest risk of exposure is where it got sent to. Which was a librem.one email account. Exposure would mean the librem.one server is compromised. That would be news.

The least risk would be active monitoring and collection of data in the pipe. Less likely unless I’m monitored. But those kind of folks with that ability don’t sell what they collect, no? They’re more apt to file it within their agency. (And for only 90 days if collected for training purposes.)

1 Like