py_prettier_xethhung12
A powerful CLI tool to format XML, HTML, and JSON with support for multiple input and output sources.
Features
- Format Support: XML, HTML, and JSON
- Input Sources:
- stdin (default)
- File (
-f,--file) - Clipboard (
--from-clip)
- Output Destinations:
- stdout (default)
- Clipboard (
--clip) - File (
-o,--output)
- Unicode Support: Proper UTF-8 handling, especially for Windows environments
Installation
pip install py-prettier-xethhung12
Or install from source:
pip install -e .
Usage
Basic Usage
Format JSON from stdin to stdout:
cat input.json | py-prettier-xethhung12 json
Input Options
From stdin (default):
py-prettier-xethhung12 json < input.json
py-prettier-xethhung12 json --stdin < input.json
From file:
py-prettier-xethhung12 xml -f input.xml
py-prettier-xethhung12 html --file messy.html
From clipboard:
py-prettier-xethhung12 json --from-clip
Output Options
To stdout (default):
py-prettier-xethhung12 json < input.json
py-prettier-xethhung12 json --stdout < input.json
To clipboard:
py-prettier-xethhung12 xml -f input.xml --clip
To file:
py-prettier-xethhung12 json -f messy.json -o formatted.json
py-prettier-xethhung12 html --file input.html --output output.html
Combined Examples
Format file and copy to clipboard:
py-prettier-xethhung12 xml -f input.xml --clip
Format clipboard content and save to file:
py-prettier-xethhung12 json --from-clip -o formatted.json
Re-format clipboard content (clipboard to clipboard):
py-prettier-xethhung12 xml --from-clip --clip
Help
py-prettier-xethhung12 -h
py-prettier-xethhung12 json -h
py-prettier-xethhung12 xml -h
py-prettier-xethhung12 html -h
Running the Application
Through Python module:
python -m py_prettier_xethhung12 -h
Through installed script:
py-prettier-xethhung12 -h
Development
The project requires python 3.11+ and pip for dependency management.
Setup
Install development dependencies:
./install-dependencies.sh
This script installs:
- Dependencies from
dev-requirements.txt(build and deployment tools) - Dependencies from
requirements.txt(runtime dependencies)
Build
./build.sh
Build and Deploy
./build-and-deploy.sh
Scripts
| Name | Type | Description |
|---|---|---|
| install-dependencies.sh | Shell script | Install dev and runtime dependencies |
| build.sh | Shell script | Build the package |
| build-and-deploy.sh | Shell script | Build and deploy the package |
Project Versioning
This project uses the xh-py-project-versioning package for version management.
Update Patch Version (dev):
python -m xh_py_project_versioning --patch
Example: 0.0.1 → 0.0.2-dev+000
Promote Dev to Official Release:
python -m xh_py_project_versioning -r
Example: 0.0.2-dev+000 → 0.0.2
Update Patch Version (direct):
python -m xh_py_project_versioning --patch -d
Example: 0.0.1 → 0.0.2
Update Minor Version (direct):
python -m xh_py_project_versioning --minor -d
Example: 0.0.1 → 0.1.0
Update Major Version (direct):
python -m xh_py_project_versioning --major -d
Example: 0.0.1 → 1.0.0
Dependencies
- j-vault-http-client-xethhung12 (>= 0.1.1) - HTTP client library
- beautifulsoup4 (>= 4.12.0) - HTML/XML parsing
- pyperclip (>= 1.8.2) - Clipboard support
License
GPL-3.0-only
Author
Xeth Hung (admin@xethh.me)
Metadata
Release files for py-prettier-xethhung12 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_prettier_xethhung12-1.0.2.tar.gz | 17.6 kB | Without provenance | Details for py_prettier_xethhung12-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_prettier_xethhung12-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for py_prettier_xethhung12-1.0.2-py3-none-any.whl |
Total release size: 36.6 kB
Release files / py_prettier_xethhung12-1.0.2.tar.gz
| Download URL | py_prettier_xethhung12-1.0.2.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b6e023393fa05a7a9ee26656942c5293837349488dcab068c69fb8dec5c9abe
|
|
BLAKE2b-256 checksum How to use checksums |
edbc81f3629802f38f5886a1986f542f581d2880e40f2b7bf1a81e140b96c66e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / py_prettier_xethhung12-1.0.2-py3-none-any.whl
| Download URL | py_prettier_xethhung12-1.0.2-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bab41a18ac533e0723d97e9c0ecf72c6ac3d198ceb654069a28c17545b5ead9
|
|
BLAKE2b-256 checksum How to use checksums |
4b052868ba1333f8185ebd243e908a299db958240646446c3e0bc17dbf793f92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for py-prettier-xethhung12 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.