# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['markdown_toolkit', 'markdown_toolkit.helpers']

package_data = \
{'': ['*']}

setup_kwargs = {
    'name': 'markdown-toolkit',
    'version': '0.2.0',
    'description': 'Utility package for programmatically creating markdown documents',
    'long_description': '![https://raw.githubusercontent.com/dcurtis/markdown-mark/99572b4a4f71b4ea2b1186a30f440ff2fcf66d27/svg/markdown-mark.svg](https://raw.githubusercontent.com/dcurtis/markdown-mark/99572b4a4f71b4ea2b1186a30f440ff2fcf66d27/svg/markdown-mark.svg)\n# Markdown Toolkit\n\n> **INFO:** This readme is dynamically generated via [`generate_readme.py`](generate_readme.py). **_No changes to this file will be persistent between Github Actions runs._**\n\nA python library for creating and manipulating markdown.\n\nThis library heavily utilises context managers to encapsulate \nlogical blocks in the markdown. Primarily this is used to keep \ntrack of the heading levels, so nested `heading` context\nmanagers will keep track of the header level.\n\n## Examples\n\n> **INFO:** Examples here are automatically taken from the `examples` directory and shown below.\n\n### `examples/example_tables.py`\n\n```python\nfrom markdown_toolkit import MarkdownDocument\n\ndoc = MarkdownDocument()\n# You can use a table as a context manager and lazily add rows\nwith doc.table(titles=["Apple Type", "Grown Count"], sort_by="Grown Count") as table:\n    table.add_row(apple_type="Granny Smith", grown_count=3)\n    table.add_row(apple_type="Golden Delicious", grown_count=1)\n\nwith doc.table(titles=["Ticker", "Stock Percentage"]) as table:\n    table.add_row(ticker="AAPL", stock_percentage="7.14%")\n    table.add_row(ticker="MSFT", stock_percentage="6.1%")\n    table.add_row(ticker="AMZN", stock_percentage="3.8%")\n    table.add_row(ticker="TSLA", stock_percentage="2.5%")\n    table.add_row(ticker="GOOGL", stock_percentage="2.2%")\n\n# Or render a list of dictionaries in a table in one go\nraw_table_data = [\n    {"Major": "Biology", "GPA": "2.4", "Name": "Edward"},\n    {"Major": "Physics", "GPA": "2.9", "Name": "Emily"},\n    {"Major": "Mathematics", "GPA": "3.5", "Name": "Sarah"},\n]\ndoc.table(raw_table_data)\n\nwith open("examples/example_tables.md", "w", encoding="UTF-8") as file:\n    file.write(doc.render())\n\n```\n**_Markdown Output:_**\n`examples/example_tables.md`\n```markdown\n| Apple Type | Grown Count |\n| --- | --- |\n| Golden Delicious | 1 |\n| Granny Smith | 3 |\n\n| Ticker | Stock Percentage |\n| --- | --- |\n| AAPL | 7.14% |\n| MSFT | 6.1% |\n| AMZN | 3.8% |\n| TSLA | 2.5% |\n| GOOGL | 2.2% |\n\n| Major | GPA | Name |\n| --- | --- | --- |\n| Biology | 2.4 | Edward |\n| Physics | 2.9 | Emily |\n| Mathematics | 3.5 | Sarah |\n\n```\n**_Markdown Rendered:_**\n| Apple Type | Grown Count |\n| --- | --- |\n| Golden Delicious | 1 |\n| Granny Smith | 3 |\n\n| Ticker | Stock Percentage |\n| --- | --- |\n| AAPL | 7.14% |\n| MSFT | 6.1% |\n| AMZN | 3.8% |\n| TSLA | 2.5% |\n| GOOGL | 2.2% |\n\n| Major | GPA | Name |\n| --- | --- | --- |\n| Biology | 2.4 | Edward |\n| Physics | 2.9 | Emily |\n| Mathematics | 3.5 | Sarah |\n\n\n----\n\n### `examples/example_headings.py`\n\n```python\nfrom markdown_toolkit import MarkdownDocument\n\ndoc = MarkdownDocument()\nwith doc.heading("Markdown Toolkit"):\n    doc.paragraph("Items added inside the context manager respect the heading level.")\n    with doc.heading("Nested Header"):\n        doc.paragraph(\n            """\n        Lorem ipsum dolor sit amet, consectetur adipiscing elit. \n        Vestibulum ornare magna tincidunt, luctus neque eu, iaculis nisl. \n        Duis porta pharetra hendrerit. Donec ac bibendum purus. Phasellus \n        sagittis tincidunt metus, a condimentum enim malesuada ut. \n        Integer porta pellentesque tempus. Vivamus erat est, imperdiet \n        id enim in, rutrum luctus nisi. Praesent in nibh eleifend, \n        consequat est quis, ultricies dolor. \n        """\n        )\n\nwith open("examples/example_headings.md", "w", encoding="UTF-8") as file:\n    file.write(doc.render())\n\n```\n**_Markdown Output:_**\n`examples/example_headings.md`\n```markdown\n# Markdown Toolkit\n\nItems added inside the context manager respect the heading level.\n\n## Nested Header\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. \nVestibulum ornare magna tincidunt, luctus neque eu, iaculis nisl. \nDuis porta pharetra hendrerit. Donec ac bibendum purus. Phasellus \nsagittis tincidunt metus, a condimentum enim malesuada ut. \nInteger porta pellentesque tempus. Vivamus erat est, imperdiet \nid enim in, rutrum luctus nisi. Praesent in nibh eleifend, \nconsequat est quis, ultricies dolor. \n\n```\n**_Markdown Rendered:_**\n# Markdown Toolkit\n\nItems added inside the context manager respect the heading level.\n\n## Nested Header\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. \nVestibulum ornare magna tincidunt, luctus neque eu, iaculis nisl. \nDuis porta pharetra hendrerit. Donec ac bibendum purus. Phasellus \nsagittis tincidunt metus, a condimentum enim malesuada ut. \nInteger porta pellentesque tempus. Vivamus erat est, imperdiet \nid enim in, rutrum luctus nisi. Praesent in nibh eleifend, \nconsequat est quis, ultricies dolor. \n\n\n----\n\n### `examples/example_lists.py`\n\n```python\nfrom markdown_toolkit import MarkdownDocument, link, bold, italic\n\ndoc = MarkdownDocument()\ndoc.list("Example Item")\nwith doc.list("List Item that has children"):\n    doc.list("Child Item")\n    doc.list("Child Item")\n    doc.list("Child Item")\n\ndoc.list("Ordered lists are possible too", ordered=True)\nwith doc.list("And children can be ordered", ordered=True):\n    doc.list("First Child", ordered=True)\n    doc.list("Second Child", ordered=True)\n    with doc.list("Third Child", ordered=True):\n        doc.list("First Grandchild", ordered=True)\n\nwith doc.list("You can nest Paragraphs too!"):\n    doc.linebreak()\n    doc.paragraph(\n        "This is quite helpful when you\'re using lists for document breaks rather than items."\n    )\n    doc.paragraph(\n        """\n        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ornare magna \n        tincidunt, luctus neque eu, iaculis nisl. Duis porta pharetra hendrerit. Donec ac \n        bibendum purus. Phasellus sagittis tincidunt metus, a condimentum enim malesuada ut.\n        Integer porta pellentesque tempus. Vivamus erat est, imperdiet id enim in, rutrum\n        luctus nisi. Praesent in nibh eleifend, consequat est quis, ultricies dolor. \n    """\n    )\n    doc.text(\n        link(\n            uri="https://github.com/danielloader/markdown-toolkit",\n            text="Links supported too",\n        )\n    )\n    doc.list("And you can nest children from this too.")\n    doc.list("Should you want to.")\n\n\nwith open("examples/example_lists.md", "w", encoding="UTF-8") as file:\n    file.write(doc.render())\n\n```\n**_Markdown Output:_**\n`examples/example_lists.md`\n```markdown\n*   Example Item\n*   List Item that has children\n    *   Child Item\n    *   Child Item\n    *   Child Item\n1.  Ordered lists are possible too\n1.  And children can be ordered\n    1.  First Child\n    1.  Second Child\n    1.  Third Child\n        1.  First Grandchild\n*   You can nest Paragraphs too!\n\n    This is quite helpful when you\'re using lists for document breaks rather than items.\n\n    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ornare magna \n    tincidunt, luctus neque eu, iaculis nisl. Duis porta pharetra hendrerit. Donec ac \n    bibendum purus. Phasellus sagittis tincidunt metus, a condimentum enim malesuada ut.\n    Integer porta pellentesque tempus. Vivamus erat est, imperdiet id enim in, rutrum\n    luctus nisi. Praesent in nibh eleifend, consequat est quis, ultricies dolor. \n\n    [Links supported too](https://github.com/danielloader/markdown-toolkit)\n    *   And you can nest children from this too.\n    *   Should you want to.\n```\n**_Markdown Rendered:_**\n*   Example Item\n*   List Item that has children\n    *   Child Item\n    *   Child Item\n    *   Child Item\n1.  Ordered lists are possible too\n1.  And children can be ordered\n    1.  First Child\n    1.  Second Child\n    1.  Third Child\n        1.  First Grandchild\n*   You can nest Paragraphs too!\n\n    This is quite helpful when you\'re using lists for document breaks rather than items.\n\n    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ornare magna \n    tincidunt, luctus neque eu, iaculis nisl. Duis porta pharetra hendrerit. Donec ac \n    bibendum purus. Phasellus sagittis tincidunt metus, a condimentum enim malesuada ut.\n    Integer porta pellentesque tempus. Vivamus erat est, imperdiet id enim in, rutrum\n    luctus nisi. Praesent in nibh eleifend, consequat est quis, ultricies dolor. \n\n    [Links supported too](https://github.com/danielloader/markdown-toolkit)\n    *   And you can nest children from this too.\n    *   Should you want to.\n\n----\n',
    'author': 'Daniel Loader',
    'author_email': 'hello@danielloader.uk',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/danielloader/markdown-toolkit/',
    'packages': packages,
    'package_data': package_data,
    'python_requires': '>=3.7,<4.0',
}


setup(**setup_kwargs)
