NAME
vcardtidy - normalize the format of VCARD files
VERSION
v1.0.5 (2026-01-15)
SYNOPSIS
vcardtidy [FILES...] [OPTIONS...]
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 FILES... specified are tidied up in place without backup! Users are encouraged to use a revision control system (e.g. Git) or have secure backups.
OPTIONS
- --filter, -F PERL
-
Before tidying, evaluate the
PERLstring with$_set to the input text. The modified$_value then input to Text::vCard::Addressbook for tidying.Tools like sed(1), awk(1) and of course perl(1) are obviously natively designed to modify text, in a better way. But
--filterensures 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'If the result cannot be parsed by Text::vCard then no files are modified or output generated.
- --force, -f
-
Force a tidy to occur by adding missing N and FN fields based on the UID.
This can also be used to overwrite the VERSION field.
- --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.
- --nothing, -n
-
Do not write
- --vcard-version, -v VERSION
-
The desired vCard VERSION when none exists. Defaults to "4.0".
- --version, -V
-
Print the version and exit.
SUPPORT
This tool is managed via github:
https://github.com/mlawren/vcardtidy
SEE ALSO
Text::vCard::Addressbook, githook-perltidy(1)
AUTHOR
Mark Lawrence <nomad@null.net>
COPYRIGHT AND LICENSE
Copyright 2022-2026 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.