assign ids over chunks 2.4.11.1
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 3 Apr 2023 06:16:52 +0000 (08:16 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 3 Apr 2023 06:16:52 +0000 (08:16 +0200)
setup.py
src/librarian/document.py

index c39d2bb..1502037 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def whole_tree(prefix, path):
 
 setup(
     name='librarian',
 
 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',
     description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats',
     author="Marek StÄ™pniowski",
     author_email='marek@stepniowski.com',
index ea8a47a..6ac2842 100644 (file)
@@ -40,9 +40,9 @@ class WLDocument:
     def build(self, builder, base_url=None, **kwargs):
         return builder(base_url=base_url).build(self, **kwargs)
 
     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.
         # Find all existing IDs.
-        existing = set()
+        existing = existing or set()
         que = [self.tree.getroot()]
         while que:
             item = que.pop(0)
         que = [self.tree.getroot()]
         while que:
             item = que.pop(0)