Package: mdBuilder
mdBuilderNOTICEThis library is just aTOY PROJECT!DON'T use it in production environment!InstallationpipinstallmdBuilderUsageBasic SyntaxHeadingsMarkdown:# Heading level 1## Heading level 2### Heading level 3#### Heading level 4##### Heading level 5###### Heading level 6Python:Heading(1,"Heading level 1")Heading(2,"Heading level 2")Heading(3,"Heading level 3")Heading(4,"Heading level 4")Heading(5,"Heading level 5")Heading(6,"Heading level 6")ParagraphsMarkdown:I really like using Markdown.

I think I'll use it to format all of my documents from now on.Python:Paragraph("I really like using Markdown.")Paragraph("I think I'll use it to format all of my documents from now on.")EmphasisBoldMarkdown:I just love**bold text**.
Love**is**boldPython:Paragraph("I just love ",Bold("bold text"),".")Paragraph("Love",Bold("is"),"bold")ItalicMarkdown:Italicized text is the*cat's meow*.
A*cat*meowPython:Paragraph("Italicized text is the ",Italic("cat's meow"),".")Paragraph("A",Italic("cat"),"meow")Bold and ItalicMarkdown:This text is ***really important***.
This is really***very***important text.Python:Paragraph("This text is ",BoldItalic("really important"),".")Paragraph("This is really",BoldItalic("very"),"important text.")BlockquotesMarkdown:>Dorothy followed her through many of the beautiful rooms in her castle.Python:Blockquote("Dorothy followed her through many of the beautiful rooms in her castle.")Blockquotes with Multiple ParagraphsMarkdown:>Dorothy followed her through many of the beautiful rooms in her castle.>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.Python:Blockquote("Dorothy followed her through many of the beautiful rooms in her castle.","The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.")Nested BlockquotesMarkdown:>Dorothy followed her through many of the beautiful rooms in her castle.>>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.Python:Blockquote("Dorothy followed her through many of the beautiful rooms in her castle.",Blockquote("The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood."))Blockquotes with Other ElementsMarkdown:>#### The quarterly results look great!>> * Revenue was off the chart.>* Profits were higher than ever.>>  *Everything* is going according to **plan**.Python:Blockquote(Heading(4,"The quarterly results look great!"),UnorderedList("Revenue was off the chart.","Profits were higher than ever."),Paragraph(Italic("Everything")," is going according to ",Bold("plan"),"."))ListsOrdered ListsMarkdown:1.First item2.Second item3.Third item4.Fourth item1.First item2.Second item3.Third item1.Indented item2.Indented item4.Fourth itemPython:OrderedList("First item","Second item","Third item","Fourth item")OrderedList("First item","Second item",["Third item",OrderedList("Indented item","Indented item")],"Fourth item")Unordered ListsMarkdown:*First item*Second item*Third item*Fourth item*First item*Second item*Third item*Indented item*Indented item*Fourth itemPython:UnorderedList("First item","Second item","Third item","Fourth item")UnorderedList("First item","Second item",["Third item",UnorderedList("Indented item","Indented item")],"Fourth item")Adding Elements in ListsParagraphsMarkdown:*This is the first list item.*Here's the second list item.

    I need to add another paragraph below the second list item.*And here's the third list item.Python:UnorderedList("This is the first list item.",["Here's the second list item.",Paragraph("I need to add another paragraph below the second list item.")],"And here's the third list item.")BlockquotesMarkdown:*This is the first list item.*Here's the second list item.>A blockquote would look great below the second list item.*And here's the third list item.Python:UnorderedList("This is the first list item.",["Here's the second list item.",Blockquote("A blockquote would look great below the second list item.")],"And here's the third list item.")ImagesMarkdown:1.Open the file containing the Linux mascot.2.Marvel at its beauty.

    ![Tux, the Linux mascot](/assets/images/tux.png)3.Close the file.Python:OrderedList("Open the file containing the Linux mascot.",["Marvel at its beauty.",Image(path_or_url="/assets/images/tux.png",alt_text="Tux, the Linux mascot")],"Close the file.")ListsMarkdown:1.First item2.Second item3.Third item*Indented item*Indented item4.Fourth itemPython:OrderedList("First item","Second item",["Third item",UnorderedList("Indented item","Indented item")],"Fourth item")CodeMarkdown:At the command prompt, type`nano`.Python:Paragraph("At the command prompt, type ",Code("nano"),".")Horizontal RulesMarkdown:---Python:HorizontalRule()LinksMarkdown:My favorite search engine is [Duck Duck Go](https://duckduckgo.com).Python:Paragraph("My favorite search engine is ",Link(url="https://duckduckgo.com",text_or_image="Duck Duck Go"),".")Adding TitlesMarkdown:My favorite search engine is [Duck Duck Go](https://duckduckgo.com "The best search engine for privacy").Python:Paragraph("My favorite search engine is ",Link(url="https://duckduckgo.com",text_or_image="Duck Duck Go",title="The best search engine for privacy"),".")URLs and Email AddressesMarkdown:<https://www.markdownguide.org>
<fake@example.com>Python:Link(url="https://www.markdownguide.org")Link(url="fake@example.com")Formatting LinksMarkdown:I love supporting the [**EFF**](https://eff.org).
This is the [*Markdown Guide*](https://www.markdownguide.org).
See the section on [`code`](#code).Python:Paragraph("I love supporting the ",Link(url="https://eff.org",text_or_image=Bold("EFF")),".")Paragraph("This is the ",Link(url="https://www.markdownguide.org",text_or_image=Italic("Markdown Guide")),".")Paragraph("See the section on ",Link(url="#code",text_or_image="code"),".")ImagesMarkdown:![The San Juan Mountains are beautiful!](/assets/images/san-juan-mountains.jpg "San Juan Mountains")Python:Image(path_or_url="/assets/images/san-juan-mountains.jpg",alt_text="The San Juan Mountains are beautiful!",title="San Juan Mountains")Linking ImagesMarkdown:[![An old rock in the desert](/assets/images/shiprock.jpg "Shiprock, New Mexico by Beau Rogers")](https://www.flickr.com/photos/beaurogers/31833779864/in/photolist-Qv3rFw-34mt9F-a9Cmfy-5Ha3Zi-9msKdv-o3hgjr-hWpUte-4WMsJ1-KUQ8N-deshUb-vssBD-6CQci6-8AFCiD-zsJWT-nNfsgB-dPDwZJ-bn9JGn-5HtSXY-6CUhAL-a4UTXB-ugPum-KUPSo-fBLNm-6CUmpy-4WMsc9-8a7D3T-83KJev-6CQ2bK-nNusHJ-a78rQH-nw3NvT-7aq2qf-8wwBso-3nNceh-ugSKP-4mh4kh-bbeeqH-a7biME-q3PtTf-brFpgb-cg38zw-bXMZc-nJPELD-f58Lmo-bXMYG-bz8AAi-bxNtNT-bXMYi-bXMY6-bXMYv)Python:Link(url="https://www.flickr.com/photos/beaurogers/31833779864/in/photolist-Qv3rFw-34mt9F-a9Cmfy-5Ha3Zi-9msKdv-o3hgjr-hWpUte-4WMsJ1-KUQ8N-deshUb-vssBD-6CQci6-8AFCiD-zsJWT-nNfsgB-dPDwZJ-bn9JGn-5HtSXY-6CUhAL-a4UTXB-ugPum-KUPSo-fBLNm-6CUmpy-4WMsc9-8a7D3T-83KJev-6CQ2bK-nNusHJ-a78rQH-nw3NvT-7aq2qf-8wwBso-3nNceh-ugSKP-4mh4kh-bbeeqH-a7biME-q3PtTf-brFpgb-cg38zw-bXMZc-nJPELD-f58Lmo-bXMYG-bz8AAi-bxNtNT-bXMYi-bXMY6-bXMYv",text_or_image=Image(path_or_url="/assets/images/shiprock.jpg",alt_text="ImAn old rock in the desertage",title="Shiprock, New Mexico by Beau Rogers"))Extened SyntaxTablesMarkdown:| Syntax | Description |
| --- | --- |
| Header | Title |
| Paragraph | Text |Python:Table(headers=["Syntax","Description"],content=[["Header","Title"],["Paragraph"."Text"]])AlignmentMarkdown:| Syntax      | Description | Test Text     |
| :---        |    :----:   |          ---: |
| Header      | Title       | Here's this   |
| Paragraph   | Text        | And more      |Python:Table(header=["Syntax","Description","Test Text"],content=[["Header","Title","Here's this"],["Paragraph"."Text","And more"]],alignment=[Alignment.LEFT,Alignment.CENTER,Alignment.RIGHT])Fenced Code BlocksMarkdown:```{"firstName": "John","lastName": "Smith","age": 25}```Python:FencedCodeBlock("{\n"+"\"firstName\":\"John\"\n"+"\"lastName\":\"Smith\"\n"+"\"age\": 25\n"+"}")Syntax HighlightingMarkdown:```json{"firstName":"John","lastName":"Smith","age":25}```Python:FencedCodeBlock("{\n"+"\"firstName\":\"John\"\n"+"\"lastName\":\"Smith\"\n"+"\"age\": 25\n"+"}",syntax="json")StrikethroughMarkdown:~~The world is flat.~~We now know that the world is round.Python:Paragraph(Strikethrough("The world is flat.")," We now know that the world is round.")Task ListsMarkdown:- [x]Write the press release- [ ]Update the website- [ ]Contact the mediaPython:TaskList(("Write the press release","x"),"Update the website","Contact the media")TODOHTMLHeading IDsDefinition ListsHighlightSubscriptSuperscriptReferenceThe markdown string format refers tohttps://www.markdownguide.org/LICENSEThis project is published underMIT License.