br 24.5.9
authorRadek Czajka <rczajka@rczajka.pl>
Wed, 11 Jun 2025 09:00:23 +0000 (11:00 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Wed, 11 Jun 2025 09:00:23 +0000 (11:00 +0200)
setup.py
src/librarian/elements/__init__.py
src/librarian/elements/tools/__init__.py
src/librarian/pdf/wl.cls
src/librarian/pdf/wl2tex.xslt
src/librarian/xslt/book2html.xslt
src/librarian/xslt/book2txt.xslt

index 41fa6a4..17cecda 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def whole_tree(prefix, path):
 
 setup(
     name='librarian',
-    version='24.5.8',
+    version='24.5.9',
     description='Converter from WolneLektury.pl XML-based language to XHTML, TXT and other formats',
     author="Marek StÄ™pniowski",
     author_email='marek@stepniowski.com',
index 34d3fac..6fd04bc 100644 (file)
@@ -127,6 +127,8 @@ WL_ELEMENTS = {
     "numeracja": tools.Numeracja,
     "rownolegle": tools.Rownolegle,
     "tab": tools.Tab,
+    "audio": tools.Audio,
+    "br": tools.Br,
 
     # Section
     "wywiad_pyt": blocks.WywiadPyt,
index 0da3599..1028ce4 100644 (file)
@@ -37,3 +37,12 @@ class Tab(WLElement):
 
     get_epub_attr = get_html_attr
 
+
+class Audio(WLElement):
+    def build_epub(self, builder):
+        return
+
+
+class Br(WLElement):
+    TXT_SUFFIX = "\n"
+    EPUB_TAG = HTML_TAG = "br"
index 1f685ea..f110816 100644 (file)
@@ -837,6 +837,9 @@ Letters={Uppercase}
 \newcommand{\osoba}[1]{%
 {\scshape \MakeLowercase{#1}}%
 }
+\newcommand{\br}[1]{%
+\\
+}
 
 
 \newcommand{\wllist}[1]{%
index 78e9c2b..4290ee3 100644 (file)
 
 
 <xsl:template mode="inline"
-    match="pa|pe|pr|pt|ptrad|mat|didask_tekst|slowo_obce|wyroznienie|osoba|indeks_dolny|wieksze_odstepy">
+    match="pa|pe|pr|pt|ptrad|mat|didask_tekst|slowo_obce|wyroznienie|osoba|indeks_dolny|wieksze_odstepy|br">
     <cmd>
         <xsl:attribute name="name">
                <xsl:value-of select="wl:texcommand(name())" />
index 2c17d99..7ea41d4 100644 (file)
     <em class="person"><xsl:apply-templates mode="inline" /></em>
 </xsl:template>
 
+<xsl:template match="br" mode="inline">
+    <br/>
+</xsl:template>
+
 <xsl:template match="www" mode="inline">
     <a target="_blank">
         <xsl:attribute name="href">
index 290a8aa..158c3e5 100644 (file)
 <xsl:text>*</xsl:text><xsl:apply-templates mode="inline" /><xsl:text>*</xsl:text>
 </xsl:template>
 
+<xsl:template match="br" mode="inline">
+<xsl:text>
+</xsl:text>
+</xsl:template>
+
 <xsl:template match="indeks_dolny" mode="inline">
 <xsl:apply-templates mode="inline" />
 </xsl:template>