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

packages = \
['syntags', 'syntags.lib']

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

extras_require = \
{'markdown': ['markdown2>=2.3.8,<3.0.0', 'pygments>=2.5.2,<3.0.0']}

setup_kwargs = {
    'name': 'syntags',
    'version': '0.1.0',
    'description': 'A beautiful python syntax to generate HTML.',
    'long_description': '<div align="center">\n\n# Syntags: Write your markup in Python, easily\n\n[Features] &emsp;•&emsp; [Install] &emsp;•&emsp; [License] &emsp;•&emsp; [Docs]\n\n</div>\n\n[Features]: #features\n[Install]: #install\n[License]: #license\n[Docs]: https://github.com/SeparateRecords/Syntags/tree/master/docs/\n\n**Syntags** lets you generate HTML, XML, SVG, etc. by writing concise, _real_ Python code.\n\n**Syntags** was built from the ground up for readable code. First-class support for _components_, _custom elements_, and _fragments_ is baked into the design.\n\n**Syntags** takes a different approach to Pyxl — taking Python\'s own syntax and repurposing it, rather than using a custom character encoding and transforming your invalid code into valid code.\n\n* The code you write is **real** Python, no magic.\n* You don\'t need to learn the quirks of a new syntax.\n* It\'s easy to get started with and integrate into your code.\n* Highlighting works, and your linter will only be _slightly_ angry.\n\n#### A brief note on the syntax ~\n\nPEP 8 isn\'t gospel. Creating a beautiful syntax means ignoring certain parts of it, and that\'s okay! The second section, "[A Foolish Consistency is the Hobgoblin of Little Minds][consistency]," even summarises this.\n\n<details>\n<summary>View a relevant excerpt</summary>\n\n> . . . **know when to be inconsistent** -- sometimes style guide\n> recommendations just aren\'t applicable. When in doubt, use your best judgment.\n> Look at other examples and **decide what looks best**.\n>\n> Some other good reasons to ignore a particular guideline:\n>\n> 1. When **applying the guideline would make the code less readable**, even for\n>    someone who is used to reading code that follows this PEP.\n>\n> 2. . . .\n\n</details>\n\nCheck out the [Syntags styleguide][styleguide] for recommendations on how to maintain good code quality.\n\n[consistency]: https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds\n\n[styleguide]: https://github.com/SeparateRecords/Syntags/tree/master/docs/styleguide.md\n\n## Features\n\n### an expressive syntax that _makes sense_\n\nStructured like a programming language, because it _is_ one. No context switching between templating and programming.\n\n```python\nimport syntags as tags\nfrom syntags.html import *\n\napp = html (lang="en") [\n  head [\n    title ["Some basic markup"]\n  ],\n  body [\n    main [\n      ...  # etc...\n    ]\n  ]\n]\n\nrendered = tags.render(app)\n```\n\n### intuitive syntax shorthands\n\nIt\'s effortless to write compact code that\'s easy to read and maintain.\n\n```python\nbody [\n  div .main_wrapper / main [\n    ...\n  ]\n]\n\n# The same, but without the shorthand:\nbody [\n  div (classes={"main-wrapper"}) [\n    main [\n      ...\n    ]\n  ]\n]\n```\n\n### reusable, declarative components\n\nSimilar to React, but very much Python.\n\n```python\nimport syntags as tags\nfrom syntags.html import *\n\n@tags.component\ndef hello_message(name, **attrs):\n  return div [\n    f"Hello {name}"\n  ]\n\n\nrv = tags.render(hello_message (name="world"))\n```\n\n<details>\n<summary>View the React JSX equivalent</summary>\n\n```jsx\nimport React from "react";\nimport ReactDOMServer from "react-dom/server";\n\nfunction HelloMessage({ name, ...props }) {\n  return (\n    <div>\n      Hello {name}\n    </div>\n  );\n}\n\n\nrv = ReactDOMServer.renderToStaticMarkup(<HelloMessage name="world" />)\n```\n\nKeep in mind, this is in JSX. Compiling it is yet another step. Syntags\' syntax is pure Python, no intermediate steps required.\n\n</details>\n\n### first-class fragments, no wizardry required\n\nFragments are just a sequence of elements, and they can be nested infinitely.\n\n```python\nHEAD_DATA = [\n  link (rel="canonical", href="https://rob.ac/"),\n  link (rel="stylesheet", href="dist/css/layout.css"),\n  link (rel="shortcut icon", href="favicon.ico", type="image/x-icon")\n]\n\nhtml (lang="en") [\n  head [\n    HEAD_DATA\n  ],\n  ...\n]\n```\n\n### simple, safe rendering\n\nEverything becomes a string and gets escaped, except for raw strings.\n\n```python\nimport syntags as tags\nfrom syntags.html import *\n\nrendered = tags.render(\n  html (lang="en") [\n    tags.raw("""\n    <head>\n      <title>A good example</title>\n      <meta charset="UTF-8">\n    </head>\n    """),\n    body [\n      p [\n        "<b>This will get escaped</b>"\n      ]\n    ]\n  ]\n)\n```\n\n### more than just HTML\n\nSyntags comes with a bunch of namespaces to make your life easy.\n\n* HTML tags: `html`\n* XML prolog and tag factory: `xml`\n* Some predefined XML namespaces: `svg`, `rss`, `sitemap`\n* Common, useful components: `ext`\n\n## Install\n\nYou can use Pip, or anything that can install from PyPI, such as [Poetry] or [Pipenv].\n\n```console\n$ pip install syntags\n```\n\n[Poetry]: https://python-poetry.org\n[Pipenv]: https://pipenv.pypa.io/en/latest/\n\n###### + Markdown component (`syntags.ext.markdown`)\n\n```console\n$ pip install syntags[markdown]\n```\n\n## License\n\nSyntags is licensed under the ISC license, a simplified version of the MIT license. You can modify this project and use it in whatever you want! The only condition for redistribution is that you must include a copy of the license.\n\nThere\'s a copy in `syntags/__init__.py`, so you\'ll be fine as long as you don\'t remove that! Otherwise, you can include the copy found in the root of [the repository][repo].\n\n[repo]: https://github.com/SeparateRecords/Syntags\n',
    'author': 'SeparateRecords',
    'author_email': 'me@rob.ac',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/SeparateRecords/Syntags',
    'packages': packages,
    'package_data': package_data,
    'extras_require': extras_require,
    'python_requires': '>=3.8,<4.0',
}


setup(**setup_kwargs)
