This document records all notable changes to Librarian.
+## 2.4.5 (2022-07-08)
+
+# Fixed
+- Bug in reading picture XML.
+- Bug in setting WLURI.slug
+
+
## 2.4.4 (2022-07-07)
### Fixed
setup(
name='librarian',
- version='2.4.4',
+ version='2.4.5',
description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats',
author="Marek Stępniowski",
author_email='marek@stepniowski.com',
class WLURI(MetaValue):
"""Represents a WL URI. Extracts slug from it."""
- slug = None
-
example = 'http://wolnelektury.pl/katalog/lektura/template/'
_re_wl_uri = re.compile(
r'http://(www\.)?wolnelektury.pl/katalog/lektur[ay]/'
uri = 'http://wolnelektury.pl/katalog/lektura/%s/' % slug
self.uri = uri
return super().__init__(slug)
-
-
+
@classmethod
def from_text(cls, uri):
slug = uri.rstrip('/').rsplit('/', 1)[-1]
if not match:
raise ValidationError('Invalid URI (%s). Should match: %s' % (
self.uri, self._re_wl_uri.pattern))
- return cls(uri)
def __str__(self):
return self.uri
def __eq__(self, other):
- return self.slug == other.slug
+ return self.value == other.value
+
+ @property
+ def slug(self):
+ return self.value
clip = self.get_sem_coords(k)
self.frame = clip
frm = Element("sem", {"type": "frame"})
- frm.append(k.iter("div").next())
+ frm.append(next(k.iter("div")))
self.edoc.getroot().append(frm)
k.getparent().remove(k)
else: