fix facility

This commit is contained in:
Antonio J. Delgado 2022-05-02 14:37:04 +03:00
parent 52ec8a8f8c
commit 337c55f63f

View file

@ -117,7 +117,7 @@ class image_classifier:
person_path = os.path.join(self.people_folder, person, folder) person_path = os.path.join(self.people_folder, person, folder)
if not os.path.exists(person_path): if not os.path.exists(person_path):
os.makedirs(person_path) os.makedirs(person_path)
self._log.debug(f"Copying file '{file}' to '{person_path}'...") self._log.info(f"Copying file '{file}' to '{person_path}'...")
shutil.copy(file, person_path) shutil.copy(file, person_path)
if not self.no_move: if not self.no_move:
self._log.info(f"Moving file '{file}' to '{new_path}'...") self._log.info(f"Moving file '{file}' to '{new_path}'...")
@ -255,8 +255,9 @@ class image_classifier:
identify people. Filename would be used as the name for the person. Just one person per picture.") identify people. Filename would be used as the name for the person. Just one person per picture.")
@click.option("--directory", "-d", required=True, help="Folder with the pictures to classify.") @click.option("--directory", "-d", required=True, help="Folder with the pictures to classify.")
@click.option("--no-move", "-n", is_flag=True, help="Don't move files, just add people's tag.") @click.option("--no-move", "-n", is_flag=True, help="Don't move files, just add people's tag.")
@click.option('--people-folder', '-p', help="Define a folder for people's folders and copy pictures \ @click.option('--people-folder', '-p', help="Define a folder for people's folders and copy \
to each person's folder. Be sure to have deduplication in the filesystem to avoid using too much storage.") pictures to each person's folder. Be sure to have deduplication in the filesystem to avoid using \
too much storage.")
@click_config_file.configuration_option() @click_config_file.configuration_option()
def __main__(debug_level, log_file, faces_directory, directory, no_move, people_folder): def __main__(debug_level, log_file, faces_directory, directory, no_move, people_folder):
return image_classifier(debug_level, log_file, faces_directory, directory, no_move, return image_classifier(debug_level, log_file, faces_directory, directory, no_move,