NAME
    vcardtidy - normalize the format of VCARD files

VERSION
    v1.1.1 (2026-11-13)

SYNOPSIS
        vcardtidy [FILES...] [OPTIONS...]

DESCRIPTION
    vcardtidy formats VCARD files, using Text::vCard::Addressbook to
    normalize field order and capitalization. If Number::Phone is
    installed then phone numbers are formatted using the
    NationallyPreferredIntl format.

    By default vcardtidy acts like a filter, reading from "stdin" and
    writing to "stdout".

    If "FILES..." are specified they are tidied up in place! Users are
    encouraged to use a revision control system (e.g. Git) and/or have
    secure backups.

OPTIONS
    --debug, -d
        Output debugging statements to STDERR.

    --force, -f
        By default a tidy only occurs when the input is valid and when
        the the content changes reasonably (i.e. ignoring the REV and
        PRODID fields). This flag forces a tidy to occur which can be
        used for the following:

        *   Add missing N or FN fields, based on the card's UID. Handy
            for fixing VCARDs exported from gmail that contain only
            email addresses.

        *   Overwrite the VERSION field

        *   Ensure the the REV field is updated.

    --help, -h
        Print the full usage message and exit.

    --no-rev, -R
        Prevent vcardtidy from updating the "REV" timestamp.

    --nothing, -n
        Do not write tidied output to files. In filter mode outputs the
        original VCARD.

    --regex, -r REGEX
        Before tidying, evaluate a Perl "s/old/new/" replacement
        expression against the input. Can be used multiple times. To add
        a NOTE and an additional CATEGORY in one go for example:

            $ vcardtidy untidy.vcf \
               -r 's/^END:VCARD/NOTE:My note\r\nEND:VCARD/m'
               -r 's/^(CATEGORIES:.*)(\s+)$/\1,NewCategory\2/m'

        Tools like sed(1), awk(1) and of course perl(1) are obviously
        natively designed to modify text, in a better way. But "--regex"
        ensures that you still have a valid VCARD afterwards, allowing
        you to easily iterate while you develop your change.

    --vcard-version, -v VERSION
        The value of VERSION to update (with "--force") or add (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 <mark@rekudos.net>

COPYRIGHT AND LICENSE
    Copyright 2022-2026 Mark Lawrence <mark@rekudos.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.

