{ "info": { "author": "Structured-Markdown", "author_email": "isaacimagine@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7", "Topic :: Text Processing :: Markup" ], "description": "\nStructured-Markdown\n===================\n\nI love markdown, but I've always wanted to use it to write more than just \"flat\" documents.\nStructured Markdown is an extension to markdown syntax that allows for nesting and styling within markdown documents.\nSo, how does it work?\n\nOverview\n--------\n\nSMD is currently a python module that parses SMD into formatted html and css.\nCurrently, the module uses `mistune `_ to parse the markdown parts of .smd documents.\nThe general idea is that a static site could use these easy-to-write SMD files in place of html templates or the like.\nIf you're wondering what makes SMD so special, jump down to the `SMD vs MD <#smd-vs-md>`_ section.\n\nInstallation\n------------\n\nWell, I finally got it working with pip, so\n\n.. code-block::\n\n pip install structured-markdown\n\nwill now work!\n(I'm using ``Python >= 3.7``\\ , btw.)\n\nIf you want to build from source, simply:\n\n.. code-block::\n\n git clone https://github.com/Structured-Markdown/structured_markdown.git\n cd structured_markdown\n pip install .\n\n(At least, that's what works for me.)\n\nYou may also need to install ``mistune``\\ , a markdown parser.\n\n.. code-block::\n\n pip install mistune\n\nRemember to use ``pip3`` if your working with Python 3.\nI always forget to use ``pip3``\\ , so I thought you might like a little reminder \ud83d\udc4d.\n\nUsage\n-----\n\nTo use SMD in your project, import it like so:\n\n.. code-block:: python\n\n import structured_markdown as smd\n\nThe main purpose of SMD is to parse .smd documents. This is pretty simple in ``structured_markdown``\\ :\n\n.. code-block:: python\n\n with open(\"example.smd\", \"r\") as fin:\n inp = fin.read()\n\n html, css = smd.parse(inp)\n\nif you wish to get back only html or css, do the following:\n\n.. code-block:: python\n\n html = smd.parse(inp, html=True)\n css = smd.parse(inp, css=True)\n\nI'm planning to add templating capabilities to SMD, but it's not done yet \ud83d\ude14.\n\nSMD vs MD\n---------\n\nAll squares are rectangles, but not all rectangles are squares.\nThe same can be said of SMD - All Markdown documents are valid SMD documents, but not necessarily the other way around.\nWith that out of the way, what's the difference?\n\nA SMD document is made of layers.\nEach layer has a name, and can contain markdown content and/or other layers.\n\n.. code-block::\n\n layer welcome:\n # Welcome to Structured-Markdown!\n this is markdown embedded within a layer.\n\nThis is a block of markdown within a layer whose name is ``welcome``.\nHere is the equivalent html.\n\n.. code-block:: html\n\n
\n
\n

Welcome to Structured-Markdown!

\n

this is markdown embedded within a layer.

\n
\n
\n\nEssentially, a layer is a ``div``\\ , the layer name being the ``div``\\ 's class.\nEverything is put into a ``root div`` before the parsed SMD is returned.\n\nNesting is pretty simple:\n\n.. code-block::\n\n layer welcome:\n # Welcome to Structured-Markdown!\n this is markdown embedded within a layer.\n layer nested:\n hey, this is nested\n more markdown after the nesting\n\nWhich becomes:\n\n.. code-block:: html\n\n
\n
\n

Welcome to Structured-Markdown!

\n

this is markdown embedded within a layer.

\n
\n

hey, this is nested

\n
\n

more markdown after the nesting

\n
\n
\n\nWhere it really shines is when text is wrapped in complex formatting, like this navbar example:\n\n.. code-block::\n\n layer navbar:\n layer logotype:\n # Templating Engine\n layer navlinks:\n 1. [blog](/blog)\n 2. [about](/about)\n 3. [projects](/projects)\n\nNote that the expanded html is longer and more verbose.\n\n.. code-block:: html\n\n
\n \n
\n\nSo, what about styling?\nI was feeling a bit lazy, and had to refactor a lot of code to introduce styling, so for now it's practically a one to one mapping to css.\nHere's what styling looks like:\n\n.. code-block::\n\n style layer:\n border = 1px solid\n font-family = sans-serif\n\nuse the ``style`` keyword to indent a style block - then, for each line in the style block, put the element on the left, followed by an equals sign, followed by the attribute.\n\n.. code-block::\n\n style layer.navbar:\n background-color = #fff\n\nAll normal css selectors should work, note that you should use the word ``layer`` instead of ``div``.\n(You can still use div if you'd like, layer makes it look more readable.)\n\n.. code-block::\n\n layer.navbar a:hover:\n color = #888\n\nWhen parsed, SMD style blocks are fully transpiled into css. Hopefully, in the future I'll've implemented a better styling system, but this is what's here to stay for now.\n\nThat's about it for now.\nNot all features are implemented as this is still a WIP.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Structured-Markdown/structured_markdown", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "structured-markdown", "package_url": "https://pypi.org/project/structured-markdown/", "platform": "", "project_url": "https://pypi.org/project/structured-markdown/", "project_urls": { "Homepage": "https://github.com/Structured-Markdown/structured_markdown" }, "release_url": "https://pypi.org/project/structured-markdown/0.2.0/", "requires_dist": [ "mistune", "m2r" ], "requires_python": "", "summary": "Add an extra dimension to your markdown documents", "version": "0.2.0" }, "last_serial": 4933059, "releases": { "0.0": [ { "comment_text": "", "digests": { "md5": "a11d1a9f7db5016888d6356e08ae6834", "sha256": "9ac004715a6d6b0edcad412d73883bf9c5ab2ee5c40ad02e7419a82e899db062" }, "downloads": -1, "filename": "structured_markdown-0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a11d1a9f7db5016888d6356e08ae6834", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4956, "upload_time": "2019-03-07T09:14:20", "url": "https://files.pythonhosted.org/packages/16/2c/a8676d2b5f6438c569211dff03421722f080e4343cead0e912517a7382c0/structured_markdown-0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "94a28a997f4d0acc1e9cbcb416ad3a50", "sha256": "047928cc0386769374efc9624aabbf3411dfca573b882e98609e2e02a6cd4434" }, "downloads": -1, "filename": "structured_markdown-0.0.tar.gz", "has_sig": false, "md5_digest": "94a28a997f4d0acc1e9cbcb416ad3a50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3787, "upload_time": "2019-03-07T09:14:22", "url": "https://files.pythonhosted.org/packages/26/7d/686383feef86a682a603271f82875727c02bb8dabfefc4f452d5e8511703/structured_markdown-0.0.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "8c9f07dadfef169ca5524ae6b5ef5c0a", "sha256": "f6c44847461cc69eebbba5981463afc7e33280e60bcdfb9e1b63b1b7b869f01c" }, "downloads": -1, "filename": "structured_markdown-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8c9f07dadfef169ca5524ae6b5ef5c0a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6018, "upload_time": "2019-03-07T13:13:58", "url": "https://files.pythonhosted.org/packages/fd/96/2d096b3e9452ea84567d98666da7f1332f504e70e880eefcad2080bd2e51/structured_markdown-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf8fdc28b109afb3c7f5f6c6ae09116e", "sha256": "cc27116819c595db63d97e7607b2970e3f3602a7f9ec4ea5300f6ccf31385a04" }, "downloads": -1, "filename": "structured_markdown-0.1.tar.gz", "has_sig": false, "md5_digest": "cf8fdc28b109afb3c7f5f6c6ae09116e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5066, "upload_time": "2019-03-07T13:14:00", "url": "https://files.pythonhosted.org/packages/c0/1c/1c4a640dfc56d31a378d66bcc9b9a52cf55fd90c72dd03b915cb7fd64c08/structured_markdown-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "75ec936620189cd7c5849a67d45cddff", "sha256": "72174173097c5ffc9bebf568ebabd6adbd7ba2846afc3fa1dafb27663f1a823e" }, "downloads": -1, "filename": "structured_markdown-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "75ec936620189cd7c5849a67d45cddff", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6275, "upload_time": "2019-03-08T01:21:14", "url": "https://files.pythonhosted.org/packages/4d/d0/a9e6d8d935692ee2881d47e1b78c2bd846de4bd9591bfec3aae3a87fc4b5/structured_markdown-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b22308a93a4ea0411c11a2271c1667d", "sha256": "e41cb4795ede4e9104100c2f3d048f4d2304f156571b6fe2ffdaf5e772e22728" }, "downloads": -1, "filename": "structured_markdown-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2b22308a93a4ea0411c11a2271c1667d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5653, "upload_time": "2019-03-08T01:21:16", "url": "https://files.pythonhosted.org/packages/b0/8b/bffc2b844bc2913882bfdede3938c1ce94c96783633510898a1672c44047/structured_markdown-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "25ca9a56fdfd0d6dde2f2f3b08faf90a", "sha256": "c5809391c726051e3bbff9794b2f8154f6fcb0217a7eedf202ee990e24763faf" }, "downloads": -1, "filename": "structured_markdown-0.1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "25ca9a56fdfd0d6dde2f2f3b08faf90a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6635, "upload_time": "2019-03-09T01:03:32", "url": "https://files.pythonhosted.org/packages/c7/0c/84d5a2754a9ff9760bccfaa5b52720c80646857336ca77544fac0c6be0b6/structured_markdown-0.1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a38ec64e3afe00faf1fc0fa4175680f", "sha256": "9db4cad95ba06aa9b0db5e264bb54032f1a3135d1791dc9ce94505620cba2e26" }, "downloads": -1, "filename": "structured_markdown-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8a38ec64e3afe00faf1fc0fa4175680f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6120, "upload_time": "2019-03-09T01:03:33", "url": "https://files.pythonhosted.org/packages/74/cc/e653ed32c8e810ef5687ecb947dbae6a5bfb9a0546e35b65f4b8907c81c5/structured_markdown-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "71b6facf809e9129ee7f5d8566a9f844", "sha256": "676745cf82d4ba55f7c5cc28d1f683dc2bc564ad3859333c3b35292ff3068480" }, "downloads": -1, "filename": "structured_markdown-0.1.3-py2-none-any.whl", "has_sig": false, "md5_digest": "71b6facf809e9129ee7f5d8566a9f844", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6617, "upload_time": "2019-03-09T02:01:43", "url": "https://files.pythonhosted.org/packages/d8/4b/9cdd1fb480295bc8bfe87eb9acf94bc1413837779922e61e6451b2025e11/structured_markdown-0.1.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cfb55f22ff50ff311903d6aa078d0ce2", "sha256": "cf0391b8b372ab4d456e292bda113c686a5ddf3361df14ec18426b591f8cf043" }, "downloads": -1, "filename": "structured_markdown-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cfb55f22ff50ff311903d6aa078d0ce2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6120, "upload_time": "2019-03-09T02:01:45", "url": "https://files.pythonhosted.org/packages/85/e3/e1b5d513e2ed213e36e18e8a87e642d9ffb71185ed08d5ade8d0ef0aaeaa/structured_markdown-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ffe8d0dcfc5cea8db32dd65fd2e7da14", "sha256": "bbf9bb6229bc778a9e3a39c57096d980ab5e4ef47baa418fe99854c8976ee5b8" }, "downloads": -1, "filename": "structured_markdown-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ffe8d0dcfc5cea8db32dd65fd2e7da14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7283, "upload_time": "2019-03-13T05:06:57", "url": "https://files.pythonhosted.org/packages/7c/83/78f568726fce6cfcc860eb9ddb6878a7047f99b46c00ebc1ddc1a6902f5e/structured_markdown-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0eaad4f621f59273fb0704415628e4c9", "sha256": "6312c1d69c7c5f92f06965705342e23fbb95fa97ea65c76a2266f9123d7d7644" }, "downloads": -1, "filename": "structured_markdown-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0eaad4f621f59273fb0704415628e4c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6508, "upload_time": "2019-03-13T05:07:00", "url": "https://files.pythonhosted.org/packages/27/fa/7084bf8590d5ee3df29254c393906d2355f47754c54b3be172fc5f17da7a/structured_markdown-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ffe8d0dcfc5cea8db32dd65fd2e7da14", "sha256": "bbf9bb6229bc778a9e3a39c57096d980ab5e4ef47baa418fe99854c8976ee5b8" }, "downloads": -1, "filename": "structured_markdown-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ffe8d0dcfc5cea8db32dd65fd2e7da14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7283, "upload_time": "2019-03-13T05:06:57", "url": "https://files.pythonhosted.org/packages/7c/83/78f568726fce6cfcc860eb9ddb6878a7047f99b46c00ebc1ddc1a6902f5e/structured_markdown-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0eaad4f621f59273fb0704415628e4c9", "sha256": "6312c1d69c7c5f92f06965705342e23fbb95fa97ea65c76a2266f9123d7d7644" }, "downloads": -1, "filename": "structured_markdown-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0eaad4f621f59273fb0704415628e4c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6508, "upload_time": "2019-03-13T05:07:00", "url": "https://files.pythonhosted.org/packages/27/fa/7084bf8590d5ee3df29254c393906d2355f47754c54b3be172fc5f17da7a/structured_markdown-0.2.0.tar.gz" } ] }