From 2991698067a246ea9b99b4e668d261af6d418eca Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 3 Apr 2023 08:16:52 +0200 Subject: [PATCH] assign ids over chunks --- setup.py | 2 +- src/librarian/document.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c39d2bb..1502037 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def whole_tree(prefix, path): setup( name='librarian', - version='2.4.11', + version='2.4.11.1', description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats', author="Marek Stępniowski", author_email='marek@stepniowski.com', diff --git a/src/librarian/document.py b/src/librarian/document.py index ea8a47a..6ac2842 100644 --- a/src/librarian/document.py +++ b/src/librarian/document.py @@ -40,9 +40,9 @@ class WLDocument: def build(self, builder, base_url=None, **kwargs): return builder(base_url=base_url).build(self, **kwargs) - def assign_ids(self): + def assign_ids(self, existing=None): # Find all existing IDs. - existing = set() + existing = existing or set() que = [self.tree.getroot()] while que: item = que.pop(0) -- 2.20.1