NAME
vcardtidy - normalize the format of VCARD files
VERSION
1.0.1 (2022-10-05)
SYNOPSIS
usage: vcardtidy [FILES...] [OPTIONS...]
Synopsis:
tidy (normalize) VCARD contact files
Arguments:
FILES Str file to tidy (default is stdin)
Options:
--filter, -f PERL Perl filter(s) to run against $_ first
--help, -h print a Help message and exit
--no-rev, -R do not update REV value
--version, -V print version information and exit
DESCRIPTION
vcardtidy formats VCARD files, using Text::vCard::Addressbook to
normalize field order and capitalization.
By default vcardtidy acts like a filter, reading from "stdin" and
writing to "stdout". Any file names given as arguments will be
tidied up in place.
GLOBAL OPTIONS
--filter, -f PERL
Before tidying, evaluate the "PERL" string with $_ set to the
input text. Can be used multiple times.
You can easily achieve the same effect with tools like sed(1),
awk(1) or even perl(1) itself. But "--filter" ensures that you
still have a valid VCARD afterwards, allowing you to easily
iterate while you develop your change.
To add an additional or missing category for example:
$ vcardtidy \
-f '$_ .= "\nCATEGORIES:\n" unless m/^CATEGORIES:/m' \
-f 's/^(CATEGORIES:\S+)(\s+)$/$1,$2/m' \
-f 's/^(CATEGORIES:.*)(\s+)$/${1}NewCat$2/m'
--help, -h
Print the full usage message and exit.
--no-rev, -R
By default vcardtidy sets a new "REV" timestamp. Use this flag
to prevent that.
--version, -V
Print the version and exit.
SUPPORT
This tool is managed via github:
https://github.com/mlawren/vcardtidy
SEE ALSO
githook-perltidy(1)
AUTHOR
Mark Lawrence <nomad@null.net>
COPYRIGHT AND LICENSE
Copyright 2022 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.