From cf17ec85a78c2ce08aaefa1a5fa89c0ea2669b66 Mon Sep 17 00:00:00 2001 From: xenofem Date: Sun, 20 Jul 2025 23:49:48 -0400 Subject: [PATCH] make skipping sources in splits actually work --- dlibrary/dlibrary.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlibrary/dlibrary.py b/dlibrary/dlibrary.py index 4b19a3c..9b9d304 100755 --- a/dlibrary/dlibrary.py +++ b/dlibrary/dlibrary.py @@ -598,20 +598,22 @@ class Collator: early_srcs = [] middle_srcs = [] late_srcs = [] + skipped_srcs = [] for src in srcs: if earlier and earlier.search(nname(src)): early_srcs.append(src) elif later and later.search(nname(src)): late_srcs.append(src) elif skip and skip.search(nname(src)): - pass + skipped_srcs.append(src) else: middle_srcs.append(src) - if sum(1 for l in [early_srcs, middle_srcs, late_srcs] if l) <= 1: + if sum(1 for l in [early_srcs, middle_srcs, late_srcs, skipped_srcs] if l) <= 1: return False debug(f'Splitting sources based on regex: {[early_srcs, middle_srcs, late_srcs]}') + debug(f'Skipping sources based on regex: {skipped_srcs}') early_page_collation = self.collate_from_paths(early_srcs) if early_page_collation is None: