jf |dZdZddlmZddlmZmZmZddlm Z GddeZ Gdd e Z iZ d Z d S) z0 This package contains Docutils Reader modules. reStructuredText) import_module)utilsparsers Component) universalcJeZdZdZdZdZfdZd dZdZdZ d Z d Z xZ S) Readera9 Abstract base class for docutils Readers. Each reader module or package must export a subclass also called 'Reader'. The two steps of a Reader's responsibility are to read data from the source Input object and parse the data with the Parser object. Call `read()` to process a document. readerreaderscttjtjtjgzSN)superget_transformsr DecorationsExposeInternals StripComments)self __class__s y/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/docutils/readers/__init__.pyrzReader.get_transforms s9ww%%''9+@+4+D+4+B+DD DNcf||_ ||r||d|_ d|_dS)z Initialize the Reader instance. Several instance attributes are defined with dummy initial values. Subclasses may use these attributes as they wish. N)parser set_parsersourceinput)rr parser_names r__init__zReader.__init__%sI  E >k> OOK ( ( ( <  $ $rcLtj|}||_dS)zSet `self.parser` by name.N)rget_parser_classr)rr parser_classs rrzReader.set_parser;s#/ << "lnn rc||_|js||_||_|j|_||jSr)rrsettingsreadrparsedocument)rrrr#s rr$z Reader.read@sK { ! DK  [%%''  }rc|x|_}|j|j|dx|_|_dS)z(Parse `self.input` into a document tree.N) new_documentr&rr%rcurrent_source current_line)rr&s rr%z Reader.parseIsJ#'#4#4#6#66  $*h///:>>("7"7"7rcJtj|jj|jS)z8Create and return a new empty document tree (root node).)rr(r source_pathr#rs rr(zReader.new_documentOs!$+"94=IIIr)NN) __name__ __module__ __qualname____doc__component_typeconfig_sectionrrrr$r%r( __classcell__)rs@rr r sNNDDDDD $$$$,%%% ??? JJJJJJJrr ceZdZdZdZdS)ReReaderz A reader which rereads an existing document tree (e.g. a deserializer). Often used in conjunction with `writers.UnfilteredWriter`. c*tj|Sr)rrr-s rrzReReader.get_transforms]s'---rN)r.r/r0r1rrrr6r6Ts-.....rr6c&|}t||} td|z}nH#t$r; t|}n'#t$r}t d|d|d}~wwxYwYnwxYw|jS)z6Return the Reader class from the `reader_name` module.zdocutils.readers.zReader "z " not found. N)lower_reader_aliasesgetr ImportErrorr ) reader_namenamemoduleerrs rget_reader_classrBfs     D   tT * *DJ24788 JJJ J"4((FF J J JHHH3HHII I J FJ =s5A B AB  B)A>>BB B N)r1 __docformat__ importlibrdocutilsrrrdocutils.transformsrr r6r;rBr8rrrGs # ######..........))))))@J@J@J@J@JY@J@J@JF . . . . .v . . .     r