Skip to content

About

Utility for converting HTML to Air Tags

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

air-convert

PyPI version

Utility for converting HTML to Air Tags

Installation

Pip:

pip install air-covert

UV:

uv add air-covert

Usage from the command line

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

Programmatic usage

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"
    )
)

Credits

  • 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

About

Utility for converting HTML to Air Tags

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages