Utility for converting HTML to Air Tags
- PyPI package: https://pypi.org/project/air-convert/
- Free software: MIT License
- Documentation: https://github.com/feldroy/air_convert
Pip:
pip install air-covert
UV:
uv add air-covert
air-convert local/path/to/my/page.html
When combined with curl or wget:
curl -o page.html https://example.com && air-convert page.html
wget -O page.html https://example.com && air-convert page.html
from air_convert import html_to_airtags
html_to_airtags("""
<main>
<article class="prose">
<h1>Hello, world</h1>
<p>Let's soar into the air!</p>
</article>
</main>
""")
Generates:
air.Main(
air.Article(
air.H1("Hello, world"),
air.P("Let\'s soar into the air!"),
class_="prose"
)
)
- This package was created with the awesome Cookiecutter and the audreyfeldroy/cookiecutter-pypackage project template.
- Uses the elegant Typer framework to provide a CLI interface
- Relies on BeautifulSoup4 for parsing of HTML
- Formatting of generated code provided by Ruff