{ "info": { "author": "Lain Supe (lainproliant)", "author_email": "lainproliant@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "About Indenti\n==================\n\nIndenti is a Python package with tools that make string building,\nwriting indented text, and generating markup easier and prettier.\n\nIndenti contains the following modules:\n\n- IndentWriter\n- XmlWriter\n- StringBuilder\n\nInstallation\n------------\n\nInstallation is simple. With python3-pip, do the following:\n\n$ sudo pip install -e .\n\nAbout IndentWriter\n==================\n\nIndentWriter is a module that simplifies the task of indenting output.\nIt keeps track of indent levels and provides a pythonic way of\nincrementing and decrementing the indent level using the optional 'with'\nsyntax. By default, IndentWriter writes to sys.stdout, but can be told\nto write to any other File object at construction.\n\nExample Usage, IndentWriter(using 'with'):\n\n::\n\n from indenti import IndentWriter\n\n iw = IndentWriter()\n\n iw('def hello():')\n with iw:\n iw('print \"Hello!\"')\n\nExample Usage, IndentWriter(without 'with'):\n\n::\n\n from indenti import IndentWriter\n\n iw = IndentWriter()\n iw('def hello():')\n iw.indent()\n iw('print \"Hello!\"')\n\nExample Usage, IndentStringBuilder:\n\n::\n\n from indenti import IndentStringBuilder\n\n sb = IndentStringBuilder()\n\n sb('def hello():')\n with sb:\n sb('print \"Hello!\"')\n\n print str(sb)\n\nAbout XmlFactory\n================\n\nVia XmlFactory, any node name can be specified as an attribute, which\nreturns a functor to create a new node.\n\nExample Usage, XmlWriter(A CherryPy HTML Servlet):\n\n::\n\n import cherrypy\n from indenti import XmlFactory\n\n class HelloWorld:\n def index(self):\n xf = XmlFactory()\n\n xml = xf.html(\n xf.head(\n xf.title(\"Hello, world!\")),\n xf.body(\n xf.h1(\"Hello, CherryPy!\", style='color: red; font-size: 20px')))\n \n return str(xml)\n\n index.exposed = True\n\nNOTE:\n~~~~~\n\nThe word 'class' is a python keyword, so we can't use it as a keyword\nargument to create an attribute name. In this case, we pass a\ndictionary, which is interpreted as a map of attributes for the node.\nYou can always do this instead of using keyword arguments, if this is\nyour preference.\n\nExample Usage, XmlWriter(Using attributes/nodes that conflict with\npython keywords):\n\n::\n\n import cherrypy\n from indenti import XmlFactory\n\n class HelloWorld:\n def index(self):\n xf = XmlFactory()\n\n xml = xf.html(\n xf.head(\n xf.title(\"Hello, world!\")),\n xf.body(\n xf.h1(\"Hello, CherryPy!\", {'class': 'header')))\n \n return str(xml)\n\n index.exposed = True\n\nChange Log\n----------\n\nVersion 1.4: April 22nd, 2017\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n- Make XmlFactory callable, allowing tags with dashes, e.g. xf('my-dash-tag')()\n\nVersion 1.2: November 1st, 2016\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n- Make parents respect the NOINDENT status of their children in HTML mode.\n\nVersion 1.1: October 18th, 2016\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n- Added support for unindented blocks in HTML mode (for textarea)\n- Fixed escaping of XML attributes", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lainproliant/indent-tools", "keywords": "indent text formatting xml html", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "indenti", "package_url": "https://pypi.org/project/indenti/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/indenti/", "project_urls": { "Homepage": "https://github.com/lainproliant/indent-tools" }, "release_url": "https://pypi.org/project/indenti/1.4/", "requires_dist": null, "requires_python": "", "summary": "Tools for building strings, XML/HTML markup, and other indented text.", "version": "1.4" }, "last_serial": 2822216, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "b24cecff27373668d938dc9fe2fe9201", "sha256": "c1db5844368ea7c980392bf037320d5ec2d6ccad01924d243073c5231076c1b3" }, "downloads": -1, "filename": "indenti-1.0.tar.gz", "has_sig": true, "md5_digest": "b24cecff27373668d938dc9fe2fe9201", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6908, "upload_time": "2016-09-02T06:10:27", "url": "https://files.pythonhosted.org/packages/16/93/85b3b3e3430e3a133a9bccb3f5f77932c5219133a9d85caf74375c64f959/indenti-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "f80d6be7311b049326da6f70abc73335", "sha256": "33663cf5c871dd346bffed8faf1da6272f16ddf164af9912d1697bfee5a35d9e" }, "downloads": -1, "filename": "indenti-1.1.tar.gz", "has_sig": false, "md5_digest": "f80d6be7311b049326da6f70abc73335", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7187, "upload_time": "2016-10-18T09:04:30", "url": "https://files.pythonhosted.org/packages/a9/07/71dab2a12a536beb3e2c51f47bf8a1d7e0cd677fb71500db9195abf63276/indenti-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "546f132bb0cec8b83e27621894c6886c", "sha256": "f78c941b6bd1f41dd1def377fc9cb7552964975f5b7de64035f13864d684c2b7" }, "downloads": -1, "filename": "indenti-1.2.tar.gz", "has_sig": false, "md5_digest": "546f132bb0cec8b83e27621894c6886c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7298, "upload_time": "2016-11-02T06:24:33", "url": "https://files.pythonhosted.org/packages/ff/9b/41ca021f2a757d6380ab59138fdc15434d4b65fc81d4138e70a0d8adeb4a/indenti-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "931c837ad5b2f30f78a5c6aeae789d82", "sha256": "ac560c1d81a72358819a2a55238ec8a1ae5ab2c792cd8a5d1c1bac647b0abcb5" }, "downloads": -1, "filename": "indenti-1.2.1.tar.gz", "has_sig": false, "md5_digest": "931c837ad5b2f30f78a5c6aeae789d82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7302, "upload_time": "2016-11-02T06:30:48", "url": "https://files.pythonhosted.org/packages/c2/34/36c5f41c66a0133535feebca950e9662fe5f973907e85232ff9eeca3d720/indenti-1.2.1.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "49a4b37ad0de88dfec45afc000a7f2eb", "sha256": "8d57c54322ce3f1fcfde376cceaafe71e77768d01efaf4199227302c6956c971" }, "downloads": -1, "filename": "indenti-1.3.tar.gz", "has_sig": false, "md5_digest": "49a4b37ad0de88dfec45afc000a7f2eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7298, "upload_time": "2016-11-02T06:32:57", "url": "https://files.pythonhosted.org/packages/13/df/082f56899b27e0fafc8db83167a7bc11e78b7e48a0dc0925d2b1427c2d39/indenti-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "1f3d68f5d9b79ad344bb37c4c49f3230", "sha256": "1099254a592ae685bcb91cab93b8356df73d1533272229e507e60b3d34c566ed" }, "downloads": -1, "filename": "indenti-1.4.tar.gz", "has_sig": false, "md5_digest": "1f3d68f5d9b79ad344bb37c4c49f3230", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7333, "upload_time": "2017-04-22T18:26:48", "url": "https://files.pythonhosted.org/packages/fb/b8/4155e1af854a93e37006b0f955b116127fdad12cce1fc67b781ef5b1d24d/indenti-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f3d68f5d9b79ad344bb37c4c49f3230", "sha256": "1099254a592ae685bcb91cab93b8356df73d1533272229e507e60b3d34c566ed" }, "downloads": -1, "filename": "indenti-1.4.tar.gz", "has_sig": false, "md5_digest": "1f3d68f5d9b79ad344bb37c4c49f3230", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7333, "upload_time": "2017-04-22T18:26:48", "url": "https://files.pythonhosted.org/packages/fb/b8/4155e1af854a93e37006b0f955b116127fdad12cce1fc67b781ef5b1d24d/indenti-1.4.tar.gz" } ] }