X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e17ce23224e5923b782f6323391bc40c801559e9..82c0860d1520489be56457829d49eb17f165b9cd:/src/librarian/elements/__init__.py diff --git a/src/librarian/elements/__init__.py b/src/librarian/elements/__init__.py index 65c82d8..0191ae5 100644 --- a/src/librarian/elements/__init__.py +++ b/src/librarian/elements/__init__.py @@ -1,9 +1,14 @@ +# This file is part of Librarian, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. +# from lxml import etree from . import (blocks, comments, drama, figures, footnotes, front, headers, - masters, paragraphs, poetry, ref, root, separators, styles, themes) + masters, paragraphs, poetry, ref, root, separators, styles, themes, + tools, base) WL_ELEMENTS = { + 'snippet': base.Snippet, 'meta': etree.ElementBase, 'coverClass': etree.ElementBase, "developmentStage": etree.ElementBase, @@ -11,6 +16,7 @@ WL_ELEMENTS = { "coverBoxPosition": etree.ElementBase, "coverLogoUrl": etree.ElementBase, "contentWarning": etree.ElementBase, + "endnotes": etree.ElementBase, "utwor": root.Utwor, "dramat_wierszowany_l": masters.Master, @@ -21,6 +27,8 @@ WL_ELEMENTS = { "opowiadanie": masters.Master, "powiesc": masters.Master, + "blok": tools.WLElement, + "autor_utworu": front.AutorUtworu, "dzielo_nadrzedne": front.DzieloNadrzedne, "nazwa_utworu": front.NazwaUtworu, @@ -65,6 +73,7 @@ WL_ELEMENTS = { "wers_akap": poetry.WersAkap, "zastepnik_wersu": poetry.ZastepnikWersu, "wers_do_prawej": poetry.WersDoPrawej, + "wers_srodek": poetry.WersSrodek, "pa": footnotes.PA, "pe": footnotes.PE, @@ -80,7 +89,7 @@ WL_ELEMENTS = { "nota": blocks.Nota, "nota_red": comments.NotaRed, - "extra": comments.Abstrakt, + "extra": comments.Uwaga, "abstrakt": comments.Abstrakt, "naglowek_czesc": headers.NaglowekCzesc, @@ -114,17 +123,20 @@ WL_ELEMENTS = { "animacja": figures.Animacja, "ilustr": figures.Ilustr, - "ref": etree.ElementBase, + "numeracja": tools.Numeracja, + "rownolegle": tools.Rownolegle, + "tab": tools.Tab, + # Section "wywiad_pyt": blocks.WywiadPyt, "wywiad_odp": blocks.WywiadOdp, # Inline MathML, should really be namespaced. - "mrow": etree.ElementBase, - "mi": etree.ElementBase, - "mo": etree.ElementBase, - "msup": etree.ElementBase, - "mn": etree.ElementBase, - "mfrac": etree.ElementBase, - "mfenced": etree.ElementBase, + "mrow": styles.MRow, + "mi": styles.M, + "mo": styles.M, + "msup": styles.MSup, + "mn": styles.M, + "mfrac": styles.MFrac, + "mfenced": styles.MFenced, }