From: Radek Czajka Date: Mon, 3 Apr 2023 06:16:52 +0000 (+0200) Subject: assign ids over chunks X-Git-Tag: 2.4.11.1 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/2991698067a246ea9b99b4e668d261af6d418eca?ds=inline assign ids over chunks --- 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)