From 09050cedaa5776c20e35518cadbdb3ce418b6a7e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Feb 14 2023 19:35:33 +0000 Subject: Add file size to imagelist output So, I realized today it would be useful for fedfind to know the *sizes* of image files. This 'imagelist' file is generated for fedfind's convenience - it uses it to quickly find all image files in the tree - and AFAIK nothing else uses it, so changing its format should be safe. I would take responsibility for updating fedfind to handle the new format. Signed-off-by: Adam Williamson --- diff --git a/create-filelist b/create-filelist index 06a9f42..44968aa 100755 --- a/create-filelist +++ b/create-filelist @@ -186,7 +186,7 @@ def main(): # write to filtered list if appropriate imgs = ['.{0}'.format(form) for form in SUPPORTED_IMAGE_FORMATS] if any(entry.path.endswith(img) for img in imgs): - print(entry.path, file=opts.imagelist) + print('{0}\t{1}'.format(entry.size, entry.path), file=opts.imagelist) if entry.name in opts.checksum_files: checksums[entry.path[2:]] = True