diff --git a/scripts/find_dupes.py b/scripts/find_dupes.py index bf6f94e..24b8d8e 100755 --- a/scripts/find_dupes.py +++ b/scripts/find_dupes.py @@ -30,11 +30,11 @@ def main(): for filename in filelist: ca = ComicArchive(filename, settings ) if ca.seemsToBeAComicArchive() and ca.hasMetadata( style ): + max_name_len = max ( max_name_len, len(filename)) fmt_str = u"{{0:{0}}}".format(max_name_len) print >> sys.stderr, fmt_str.format( filename ) + "\r", sys.stderr.flush() comic_list.append((filename, ca.readMetadata( style ))) - max_name_len = max ( max_name_len, len(filename)) print >> sys.stderr, fmt_str.format( "" ) + "\r", print "-----------------------------------------------" diff --git a/scripts/inventory.py b/scripts/inventory.py index 07c8756..f7192cb 100755 --- a/scripts/inventory.py +++ b/scripts/inventory.py @@ -48,10 +48,10 @@ def main(): #make a list of paired filenames and metadata objects metadata_list.append((filename, ca.readMetadata( style ))) + max_name_len = max ( max_name_len, len(filename)) fmt_str = u"{{0:{0}}}".format(max_name_len) print >> sys.stderr, fmt_str.format( filename ) + "\r", sys.stderr.flush() - max_name_len = max ( max_name_len, len(filename)) print >> sys.stderr, fmt_str.format( "" ) + "\r", print "-----------------------------------------------" diff --git a/scripts/make_links.py b/scripts/make_links.py index c99167e..e56c4a4 100755 --- a/scripts/make_links.py +++ b/scripts/make_links.py @@ -71,10 +71,10 @@ def main(): comic_list.append((filename, ca.readMetadata( style ))) + max_name_len = max ( max_name_len, len(filename)) fmt_str = u"{{0:{0}}}".format(max_name_len) print >> sys.stderr, fmt_str.format( filename ) + "\r", sys.stderr.flush() - max_name_len = max ( max_name_len, len(filename)) print >> sys.stderr, fmt_str.format( "" ) print "Found {0} tagged comics.".format( len(comic_list))