{ "info": { "author": "trollodel", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "[*view Italian version*](README_it.md)\n\n# *html*2*py*\n\nhtml2py is a tool for converting an html file in python language and viceversa.\n\n## Features\n\n- create a pythonic html page.\n\n- wrap python code in a function and add imports.\n\n- A command line interface for generating script.\n\n- Also an API for extend functionalities, see module documenation for more details.\n\n## Dependencies\n\n- lxml\n\n- yattag (for running generated scripts)\n\n#### For testing:\n\n- hypothesis\n\n- pytest (or something that fetch test cases in modules)\n\n- xmldiff\n\n## Usage\n\n#### Command line tool\n\n```\nusage: html2py.py [-h] -o OUTPUT [-e | -f | -c] [-s] file\n\nConvert html file to yattag based python script.\n\nparameters:\n file Html file to convert (required).\n -h, --help show this help message and exit\n -o OUTPUT, --output OUTPUT\n Output file. By default in output there is python\n header with imports and a function with code (required).\n -e, --no-head Do not insert header and imports.\n -f, --no-function Do not insert code into function\n -c, --only-code Write only code into output. Do not insert header or\n functions.\n```\n\n#### APIs\n\n(see module documentation for more informations)\n\nHtml2py backend lib is composed with 4 module:\n\n- parser\n\n Parse an input file and transform it into something pythonic.\n Currently it supported html and xml.\n- output\n\n It provides 2 feature:\n - some extensible objects to represent python instructions\n - An extensible interface to write your code\n- yattag\n\n Using parsed data and output module for writing your code.\n- converter\n\n Essentially a connector between cli tool and the other 3 modules.\n\n## TODO\n\n#### Proposing for future:\n\nNow this tool works enough, but it not working in all cases; we need lots of document for testing purposes and for finding unhandled errors.\n\nHtml2py can potentially pythonize also xml documents and xml based documents, but also other types of file, such as json or yaml.\n\nIn addition add supports to other xml tree library and not just lxml (currently supported).\n\n#### Improve test suite:\n\nAt the moment there is a very poor test suite (only a case) and this tool, though there is very small in lines of code, need lots of cases, samples and, why not, a random html generator.\n\n#### Add wiki or website for documentation\n\nDescribe APIs and tools with a structured doc page instead of this readme.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://gitlab.com/trollodel/html2py", "keywords": "yattag generation html2py code_generator tool", "license": "LGPLv2.1", "maintainer": "", "maintainer_email": "", "name": "html2py", "package_url": "https://pypi.org/project/html2py/", "platform": "", "project_url": "https://pypi.org/project/html2py/", "project_urls": { "Homepage": "http://gitlab.com/trollodel/html2py" }, "release_url": "https://pypi.org/project/html2py/1.0.1/", "requires_dist": [ "lxml", "yattag" ], "requires_python": "", "summary": "html2py is a tool for converting an html file in python language and viceversa.", "version": "1.0.1" }, "last_serial": 4363982, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "41ca74ab4c010a8f223d1fe2c7945400", "sha256": "49b79e7b2541da58b582ecb9a268cb3617b7d0f8f1fcf25a51ae46ed1610be3a" }, "downloads": -1, "filename": "html2py-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "41ca74ab4c010a8f223d1fe2c7945400", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9796, "upload_time": "2018-10-11T11:27:16", "url": "https://files.pythonhosted.org/packages/fd/28/839226bcffc891bc295305a483945b3c5325c237a4175762428277c2a2a2/html2py-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df76e85147854132a41f2f4feb439e15", "sha256": "6829ecaf8b3f9db1226d0dea2b691ef3711c4947848b171e0fb4a5399eb98450" }, "downloads": -1, "filename": "html2py-1.0.1.tar.gz", "has_sig": false, "md5_digest": "df76e85147854132a41f2f4feb439e15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6151, "upload_time": "2018-10-11T11:27:17", "url": "https://files.pythonhosted.org/packages/6e/50/6bb5eec37c27eab5f0620ab1af8f18636d1be78197a8e747d649675d5f13/html2py-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "41ca74ab4c010a8f223d1fe2c7945400", "sha256": "49b79e7b2541da58b582ecb9a268cb3617b7d0f8f1fcf25a51ae46ed1610be3a" }, "downloads": -1, "filename": "html2py-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "41ca74ab4c010a8f223d1fe2c7945400", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9796, "upload_time": "2018-10-11T11:27:16", "url": "https://files.pythonhosted.org/packages/fd/28/839226bcffc891bc295305a483945b3c5325c237a4175762428277c2a2a2/html2py-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df76e85147854132a41f2f4feb439e15", "sha256": "6829ecaf8b3f9db1226d0dea2b691ef3711c4947848b171e0fb4a5399eb98450" }, "downloads": -1, "filename": "html2py-1.0.1.tar.gz", "has_sig": false, "md5_digest": "df76e85147854132a41f2f4feb439e15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6151, "upload_time": "2018-10-11T11:27:17", "url": "https://files.pythonhosted.org/packages/6e/50/6bb5eec37c27eab5f0620ab1af8f18636d1be78197a8e747d649675d5f13/html2py-1.0.1.tar.gz" } ] }