From be99dc557885ecfea0db3fa53ff1015faff5b238 Mon Sep 17 00:00:00 2001 From: xenofem Date: Sat, 2 Mar 2024 00:15:18 -0500 Subject: [PATCH] misc code cleanup --- dlibrary/dlibrary.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlibrary/dlibrary.py b/dlibrary/dlibrary.py index 99e7b72..acc3291 100755 --- a/dlibrary/dlibrary.py +++ b/dlibrary/dlibrary.py @@ -692,7 +692,7 @@ def manual_collate(args): work_collation_dir = collation_area / work_id if work_collation_dir.exists(): if len(list(work_collation_dir.iterdir())) > 0: - print(f'Collation directory already exists!') + print('Collation directory already exists!') return else: work_collation_dir.rmdir() @@ -743,7 +743,7 @@ def analyze(args): elif is_pdf(f): sizes = pdf_image_sizes(f) if len(sizes) == 0: - print(f'\tContains no images') + print('\tContains no images') else: print(f'\t{len(sizes)} images, median {fmt_size(median(sizes))}, min {fmt_size(min(sizes))}, max {fmt_size(max(sizes))}') else: @@ -803,8 +803,6 @@ def generate(args): collated_work_ids = {p.name for p in (site_dir / 'images').iterdir()} - actual_series = {series for (series,) in cur.execute('SELECT series FROM works GROUP BY series HAVING count(series) > 1')} - works = [] for (work_id, title, circle, date, description, series) in cur.execute('SELECT id, title, circle, date, description, series FROM works ORDER BY date DESC').fetchall(): if work_id not in collated_work_ids: