{ "info": { "author": "Sandeep.C.R", "author_email": "sandeepcr2@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "===============================================================================================\nDangler - A Python script to expand hamlet templates file (Html without closing tags) into html \n===============================================================================================\n\nThe problem -\n=============\n\nWriting HTML can be a pain if you are doing it by hand. Things can be considerable improved if\nyou can write Html in python style, using indentation instead closing tags to delimit blocks\nThis is something that is shamelessly copied from Haskell's hamlet templates.\n\nHow to use -\n============\n\n::\n\n \n \n \n
\n Here is some content\n \nwill be expanded to\n\n::\n\n \n \n \n
\n Here is some content\n
\n \n \n\nA special case -\n================\n\nSuppose you want to create this html structure\n\n::\n\n \n \n
\n Here is some content\n \n content inside span\n \n More content\n
\n \n \n\nIf you attempt to make this using Dangler,\n\n::\n\n \n \n
\n Here is some content\n \n content inside span\n more content\n\nThis will not work. The last line, 'more content' will \nnot get added to the content inside the span. Instead it will\nget added to the parent div because it's indentation matches the \nchild elements of the div rather than the span. To add content that does not care about\nindentation, put a line with \"\"\" only. This will start the 'gather mode'\nWhich gathers all lines that follow until another \"\"\", all by itself in a line\nThe indentation for the content collected in the gather mode, is taken from the\nvery first line after the first \"\"\" is seen. So for our example, we can do something\nlike this\n\n::\n\n \n \n
\n Here is some content\n \n \"\"\"\n content inside span\n more content\n \"\"\"\n\nIf you want to have a line with \"\"\" only, just escape it with a backslash.\n\nUsing with other template systems -\n===================================\n\nDangler does not do Html parsing. It just arranges the contents of a text file\ninto a set of nested blocks. Things like closing the tags is done by extensions\nthat process these nested blocks. Right now, Dangler has two extensions enabled\nby default that will work for Html and for Jinja2 files.\n\nIf you run Dangler on this text,\n\n\n::\n\n \n \n
\n Here is some content\n \n content inside span\n more content\n {% if something %}\n
\n do this\n {% elif %}\n
\n do that\n {% if otherthing %}\n \n so and so\n {% set a = f %}\n {% if not something %}\n {% set nav %}\n
\n something here\n {% for a = b %}\n
\n
\n do a\n {% elif other thing%}\n \n \n
\n do other thing\n {% elif other someting %}\n

\n dont do anything!\n {% else %}\n \n get something from user\n \n {% else %}\n

\n do something even nicer!\n\n\n\nIt will be expanded to\n\n::\n\n \n \n

\n Here is some content\n \n content inside span\n \n more content\n {% if something %}\n
\n do this\n
\n {% elif %}\n
\n do that\n
\n {% if otherthing %}\n \n so and so\n \n {% set a = f %}\n {% if not something %}\n {% set nav %}\n
\n something here\n
\n {% endset %}\n {% for a = b %}\n
\n
\n do a\n
\n
\n {% endfor %}\n {% elif other thing%}\n \n \n \n \n
\n do other thing\n
\n {% elif other someting %}\n

\n dont do anything!\n

\n {% endif %}\n {% else %}\n \n get something from user\n \n \n {% endif %}\n {% else %}\n

\n do something even nicer!\n

\n {% endif %}\n
\n \n \n\n\nJinja2 support might \nbe missing some tags. If you find one please post an issue or pull request.\n\n\nUsage -\n=======\ndangler path/to/file/with/unclosed/tags.html\n\nThis will print out html, with tags closed and beautified.\n\n\nHave fun!\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/sras/dangler", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "Dangler", "package_url": "https://pypi.org/project/Dangler/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Dangler/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/sras/dangler" }, "release_url": "https://pypi.org/project/Dangler/0.3/", "requires_dist": null, "requires_python": null, "summary": "A python script to convert html written with un-closed tags (like Hamlet templates) to html with closed tags.", "version": "0.3" }, "last_serial": 1718865, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "648364872a56a1ce1edd904fc89b2e5e", "sha256": "3abddc3e36db3fdb70fe9a7c78fdc11d4ce8f7eb9aa3ed9d0e05cdfad669ff7e" }, "downloads": -1, "filename": "Dangler-0.1.zip", "has_sig": false, "md5_digest": "648364872a56a1ce1edd904fc89b2e5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5384, "upload_time": "2015-09-09T07:44:29", "url": "https://files.pythonhosted.org/packages/34/ed/daac7bc5a5749302caf93dad96e6399aff3d78f9d54cc47a39afb809dcca/Dangler-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "59766b6105152b04b034e93fd020d092", "sha256": "fd10a62d706892132b18c49d9c4d2cbbda88d6681920751518543f42a96c2ec3" }, "downloads": -1, "filename": "Dangler-0.2.zip", "has_sig": false, "md5_digest": "59766b6105152b04b034e93fd020d092", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6205, "upload_time": "2015-09-09T14:21:41", "url": "https://files.pythonhosted.org/packages/89/1d/809adfdea726d20e24ec10825044730f66ad28e1cea86c5ef5d43ff81e50/Dangler-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "211ca295bdaa8728ebae7427dcdd1a6c", "sha256": "f559c557c3db4093b2b6617263e932049411f0b54adc0484d4faeeb0a8bbbe66" }, "downloads": -1, "filename": "Dangler-0.3.zip", "has_sig": false, "md5_digest": "211ca295bdaa8728ebae7427dcdd1a6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6002, "upload_time": "2015-09-11T13:18:50", "url": "https://files.pythonhosted.org/packages/03/8c/51f3b2d55925216ab059016b99bf91d5254c1a4dc15580589587d13bd2a7/Dangler-0.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "211ca295bdaa8728ebae7427dcdd1a6c", "sha256": "f559c557c3db4093b2b6617263e932049411f0b54adc0484d4faeeb0a8bbbe66" }, "downloads": -1, "filename": "Dangler-0.3.zip", "has_sig": false, "md5_digest": "211ca295bdaa8728ebae7427dcdd1a6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6002, "upload_time": "2015-09-11T13:18:50", "url": "https://files.pythonhosted.org/packages/03/8c/51f3b2d55925216ab059016b99bf91d5254c1a4dc15580589587d13bd2a7/Dangler-0.3.zip" } ] }