This script writes out individual contacts from a single vCard file (.vcf
) into separate files.
The major difference and advantage to approaches based on cut
or csplit
is that files are named with the full name as file name.
Unless using -r
, file names are "asciified" to ease the usage in multiple environments.
For example, accents are removed (thus à is mapped to a), and vowels with dieresis are expanded to vowel appended by e, (thus ä is mapped to ae).
Other characters might get mapped to some ASCII characters too.
The mapping algorithm is not well-defined (yet).
Characters not available in the Portable Filename Character Set are replaced by -
(alphanumeric character and .
, _
and -
).
Usage
perl split_vcard -i input_file -o output_dir [OPTION]
On Unix platforms
./split_vcard -i input_file -o output_dir [OPTION]
Supported options are
-
-i
: Input VCF filename -
-o
: Output dir, where all individual vcf files goes -
-v
: verbosity level -
-h
: help -
-r
: raw, does not transform names, recommended only on file systems that can represent all characters
The source code comes from https://code.google.com/archive/p/split-vcf-file/.