Skip to main content

CLI utilities for quiht: generate .quiht.json manifests and build .quiht.zip packages from Qt .ui source trees.

Project description

quiht-tools

CLI utilities for quiht, the Qt .ui → HTML renderer. quiht-tools generates .quiht.json manifests from Qt source trees and packs everything into a single, portable .quiht.zip.

Install

pip install quiht-tools
# or, for a one-off run without installing:
uvx quiht-tools --help

Requires Python 3.10+. The only runtime dependency is fire.

The .quiht.zip format

A .quiht.zip is a standard ZIP archive whose root contains:

.quiht.json        # the manifest
ui/                # all .ui files
resources/         # all resource files (PNG icons, etc.)
translations.json  # optional

The manifest's ui and resources values are paths relative to the archive root, so a .quiht.zip is a self-contained, all-in-one package that a quiht viewer can load directly.

Commands

The console script is quiht.

gen (alias jsongen) — build a bundle + manifest

Scan a Qt source tree, copy referenced .ui files and their resources into a bundle directory, and write .quiht.json.

quiht gen <src_dir> <dest_dir> \
    --url_prefix "https://example.com/ui/" \
    --ui_files "ui/dialog.ui,forms/welcome.ui"
  • --ui_files accepts a comma-separated list (paths relative to src_dir, or bare filenames). Omit it to auto-discover every .ui under src_dir.
  • --url_prefix is written into the manifest's prefix field (optional).
  • --resource_remap lets you supply dataset-specific filename fixups; nothing is hardcoded.

pack — create a .quiht.zip

From an existing bundle directory (one that already contains .quiht.json):

quiht pack ./example --output mybundle.quiht.zip

Or directly from a Qt source tree (runs gen into a temp dir first):

quiht pack <src_dir> --from_src --name mybundle --ui_files "a.ui,b.ui"

Defaults to <bundle-name>.quiht.zip in the current directory.

unpack — extract a .quiht.zip

quiht unpack mybundle.quiht.zip ./out

version

quiht version

Library use

from quiht_tools import generate, pack, unpack

generate("src/qt", "build/bundle")
pack("build/bundle", output="bundle.quiht.zip")
unpack("bundle.quiht.zip", "build/extracted")

Development

cd quiht-tools
uv run --with fire --with pytest python -m pytest -x

Versioning is driven by git tags via hatch-vcs; src/quiht_tools/__version__.py is generated at build time and is git-ignored.

License

Apache-2.0.

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

quiht_tools-1.0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

quiht_tools-1.0.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file quiht_tools-1.0.2.tar.gz.

File metadata

  • Download URL: quiht_tools-1.0.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for quiht_tools-1.0.2.tar.gz
Algorithm Hash digest
SHA256 67c9472a31cb0eaf5e3e08e5f23426ab6b28c41f9dc57e92ab1d9583a151bc76
MD5 14477ca8b9b11eb93e947508bf362b0e
BLAKE2b-256 30b18fc93c6334575784f3d683392e6c1781f194e7eb26b061b25686edc0b54d

See more details on using hashes here.

File details

Details for the file quiht_tools-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: quiht_tools-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for quiht_tools-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d112938cc55948e0866026945f96f538faa0d53b108bfdbc1cef3aba9ebfaf39
MD5 33f74467ad61a04d8f7a8fa95f70499d
BLAKE2b-256 9110331b74fcba42dec8b862f7ce0444c0ea4087d18d4a26e24268f3cddad300

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