Skip to main content

Collection of handy utils written in Python 3

Project description

chaos-box

Collection of handy utils written in Python 3

install

推荐使用 pipx 安装本项目,

# install from PyPI
pipx install chaos-box --system-site-packages

# install from Test PyPI
pipx install chaos-box \
    --system-site-packages \
    --index-url https://test.pypi.org/simple/ \
    --pip-args "--extra-index-url https://pypi.org/simple/"

对于 Debian 系统而言, 由于 deb-extract 工具用到了 python3-debian 这个 package, 而 python3-debian 并没有上传到 PyPI 中, 因此在使用 pipx install 时除了到带上 --system-site-packages 选项外, 可能你也需要手动安装下 python3-debian package.

sudo apt install python3-debian

在本地开发时, 使用 pdm 创建 venv 时也需要添加 --system-site-packages, 下面指令中的 3.11 是 Python 版本

# pdm venv backend defaults to virtualenv
pdm venv create -- 3.11 --system-site-packages

# install dependencies and activate venv
pdm install
pdm venv activate

tools

所有命令行工具都可以使用 -h--help 查看帮助信息, 下面是简要说明,

  • deb-extract: 列举当前目录下所有 .deb package 并解压到同名目录
  • dir-archive: 列举当前目录下所有文件夹, 批量将文件夹创建为同名压缩档, 支持多种压缩档格式
  • merge-ip-ranges: 从标准输入或文件中读取 IP addresses 并对其合并与去重
  • netstats: 显示各网卡开机以来流量和 packet 计数, 可以使用 regex 过滤网卡名称
  • pconv: 将文件中出现的全角标点符号转换为半角标点符号
  • rename-with-date: 将目录中特定后缀的文件重命名为 mtime 日期前缀
  • rotate-images: 创建 .mp4 或 .gif 格式的可以旋转的头像
  • shasum-list: 计算特定目录下所有文件的 hexdigest 并保存到文件中, 支持忽略 .gitignore
  • sort-keys: 读取 .json 文件后对 dict 执行 sort_keys 后保存
  • urlencode: 从标准输入或文件中读取文本并进行 urlencode

TODO

  • add zstd support on deb-extract

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

chaos_box-0.3.0.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

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

chaos_box-0.3.0-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file chaos_box-0.3.0.tar.gz.

File metadata

  • Download URL: chaos_box-0.3.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chaos_box-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5400c17b33f5828ca5dd365645b5a75a901faa030390e979fcd60d7f47716800
MD5 c1e88262f372daec8ec25bbee44da13a
BLAKE2b-256 bf7cc12e4d751ee7a9a4f9e30cb3bbe3f060f7b9e38aa6aaffeefc51bfd71bf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for chaos_box-0.3.0.tar.gz:

Publisher: publish-to-pypi.yaml on ak1ra-lab/chaos-box

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chaos_box-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: chaos_box-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chaos_box-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26c214227d206617c9dbef287d3afff1ef73e0fba7311beafc0c8b00086f5363
MD5 2fef631e6869956dc371b693a26675ef
BLAKE2b-256 0f1a195bddea2f3453c22973f058b0d384d899f0bee9349fb97ec23f877dd0ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for chaos_box-0.3.0-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on ak1ra-lab/chaos-box

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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