Name | html-to-django JSON |
Version |
0.0.2
JSON |
| download |
home_page | None |
Summary | HTML to Django Converter |
upload_time | 2024-05-14 20:39:16 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT License Copyright (c) 2024 Philipp Mayr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
converter
django
html
static html
tool
web development
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# HTML To Django
![tests workflow](https://github.com/truePhilipp/html_to_django/actions/workflows/tests.yml/badge.svg)
![stylecheck workflow](https://github.com/truePhilipp/html_to_django/actions/workflows/stylecheck.yml/badge.svg)
Converts HTML files with special attributes to Django templates.
# Installation
```bash
pip install html-to-django
```
# Usage
```bash
html_to_django [-h] [-r] path
```
`path` can either be a path to a file or a folder. When a file is passed only the file itself will be converted. When a folder is passed, all files ending in .html will be replaced. This searches through the folder recursivley.
Use `-r` to replace the original files, instead of creating new ones.
By default, new ones are created in place next to the existing files, with the extension `.n.html`.
You can also use the `html_to_django_r` command if you are unable to pass the `-r` parameter
(e.g. with the Bootstrap Studio "Export Script" setting).
## Attributes
To add Django template tags to your HTML files, you need to add special attributes to your HTML tags like this:
```html
<div dj-for="user in users">
<p>{{ user.name }}</p>
</div>
```
This will be converted to:
```html
{% for user in users %}
<p>{{ user.name }}</p>
{% endfor %}
```
A complete list of supported attributes can be found [here](docs/Attributes.md).
# Contributing
To learn how to contribute to this project, please see [CONTRIBUTING.md](CONTRIBUTING.md).
Raw data
{
"_id": null,
"home_page": null,
"name": "html-to-django",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "converter, django, html, static html, tool, web development",
"author": null,
"author_email": "Philipp Mayr <philipp@mayr.software>",
"download_url": "https://files.pythonhosted.org/packages/7d/6e/a8bc689681959bc25c78b07225930723b04c2a0303bf74b84953d8b6a0fc/html_to_django-0.0.2.tar.gz",
"platform": null,
"description": "# HTML To Django\n\n![tests workflow](https://github.com/truePhilipp/html_to_django/actions/workflows/tests.yml/badge.svg)\n![stylecheck workflow](https://github.com/truePhilipp/html_to_django/actions/workflows/stylecheck.yml/badge.svg)\n\nConverts HTML files with special attributes to Django templates.\n\n\n# Installation\n```bash\npip install html-to-django\n```\n\n\n# Usage\n```bash\nhtml_to_django [-h] [-r] path\n```\n`path` can either be a path to a file or a folder. When a file is passed only the file itself will be converted. When a folder is passed, all files ending in .html will be replaced. This searches through the folder recursivley.\n\nUse `-r` to replace the original files, instead of creating new ones.\nBy default, new ones are created in place next to the existing files, with the extension `.n.html`.\n\nYou can also use the `html_to_django_r` command if you are unable to pass the `-r` parameter\n(e.g. with the Bootstrap Studio \"Export Script\" setting).\n\n## Attributes\nTo add Django template tags to your HTML files, you need to add special attributes to your HTML tags like this:\n```html\n<div dj-for=\"user in users\">\n <p>{{ user.name }}</p>\n</div>\n```\nThis will be converted to:\n```html\n{% for user in users %}\n<p>{{ user.name }}</p>\n{% endfor %}\n```\n\nA complete list of supported attributes can be found [here](docs/Attributes.md).\n\n\n# Contributing\nTo learn how to contribute to this project, please see [CONTRIBUTING.md](CONTRIBUTING.md).\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Philipp Mayr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "HTML to Django Converter",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/truePhilipp/html_to_django",
"Issues": "https://github.com/truePhilipp/html_to_django/issues"
},
"split_keywords": [
"converter",
" django",
" html",
" static html",
" tool",
" web development"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4db52fbedeca7e147694ba3aadeab558516c29993345f36feeb8092be156134a",
"md5": "22079d1dad2a0f8ba5dc02588f521589",
"sha256": "4a6ca1092935574bed5c566272e1dc6e914291747e00a1c3d33e1f548aab17e9"
},
"downloads": -1,
"filename": "html_to_django-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "22079d1dad2a0f8ba5dc02588f521589",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 18188,
"upload_time": "2024-05-14T20:39:14",
"upload_time_iso_8601": "2024-05-14T20:39:14.694750Z",
"url": "https://files.pythonhosted.org/packages/4d/b5/2fbedeca7e147694ba3aadeab558516c29993345f36feeb8092be156134a/html_to_django-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7d6ea8bc689681959bc25c78b07225930723b04c2a0303bf74b84953d8b6a0fc",
"md5": "5327734bca6782c28cffe50b09fb3b96",
"sha256": "de0275c6aab8afb050cf75750c1e63957f0d767f380cc08883d5819c76b4c6a7"
},
"downloads": -1,
"filename": "html_to_django-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "5327734bca6782c28cffe50b09fb3b96",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 20082,
"upload_time": "2024-05-14T20:39:16",
"upload_time_iso_8601": "2024-05-14T20:39:16.754765Z",
"url": "https://files.pythonhosted.org/packages/7d/6e/a8bc689681959bc25c78b07225930723b04c2a0303bf74b84953d8b6a0fc/html_to_django-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-14 20:39:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "truePhilipp",
"github_project": "html_to_django",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "html-to-django"
}