From 8488ecc03b4799e813df8b926f7d0cce0139223c Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 13 Jun 2022 22:21:15 +0300 Subject: [PATCH] Add readme --- README.md | 21 ++++++++++++++++++- .../find_duplicate_contacts.py | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b5eea8..0e07dd5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ ## Requirements +See the requirements.txt file for required Python modules. +Save the contacts as individual (one contact per file) vCard files in an isolated directory. + ## Installation ### Linux @@ -13,5 +16,21 @@ `& $(where.exe python).split()[0] setup.py install` ## Usage +- Save the contacts as individual (one contact per file) vCard files in an isolated directory, pass this directory with the *--directory* option. +- Those completely equal, except for some list of keys (see the *ignore_fileds* variable), will be directly moved to the *--duplicates-destination* folder inside the *--directory*. +- Those with equal full name, will be show and a prompt will ask you to keep one of the contact cards or just do nothing with them. - `find_duplicate_contacts.py [--debug-level|-d CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET] # Other parameters` +``` +find_duplicate_contacts.py [OPTIONS] + +Options: + -d, --debug-level [CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET] + Set the debug level for the standard output. + -l, --log-file TEXT File to store all debug messages. + -f, --directory TEXT Directory containing vCard files to check. + [required] + -D, --duplicates-destination TEXT + Directory to move duplicates files, relative + to the directory containing the vCards. Default: duplicates + --config FILE Read configuration from FILE. + --help Show this message and exit.``` \ No newline at end of file diff --git a/find_duplicate_contacts/find_duplicate_contacts.py b/find_duplicate_contacts/find_duplicate_contacts.py index 8f420b4..65beff5 100755 --- a/find_duplicate_contacts/find_duplicate_contacts.py +++ b/find_duplicate_contacts/find_duplicate_contacts.py @@ -207,7 +207,7 @@ class find_duplicate_contacts: case_sensitive=False, ), help='Set the debug level for the standard output.') @click.option('--log-file', '-l', help="File to store all debug messages.") -@click.option("--directory", "-d", help="Directory containing vCard files to check.") +@click.option("--directory", "-f", required=True, help="Directory containing vCard files to check.") @click.option('--duplicates-destination', '-D', default='duplicates', help='Directory to move duplicates files, relative to the directory containing the vCards.') @click_config_file.configuration_option() def __main__(debug_level, log_file, directory, duplicates_destination):