Skip to main content

Convert HTML to compliant haitch code.

Project description

builds.sr.ht status REUSE status PyPI - Version

haitchify

Convert HTML into compliant haitch code.

Quickstart

The easiest way to use this tool is with pipx (or the uvx variant).

$ pipx install haitchify

Now that the package is installed, you can call the haitchify program.

There are two ways to use it:

  • provide a file path argument.
  • pass in HTML content via standard input.

When program is called with no arguments, you will be presented with a prompt where you can type in some HTML. When you are done, type <C-d> to exit. However, the more common approach would be to use the pipe operator to pass in the input:

$ echo "<h1>Hello, world</h1>" | haitchify

Which outputs to:

H.h1("Hello, world")

You can also optionally add the --prepend flag which will also add an import to the haitch library to the top of the output.

Demo

asciicast

License

haitchify is distributed under the terms of the AGPLv3 license and adheres to the REUSE Specification.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haitchify-1.0.1.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

haitchify-1.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file haitchify-1.0.1.tar.gz.

File metadata

  • Download URL: haitchify-1.0.1.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1

File hashes

Hashes for haitchify-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5b5b6af7bbbadeb82469de2320c205ad5247744144915d0d7cb18acf23099104
MD5 37fdddc747304596a0568497511acedc
BLAKE2b-256 b66ac3f7c8e72ed9701a1d732932e832880e75e52d8731b3d97befd074837b13

See more details on using hashes here.

File details

Details for the file haitchify-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: haitchify-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1

File hashes

Hashes for haitchify-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd16c5600786452156a9437cf83f057c89f0bca5a291ba0d8b346bd5b80a1d2c
MD5 747f628366b2d00c027105fe44f75310
BLAKE2b-256 d432eb728b45c58414c0bdcfbe67a6746b58faff98c0ef86c898a2025c5dd9ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page