markupit.structure package
Submodules
markupit.structure.block module
- class markupit.structure.block.BlockQuote(content: list)[source]
Bases:
BlockA class representing a BlockQuote element of Block type.
- Parameters:
content (List[Block]) – The content of the element.
- class markupit.structure.block.BulletList(content: list)[source]
Bases:
BlockA class representing a BulletList element of Block type.
- Parameters:
content (List[List[Block]]) – The content of the element.
- class markupit.structure.block.CodeBlock(content: list)[source]
Bases:
BlockA class representing a CodeBlock element of Block type.
- Parameters:
content ([Attr, str]) – The content of the element.
- class markupit.structure.block.DefinitionList(content: list)[source]
Bases:
BlockA class representing a DefinitionList element of Block type.
- class markupit.structure.block.Div(content: list)[source]
Bases:
BlockA class representing a Div element of Block type.
- class markupit.structure.block.Figure(content: list)[source]
Bases:
BlockA class representing a Figure element of Block type.
- class markupit.structure.block.Header(content: list)[source]
Bases:
BlockA class representing a Header element of Block type.
- class markupit.structure.block.HorizontalRule[source]
Bases:
BlockA class representing a HorizontalRule element of Block type.
- class markupit.structure.block.LineBlock(content: list)[source]
Bases:
BlockA class representing a LineBlock element of Block type.
- Parameters:
content (List[List[Inline]]) – The content of the element.
- class markupit.structure.block.Null[source]
Bases:
BlockA class representing a Null element of Block type.
- class markupit.structure.block.OrderedList(content: list)[source]
Bases:
BlockA class representing an OrderedList element of Block type.
- Parameters:
content ([ListAttributes, List[List[Block]]]) – The content of the element.
- class markupit.structure.block.Para(content: list)[source]
Bases:
BlockA class representing a Para element of Block type.
- Parameters:
content (List[Inline]) – The content of the element.
- class markupit.structure.block.Plain(content: list)[source]
Bases:
BlockA class representing a Plain element of Block type.
- Parameters:
content (List[Inline]) – The content of the element.
markupit.structure.content module
- class markupit.structure.content.Attr(content: list)[source]
Bases:
ContentElementClass representing an Attr element.
- Parameters:
content (list) – The content of the element.
- class markupit.structure.content.Caption(content: list)[source]
Bases:
ContentElementClass representing a Caption element.
- class markupit.structure.content.Cell(content: list)[source]
Bases:
ContentElementClass representing a Cell element.
- class markupit.structure.content.Citation(content: list)[source]
Bases:
ContentElementClass representing a Citation element.
- Parameters:
content ([str, List[Inline], List[Inline], CitationMode, int, int]) – The content of the element.
- class markupit.structure.content.ColSpec(content: list)[source]
Bases:
ContentElementClass representing a ColSpec element.
- class markupit.structure.content.Format(content: str)[source]
Bases:
ContentElementClass representing a Format element.
- Parameters:
content (str) – The content of the element.
- class markupit.structure.content.ListAttributes(content: list)[source]
Bases:
ContentElementClass representing a ListAttributes element.
- Parameters:
content ([int, ListNumberStyle, ListNumberDelim]) – The content of the element.
- class markupit.structure.content.Row(content: list)[source]
Bases:
ContentElementClass representing a Row element.
- class markupit.structure.content.TableBody(content: list)[source]
Bases:
ContentElementClass representing a TableBody element.
- class markupit.structure.content.TableFoot(content: list)[source]
Bases:
ContentElementClass representing a TableFoot element.
- class markupit.structure.content.TableHead(content: list)[source]
Bases:
ContentElementClass representing a TableHead element.
- class markupit.structure.content.Target(content: list)[source]
Bases:
ContentElementClass representing a Target element.
- Parameters:
content ([str, str]) – The content of the element.
markupit.structure.document module
- class markupit.structure.document.Document(blocks: List[Element] | None = None)[source]
Bases:
objectA class representing a document. It contains a list of blocks.
- Parameters:
blocks (List[Element], optional) – A list of blocks in the document.
- add_block(block: Element) None[source]
Add a block to the end of the document.
- Parameters:
block (Element) – The block to add.
markupit.structure.enum module
- class markupit.structure.enum.Alignment(content: str)[source]
Bases:
EnumElementClass representing an Alignment enum element.
- Parameters:
content (str) – Chosen value from the enumeration.
- class markupit.structure.enum.CitationMode(content: str)[source]
Bases:
EnumElementClass representing a CitationMode enum element.
- Parameters:
content (str) – Chosen value from the enumeration.
- class markupit.structure.enum.ColWidth(content: str, width: float | None = None)[source]
Bases:
EnumElementClass representing a ColWidth enum element.
- Parameters:
content (str) – Chosen value from the enumeration.
width (float, optional) – The width of the column, used when content is ‘ColWidth’.
- class markupit.structure.enum.ListNumberDelim(content: str)[source]
Bases:
EnumElementClass representing a ListNumberDelim enum element.
- Parameters:
content (str) – Chosen value from the enumeration.
- class markupit.structure.enum.ListNumberStyle(content: str)[source]
Bases:
EnumElementClass representing a ListNumberStyle enum element.
- Parameters:
content (str) – Chosen value from the enumeration.
- class markupit.structure.enum.MathType(content: str)[source]
Bases:
EnumElementClass representing a MathType enum element.
- Parameters:
content (str) – Chosen value from the enumeration.
- class markupit.structure.enum.QuoteType(content: str)[source]
Bases:
EnumElementClass representing a QuoteType enum element.
- Parameters:
content (str) – Chosen value from the enumeration.
markupit.structure.general_types module
- class markupit.structure.general_types.Block(content: Any | None = None)[source]
Bases:
ElementA class representing an element of Block type.
- Parameters:
content (Any, optional) – The content of the element.
- class markupit.structure.general_types.ContentElement(content: Any)[source]
Bases:
ElementAbstract class representing an element that is not represented by its tag in JSON.
- Parameters:
content (Any) – The content of the element.
- class markupit.structure.general_types.Element(tag: str | None = None, content: Any | None = None)[source]
Bases:
ABCAn abstract class representing an element in a document.
- Parameters:
tag (str, optional) – The name describing type of element.
content (Any, optional) – The content of the element.
- class markupit.structure.general_types.EnumElement(content: str)[source]
Bases:
ElementClass representing an element of Enum type.
- Parameters:
content (str) – Chosen value from the enumeration.
markupit.structure.inline module
- class markupit.structure.inline.Cite(content: list)[source]
Bases:
InlineA class representing a Cite element of Inline type.
- class markupit.structure.inline.Code(content: list)[source]
Bases:
InlineA class representing a Code element of Inline type.
- Parameters:
content ([Attr, str]) – The content of the element.
- class markupit.structure.inline.Emph(content: list)[source]
Bases:
InlineA class representing an Emph element of Inline type.
- Parameters:
content (List[Inline]) – The content of the element.
- class markupit.structure.inline.Image(content: list)[source]
Bases:
InlineA class representing an Image element of Inline type.
- class markupit.structure.inline.LineBreak[source]
Bases:
InlineA class representing a LineBreak element of Inline type.
- class markupit.structure.inline.Link(content: list)[source]
Bases:
InlineA class representing a Link element of Inline type.
- class markupit.structure.inline.Math(content: list)[source]
Bases:
InlineA class representing a Math element of Inline type.
- Parameters:
content ([EnumElement, str]) – The content of the element.
- class markupit.structure.inline.Note(content: list)[source]
Bases:
InlineA class representing a Note element of Inline type.
- Parameters:
content (List[Block]) – The content of the element.
- class markupit.structure.inline.Quoted(content: list)[source]
Bases:
InlineA class representing a Quoted element of Inline type.
- class markupit.structure.inline.RawInline(content: list)[source]
Bases:
InlineA class representing a RawInline element of Inline type.
- Parameters:
content ([Format, str]) – The content of the element.
- class markupit.structure.inline.SmallCaps(content: list)[source]
Bases:
InlineA class representing a SmallCaps element of Inline type.
- Parameters:
content (List[Inline]) – The content of the element.
- class markupit.structure.inline.SoftBreak[source]
Bases:
InlineA class representing a SoftBreak element of Inline type.
- class markupit.structure.inline.Space[source]
Bases:
InlineA class representing a Space element of Inline type.
- class markupit.structure.inline.Span(content: list)[source]
Bases:
InlineA class representing a Span element of Inline type.
- class markupit.structure.inline.Str(content: str)[source]
Bases:
InlineA class representing a Str element of Inline type.
- Parameters:
content (str) – The content of the element.
- class markupit.structure.inline.Strikeout(content: list)[source]
Bases:
InlineA class representing a Strikeout element of Inline type.
- Parameters:
content (List[Inline]) – The content of the element.
- class markupit.structure.inline.Strong(content: list)[source]
Bases:
InlineA class representing a Strong element of Inline type.
- Parameters:
content (List[Inline]) – The content of the element.
- class markupit.structure.inline.Subscript(content: list)[source]
Bases:
InlineA class representing a Subscript element of Inline type.
- Parameters:
content (List[Inline]) – The content of the element.
Module contents
- class markupit.structure.Document(blocks: List[Element] | None = None)[source]
Bases:
objectA class representing a document. It contains a list of blocks.
- Parameters:
blocks (List[Element], optional) – A list of blocks in the document.
- add_block(block: Element) None[source]
Add a block to the end of the document.
- Parameters:
block (Element) – The block to add.