Skip to main content

Utilities for directory readme generation, file management, renaming, and docx to pdf conversion.

Project description

hsutools

Utilities for generating folder README trees, categorizing files, batch renaming, and converting docx to pdf. The project now uses a standard src/hsutools package layout, Typer for the CLI, and Poetry for dependency management.

Install

With Poetry (local dev)

pip install poetry
poetry install
poetry run hsu --help

From PyPI (after release)

pip install hsutools
hsu --help

With pipx from the repo

pipx install .
hsu --help

CLI usage

  • hsu cpath --path <dir> [--max-depth 3] [--ignore name ...]
  • hsu filem --path <dir> --mode {date|prefix|suffix} [--prefix PREFIX]
  • hsu rename --path <dir> --find old --replace new [--include-dirs]
  • hsu topdf --path <dir> [--ignore name ...]
  • hsu resize --path <dir> [--width 1920] [--height ...] [--format webp] [--recursive]
  • hsu --lang zh --help 切換繁體說明;亦可用環境變數 HSU_LANG=zh 做預設
  • hsu build-exe [--extra-arg "--onefile"] (requires pyinstaller in the Poetry dev group)

Development

  • Run tests: poetry run pytest
  • Build artifacts: poetry build
  • Optional exe: poetry run hsu build-exe
  • Release: tag v*.*.* and GitHub Actions will build wheel/sdist, publish to PyPI (requires PYPI_API_TOKEN secret), and attach artifacts (wheel/sdist + Windows exe) to the GitHub Release.

Project structure

hsutools/
├── pyproject.toml
├── src/hsutools/
│   ├── cli.py
│   ├── config.py
│   ├── utils.py
│   └── core/
│       ├── create_path.py
│       ├── docx_to_pdf.py
│       ├── file_manage.py
│       └── file_renamer.py
└── tests/
	└── test_cli.py

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

hsutools-1.1.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

hsutools-1.1.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file hsutools-1.1.1.tar.gz.

File metadata

  • Download URL: hsutools-1.1.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hsutools-1.1.1.tar.gz
Algorithm Hash digest
SHA256 0b5ba8209bcc12e6e4f399249d50db14e537d9715c87d9cbc4b556992ecbcc59
MD5 73fd25dc359ea9d22553e0dac0e17e04
BLAKE2b-256 0c1a9be60236f37b9b26cb278519f0ab28b38b7eb3ffc4b7ea77d2148412a571

See more details on using hashes here.

File details

Details for the file hsutools-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: hsutools-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hsutools-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c270fa33f920284f41e75a10663b9a8b9f1ea570fba35babc91fcd0612c7a97
MD5 d1469ecb378c3f67cc15b00bbdfed2e0
BLAKE2b-256 9d5c41de80aeb14bb8f16a90f4f604cc631bc06044f31f35a38772264e5cb79b

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