From e17ce23224e5923b782f6323391bc40c801559e9 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 7 Oct 2021 12:08:08 +0200 Subject: [PATCH 1/1] Add some missing elements. --- src/librarian/elements/__init__.py | 7 ++++++- src/librarian/elements/blocks/__init__.py | 2 +- src/librarian/elements/blocks/wywiad.py | 9 +++++++++ src/librarian/elements/ref/__init__.py | 13 +++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/librarian/elements/blocks/wywiad.py create mode 100644 src/librarian/elements/ref/__init__.py diff --git a/src/librarian/elements/__init__.py b/src/librarian/elements/__init__.py index 549d0cb..65c82d8 100644 --- a/src/librarian/elements/__init__.py +++ b/src/librarian/elements/__init__.py @@ -1,6 +1,6 @@ from lxml import etree from . import (blocks, comments, drama, figures, footnotes, front, headers, - masters, paragraphs, poetry, root, separators, styles, themes) + masters, paragraphs, poetry, ref, root, separators, styles, themes) WL_ELEMENTS = { @@ -71,6 +71,8 @@ WL_ELEMENTS = { "pr": footnotes.PR, "pt": footnotes.PT, + "ref": ref.Ref, + "begin": themes.Begin, "end": themes.End, "motyw": themes.Motyw, @@ -113,6 +115,9 @@ WL_ELEMENTS = { "ilustr": figures.Ilustr, "ref": etree.ElementBase, + # Section + "wywiad_pyt": blocks.WywiadPyt, + "wywiad_odp": blocks.WywiadOdp, # Inline MathML, should really be namespaced. "mrow": etree.ElementBase, diff --git a/src/librarian/elements/blocks/__init__.py b/src/librarian/elements/blocks/__init__.py index 38dd488..cb98bc6 100644 --- a/src/librarian/elements/blocks/__init__.py +++ b/src/librarian/elements/blocks/__init__.py @@ -3,4 +3,4 @@ from .dlugi_cytat import DlugiCytat from .nota import Nota from .poezja_cyt import PoezjaCyt from .ramka import Ramka - +from .wywiad import WywiadPyt, WywiadOdp diff --git a/src/librarian/elements/blocks/wywiad.py b/src/librarian/elements/blocks/wywiad.py new file mode 100644 index 0000000..8f9a5ae --- /dev/null +++ b/src/librarian/elements/blocks/wywiad.py @@ -0,0 +1,9 @@ +from ..base import WLElement + + +class WywiadPyt(WLElement): + pass + + +class WywiadOdp(WLElement): + pass diff --git a/src/librarian/elements/ref/__init__.py b/src/librarian/elements/ref/__init__.py new file mode 100644 index 0000000..2019da1 --- /dev/null +++ b/src/librarian/elements/ref/__init__.py @@ -0,0 +1,13 @@ +from ..base import WLElement + + +class Ref(WLElement): + def txt_build(self, builder): + pass + + def html_build(self, builder): + pass + + def epub_build(self, builder): + pass + -- 2.20.1