VCF file modification or conversion to CSV

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
52ROSt
Level 5
Level 5
Posts: 737
Joined: Mon Apr 14, 2014 10:01 am

VCF file modification or conversion to CSV

Post by 52ROSt »

LM 20.1 Cinnamon

I have a VCF file in which in need to filter a certain contact category and make an mass edit of about 250 contacts.

Questions:

1 -Which LM application can be used for the editing? ( don't find one but maybe blind.)

2 - Which LM application can be use to convert VCF format into CSV format?

Thanks for helping replies.
User avatar
spamegg
Level 14
Level 14
Posts: 5096
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: VCF file modification or conversion to CSV

Post by spamegg »

I'm guessing Libre Office Calc.
User avatar
52ROSt
Level 5
Level 5
Posts: 737
Joined: Mon Apr 14, 2014 10:01 am

Re: VCF file modification or conversion to CSV

Post by 52ROSt »

LibO Calc - I looked into that. However then I have the problem that I cannot go back to the needed structure of a csv-file to import the data thereafter.

Actually I don't understand why Evolution does not enable an export into a csv-file.

I looked also in the repository of LM but could not identify an application there.
mikeflan
Level 17
Level 17
Posts: 7146
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: VCF file modification or conversion to CSV

Post by mikeflan »

a vcf file is just a text file. Can you just edit it in a text editor?
Example vcf:

Code: Select all

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//iPhone OS 12.0.1//EN
N:Gullo;BB David;;;
FN: BB David  Gullo 
ORG:Joseph;
EMAIL;type=INTERNET;type=HOME;type=pref:gbo4825@gmail.com
TEL;type=CELL;type=VOICE;type=pref:+12616856784
END:VCARD
User avatar
52ROSt
Level 5
Level 5
Posts: 737
Joined: Mon Apr 14, 2014 10:01 am

Re: VCF file modification or conversion to CSV

Post by 52ROSt »

Text editior - You are right.

As I have to edit about 250 entries, I wanted to go to csv-file and mass edit the categories there. Filter what I need to change and apply the changes in a simple paste action in a single long column.

I tried to go through Thunderbird import VCF export CSV but TB does not use the categories, thus this was a failure as well.

If someone knows an Email or Addressbook application, which can import the VCF, export CSV AND can handle all fields use in Evolution, this could be a way to make the mass editing in a CSV file. (This is for a user who has the same problem.)

At the end I used just an text editor and search & replace to modify the data I needed to change.
mikeflan
Level 17
Level 17
Posts: 7146
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: VCF file modification or conversion to CSV

Post by mikeflan »

If these are simple edits you might find something like this will work:

Code: Select all

find /home/mike/Documents -maxdepth 1 -type f -iname "*fileprocu*.vcf" 
-exec grep -il -Z "Organization" {} \; | xargs -0 perl -i.bak -pnwe 's/MO\sMines/MO_Mines/g'
Take out the single newline I added so this could be read in the code box.
User avatar
52ROSt
Level 5
Level 5
Posts: 737
Joined: Mon Apr 14, 2014 10:01 am

Re: VCF file modification or conversion to CSV

Post by 52ROSt »

Thanks for this additional information.

It reminds to the VFCtools I found in the LM Software Manager. The link given in the SW Manager leads to https://vcftools.github.io/

I had a look at the documentation but did not dare to use these terminal commands.... I love them but I always a bit scared. Someone may say I just cowered.
josias
Level 1
Level 1
Posts: 4
Joined: Fri Dec 22, 2017 1:25 pm

Re: VCF file modification or conversion to CSV

Post by josias »

Hi ... I wondered if this thread has been already solved... because I have the same issue and I have spent almost 2 hours surfing the web trying to get a solution. Most of the apps suggested do not allow bulk editing nor recognize all the fields imported... it is incredible that given the size of the open-source community there is no feasible piece of software to perform this easily... do you know if there has been an update since April 2021?
mikeflan
Level 17
Level 17
Posts: 7146
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: VCF file modification or conversion to CSV

Post by mikeflan »

If all you need to do is replace something with something else, I say the find command above works great. Yes, you will need to do some testing to make sure it works the way you want it to, but it works great. If you need to do other things you might want to check out Bcftools in the Software Manager. I have never used it.
Locked

Return to “Software & Applications”