vcf2csv -[hvw] -i <file>
option | description |
-d LIST |
comma separated list of types to drop, e.g.
-d 'ADR;TYPE=,X-KPILOT,PHOTO;,LABEL;TYPE=work'
The contents of the list are handled case sensitive.
If a content of this list is a substring of a type, this type is dropped.
|
-h |
print help |
-i <file> |
input file (required) |
-v |
print version |
-w |
web output, create html instead of csv |
The easiest way to use it for web output is to create an alias:
alias vcf2html="</path/to/bin/vcf2csv -w"
Now you simply call this alias, for example like this:
vcf2html -i my.vcf > my.html
convert
vcard.vcf to
csv, write output to
out.csv:
vcf2csv -i vcard.vcf > out.csv
Here you see a sample result:
convert
vcard.vcf to html file
out.html:
vcf2csv -w -i vcard.vcf > out.html
Here you see a sample result using
vcf2csv.css (provided by package) for page formatting:
Use a drop list to strip TYPEs:
If you want to prevent some types to be converted, the are specified by a drop list.
For example, a PHOTO uses a lot of space an should not apper in the resultig csv list.
In this case use '-d' to drop all types containing the string PHOTO:
vcf2csv -d PHOTO -i vcard.vcf > out.csv
The drop list is a comma separated list of values. It is handled
case sensitive
and may be a substring of the type to drop.
Let's take a look for a more complex example:
you want to drop all types containing the substring
x-, all photos and all addresses
of the type
home.
A vcard stores this information in these types:
X-KADDRESSBOOK-X-IMAddress:www.somepage.com
X-KADDRESSBOOK-X-SpousesName:somename
ADR;TYPE=home:some;private;;address;information
PHOTO;ENCODING=b;TYPE=image/jpeg:/9j/4AAQSkZJRgABAQIAA.....
All you have to know are the strings in front of the colon.
Here you see a command line to
generate a simple web page and drop these types:
vcf2csv -w -d 'X-,ADR;TYPE=,PHOTO;' -i vcard.vcf > out.html