jfQdZdZddlmZddlZddlmZmZddlmZGddeZ Gd d e Z id d d d dd ddddddddddddddddddddddddd d!d"d!d#d$d%Z d&Z dS)'z0 This package contains Docutils Writer modules. reStructuredText) import_moduleN) languages Component) universalcZeZdZdZdZdZfdZdZ dZ dZ dZ dZ dZ dZ d ZxZS) Writera Abstract base class for docutils Writers. Each writer module or package must export a subclass also called 'Writer'. Each writer must support all standard node types listed in `docutils.nodes.node_class_names`. The `write()` method is the main entry point. writerwriterscttjtjtjgzSN)superget_transformsrMessagesFilterMessagesStripClassesAndElements)self __class__s y/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/docutils/writers/__init__.pyrzWriter.get_transforms!s9ww%%''9+=+4+C+4+L+NN NNci|_dSr )partsrs r__init__zWriter.__init__8s   rc||_tj|jj|j|_||_||j |j S)a/ Process a document into its final form. Translate `document` (a Docutils document tree) into the Writer's native format, and write it out to its `destination` (a `docutils.io.Output` subclass object). Normally not overridden or extended in subclasses. ) documentr get_languagesettings language_codereporterlanguage destination translatewriteoutput)rrr"s rr$z Writer.writeAsa! !.   +   ' %%dk222rc td)a Do final translation of `self.document` into `self.output`. Called from `write`. Override in subclasses. Usually done with a `docutils.nodes.NodeVisitor` subclass, in combination with a call to `docutils.nodes.Node.walk()` or `docutils.nodes.Node.walkabout()`. The ``NodeVisitor`` subclass must support all standard elements (listed in `docutils.nodes.node_class_names`) and possibly non-standard elements used by the current Reader as well. z"subclass must override this method)NotImplementedErrorrs rr#zWriter.translateSs""FGGGrc|j|jd<|jjj|jd<|jjj|jd<t j|jd<dS)zAssemble the `self.parts` dictionary. Extend in subclasses. See . wholeencodingerrorsversionN)r%rrroutput_encodingoutput_encoding_error_handlerdocutils __version__rs rassemble_partszWriter.assemble_partsasR #k 7!%!7!G : M " @ 8 ( 4 9r)__name__ __module__ __qualname____doc__component_typeconfig_sectionrrr%r!r"rr$r#r1 __classcell__)rs@rr r sNNNNNNN HE F H=K    333$ H H H 5 5 5 5 5 5 5rr ceZdZdZdZdS)UnfilteredWriterz A writer that passes the document tree on unchanged (e.g. a serializer.) Documents written by UnfilteredWriters are typically reused at a later date using a subclass of `readers.ReReader`. c*tj|Sr )rrrs rrzUnfilteredWriter.get_transformsws'---rN)r2r3r4r5rrrr:r:ms-.....rr:html html4css1html4xhtml10html5html5_polyglotxhtmls5s5_htmllatexlatex2exelatexxetexluatexlualatexodfodf_odtodtooffice openoffice libreofficepprint pseudoxmlpformatrlpdf docutils_xml)pdfxmlc&|}t||} td|z}nH#t$r; t|}n'#t$r}t d|d|d}~wwxYwYnwxYw|jS)z6Return the Writer class from the `writer_name` module.zdocutils.writers.zWriter "z " not found. N)lower_writer_aliasesgetr ImportErrorr ) writer_namenamemoduleerrs rget_writer_classrbs     D   tT * *DJ24788 JJJ J"4((FF J J JHHH3HHII I J FJ =s5A B AB  B)A>>BB B ) r5 __docformat__ importlibrr/rrdocutils.transformsrr r:r[rbr<rrrfs # ######))))))))))))))X5X5X5X5X5YX5X5X5v.....v..." k {     I y' Y YIY  !"#$ ',     r