[![Build Status](https://travis-ci.org/volfpeter/markyp-html.svg?branch=master)](https://travis-ci.org/volfpeter/markyp-html)
[![Downloads](https://pepy.tech/badge/markyp-html)](https://pepy.tech/project/markyp-html)
[![Downloads](https://pepy.tech/badge/markyp-html/month)](https://pepy.tech/project/markyp-html/month)
[![Downloads](https://pepy.tech/badge/markyp-html/week)](https://pepy.tech/project/markyp-html/week)
# markyp-html
[markyp](https://github.com/volfpeter/markyp)-based HTML implementations.
## Installation
The project is listed on the Python Package Index, it can be installed simply by executing `pip install markyp-html`.
## Getting started
If you are not familiar with the basic concepts of `markyp`, please start by having a look at its documentation [here](https://github.com/volfpeter/markyp).
The following very short example creates the most basic Hello World webpage. As you can see, all it takes is a single `webpage()` call and string conversion.
```Python
from markyp_html import webpage
page = webpage("Hello World!", page_title="Hello World")
# Get the actual HTML markup.
html = str(page) # or page.markup
print(html)
```
Here is a slightly more sophisticated Hello World example, that contains all kinds of metadata, some CSS, and a couple of simple text elements:
```Python
from markyp_html import meta, style, webpage
from markyp_html.text import h1, p
from markyp_html.inline import strong
page = webpage(
h1("markyp-html"),
strong(p("Hello World!")),
p("This page was generated using Python and markyp-html."),
page_title="markyp-html demo page",
head_elements=[style("h1 {color:red;}\np {color:blue;}")],
metadata=[
meta.author("Website Author"),
meta.charset("UTF-8"),
meta.description("markyp-html demo"),
meta.keywords("markyp-html,markup,Python,HTML"),
meta.viewport("width=device-width, initial-scale=1.0")
]
)
# Get the actual HTML markup.
html = str(page) # or page.markup
print(html)
```
## `markyp-html` extensions
`markyp-html` is built on [markyp](https://github.com/volfpeter/markyp). In general, extensions follow the `markyp-{domain-or-extension-name}` naming convention.
Here is a list of extensions built on top of `markyp-html`:
- `markyp-bootstrap4`: Bootstrap 4 implementation at https://github.com/volfpeter/markyp-bootstrap4, contribution is welcome.
- `markyp-fontawesome`: Font Awesome icons for `markyp-html`-based web pages at https://github.com/volfpeter/markyp-fontawesome, contribution is welcome.
- `markyp-highlightjs`: Code highlighting in HTML using `highlight.js` at https://github.com/volfpeter/markyp-highlightjs, contribution is welcome.
If you have created an open source `markyp-html` extension, please let us know and we will include your project in this list.
## Community guidelines
In general, please treat each other with respect and follow the below guidelines to interact with the project:
- _Questions, feedback_: Open an issue with a `[Question] <issue-title>` title.
- _Bug reports_: Open an issue with a `[Bug] <issue-title>` title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.
- _Feature requests and ideas_: Open an issue with an `[Enhancement] <issue-title>` title and a clear description of the enhancement proposal.
## Contribution guidelines
Every form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.
Please follow these guidelines to contribute to the project:
- Make sure your changes match the documentation and coding style of the project, including [PEP 484](https://www.python.org/dev/peps/pep-0484/) type annotations.
- `mypy` is used to type-check the codebase, submitted code should not produce typing errors. See [this page](http://mypy-lang.org/) for more information on `mypy`.
- _Small_ fixes can be submitted simply by creating a pull request.
- Non-trivial changes should have an associated [issue](#community-guidelines) in the issue tracker that commits must reference (typically by adding `#refs <issue-id>` to the end of commit messages).
- Please write [tests](#testing) for the changes you make (if applicable).
If you have any questions about contributing to the project, please contact the project owner.
As mentioned in the [contribution guidelines](#contribution-guidelines), the project is type-checked using `mypy`, so first of all, the project must pass `mypy`'s static code analysis.
The project is tested using `pytest`. The chosen test layout is that tests are outside the application code, see [this page](https://docs.pytest.org/en/latest/goodpractices.html#tests-outside-application-code) for details on what it means in practice.
If `pytest` is installed, the test set can be executed using the `pytest test` command from within the project directory.
If `pytest-cov` is also installed, a test coverage report can be generated by executing `pytest test --cov markyp_html` from the root directory of the project.
## License - MIT
The library is open-sourced under the conditions of the MIT [license](https://choosealicense.com/licenses/mit/).
Raw data
{
"_id": null,
"home_page": "https://github.com/volfpeter/markyp-html",
"name": "markyp-html",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "html markup generator utility",
"author": "Peter Volf",
"author_email": "do.volfp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/79/65/736ee94864550eeb914c26dc3b4d6eea12201e7d34a7c9db060dee2a124f/markyp-html-0.2306.2.tar.gz",
"platform": null,
"description": "[![Build Status](https://travis-ci.org/volfpeter/markyp-html.svg?branch=master)](https://travis-ci.org/volfpeter/markyp-html)\n[![Downloads](https://pepy.tech/badge/markyp-html)](https://pepy.tech/project/markyp-html)\n[![Downloads](https://pepy.tech/badge/markyp-html/month)](https://pepy.tech/project/markyp-html/month)\n[![Downloads](https://pepy.tech/badge/markyp-html/week)](https://pepy.tech/project/markyp-html/week)\n\n# markyp-html\n\n[markyp](https://github.com/volfpeter/markyp)-based HTML implementations.\n\n## Installation\n\nThe project is listed on the Python Package Index, it can be installed simply by executing `pip install markyp-html`.\n\n## Getting started\n\nIf you are not familiar with the basic concepts of `markyp`, please start by having a look at its documentation [here](https://github.com/volfpeter/markyp).\n\nThe following very short example creates the most basic Hello World webpage. As you can see, all it takes is a single `webpage()` call and string conversion.\n\n```Python\nfrom markyp_html import webpage\npage = webpage(\"Hello World!\", page_title=\"Hello World\")\n\n# Get the actual HTML markup.\nhtml = str(page) # or page.markup\nprint(html)\n```\n\nHere is a slightly more sophisticated Hello World example, that contains all kinds of metadata, some CSS, and a couple of simple text elements:\n\n```Python\nfrom markyp_html import meta, style, webpage\nfrom markyp_html.text import h1, p\nfrom markyp_html.inline import strong\n\npage = webpage(\n h1(\"markyp-html\"),\n strong(p(\"Hello World!\")),\n p(\"This page was generated using Python and markyp-html.\"),\n page_title=\"markyp-html demo page\",\n head_elements=[style(\"h1 {color:red;}\\np {color:blue;}\")],\n metadata=[\n meta.author(\"Website Author\"),\n meta.charset(\"UTF-8\"),\n meta.description(\"markyp-html demo\"),\n meta.keywords(\"markyp-html,markup,Python,HTML\"),\n meta.viewport(\"width=device-width, initial-scale=1.0\")\n ]\n)\n\n# Get the actual HTML markup.\nhtml = str(page) # or page.markup\nprint(html)\n```\n\n## `markyp-html` extensions\n\n`markyp-html` is built on [markyp](https://github.com/volfpeter/markyp). In general, extensions follow the `markyp-{domain-or-extension-name}` naming convention.\n\nHere is a list of extensions built on top of `markyp-html`:\n\n- `markyp-bootstrap4`: Bootstrap 4 implementation at https://github.com/volfpeter/markyp-bootstrap4, contribution is welcome.\n- `markyp-fontawesome`: Font Awesome icons for `markyp-html`-based web pages at https://github.com/volfpeter/markyp-fontawesome, contribution is welcome.\n- `markyp-highlightjs`: Code highlighting in HTML using `highlight.js` at https://github.com/volfpeter/markyp-highlightjs, contribution is welcome.\n\nIf you have created an open source `markyp-html` extension, please let us know and we will include your project in this list.\n\n## Community guidelines\n\nIn general, please treat each other with respect and follow the below guidelines to interact with the project:\n\n- _Questions, feedback_: Open an issue with a `[Question] <issue-title>` title.\n- _Bug reports_: Open an issue with a `[Bug] <issue-title>` title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.\n- _Feature requests and ideas_: Open an issue with an `[Enhancement] <issue-title>` title and a clear description of the enhancement proposal.\n\n## Contribution guidelines\n\nEvery form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.\n\nPlease follow these guidelines to contribute to the project:\n\n- Make sure your changes match the documentation and coding style of the project, including [PEP 484](https://www.python.org/dev/peps/pep-0484/) type annotations.\n- `mypy` is used to type-check the codebase, submitted code should not produce typing errors. See [this page](http://mypy-lang.org/) for more information on `mypy`.\n- _Small_ fixes can be submitted simply by creating a pull request.\n- Non-trivial changes should have an associated [issue](#community-guidelines) in the issue tracker that commits must reference (typically by adding `#refs <issue-id>` to the end of commit messages).\n- Please write [tests](#testing) for the changes you make (if applicable).\n\nIf you have any questions about contributing to the project, please contact the project owner.\n\nAs mentioned in the [contribution guidelines](#contribution-guidelines), the project is type-checked using `mypy`, so first of all, the project must pass `mypy`'s static code analysis.\n\nThe project is tested using `pytest`. The chosen test layout is that tests are outside the application code, see [this page](https://docs.pytest.org/en/latest/goodpractices.html#tests-outside-application-code) for details on what it means in practice.\n\nIf `pytest` is installed, the test set can be executed using the `pytest test` command from within the project directory.\n\nIf `pytest-cov` is also installed, a test coverage report can be generated by executing `pytest test --cov markyp_html` from the root directory of the project.\n\n## License - MIT\n\nThe library is open-sourced under the conditions of the MIT [license](https://choosealicense.com/licenses/mit/).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "HTML element implementations based on markyp.",
"version": "0.2306.2",
"project_urls": {
"Homepage": "https://github.com/volfpeter/markyp-html"
},
"split_keywords": [
"html",
"markup",
"generator",
"utility"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "738b6ae34f00032263d524f4e71bb3810a5c431d37b029af7f0796c1200efc0a",
"md5": "5993e8ed3339acaf784f2483a12ffc31",
"sha256": "dc1f1336dd56212dcee7af3c71b4dee872681d9032f840c877ce4108568861f9"
},
"downloads": -1,
"filename": "markyp_html-0.2306.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5993e8ed3339acaf784f2483a12ffc31",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 12753,
"upload_time": "2023-06-20T12:31:30",
"upload_time_iso_8601": "2023-06-20T12:31:30.744404Z",
"url": "https://files.pythonhosted.org/packages/73/8b/6ae34f00032263d524f4e71bb3810a5c431d37b029af7f0796c1200efc0a/markyp_html-0.2306.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7965736ee94864550eeb914c26dc3b4d6eea12201e7d34a7c9db060dee2a124f",
"md5": "28b6d42d4a8c559962ec2f5afe8540eb",
"sha256": "64cc745a0edba677379ccc4567ecab5d16c2d2bdb317f00f465285231b8228ef"
},
"downloads": -1,
"filename": "markyp-html-0.2306.2.tar.gz",
"has_sig": false,
"md5_digest": "28b6d42d4a8c559962ec2f5afe8540eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 17530,
"upload_time": "2023-06-20T12:31:32",
"upload_time_iso_8601": "2023-06-20T12:31:32.305052Z",
"url": "https://files.pythonhosted.org/packages/79/65/736ee94864550eeb914c26dc3b4d6eea12201e7d34a7c9db060dee2a124f/markyp-html-0.2306.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-20 12:31:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "volfpeter",
"github_project": "markyp-html",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "markyp-html"
}