From 30bb1352167f2a4e452bf4e9a17af4ae692783aa Mon Sep 17 00:00:00 2001 From: Xevion Date: Fri, 1 Nov 2019 22:47:03 -0500 Subject: [PATCH] formatting, additional logging --- package/process.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/process.py b/package/process.py index 44c70f5..fd96af4 100644 --- a/package/process.py +++ b/package/process.py @@ -61,16 +61,17 @@ class FileProcessor(object): # XMP sidecar file specified, write to it using XML module if self.xmp_name: - print('\tWriting {} tags to output XMP...'.format(len(labels))) + logging.info('\tWriting {} tags to output XMP.'.format(len(labels))) parser = XMPParser(os.path.join(INPUT_PATH, self.xmp_name)) parser.add_keywords(labels) # Save the new XMP file + loggin.debug('Saving to new XMP file.') parser.save(os.path.join(OUTPUT_PATH, self.xmp_name)) - # Remove the old XMP file + logging.debug('Removing old XMP file.') os.remove(os.path.join(INPUT_PATH, self.xmp_name)) # No XMP file is specified, using IPTC tagging else: - print('\tWriting {} tags to output {}'.format(len(labels), self.ext[1:].upper())) + logging.info('\tWriting {} tags to image IPTC'.format(len(labels))) info = iptcinfo3.IPTCInfo(os.path.join(INPUT_PATH, self.file_name)) info['keywords'].extend(labels) info.save()