小工具集 — 各类实用小功能
Project description
xigua — 小工具集
各类实用小功能,按模块组织,持续扩展。
已包含模块
media — 本地图片/视频元数据
读取本地图片或视频的全部元数据(中文键名输出)。
from xigua.media import MediaMetadataService
# 读取为字典
data = MediaMetadataService.read("/path/to/photo.jpg")
# 直接格式化输出
print(MediaMetadataService.format_file("/path/to/clip.mp4", fmt="text"))
print(MediaMetadataService.format_file("/path/to/clip.mp4", fmt="yaml", include_md5=False))
命令行:
xigua-media /path/to/photo.jpg
xigua-media /path/to/clip.mp4 --fmt text --no-md5
依赖说明:
- 图片:Pillow(HEIC/HEIF 需
pip install xigua[heif]) - 视频:系统需安装
ffprobe
media.hls — 本地 HLS 多码率转码
from xigua.media.hls import transcode_local_hls, select_hls_rungs
master, tmp = transcode_local_hls("/path/to/video.mov")
if master:
print(master)
tmp.cleanup()
转码进度条需 pip install xigua[hls](rich)。
安装
pip install xigua
pip install xigua[heif] # 支持 HEIC/HEIF
pip install xigua[hls] # HLS 转码进度条
发布
cd /Users/xigua/pypi-publish
./publish xigua --bump patch
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
xigua-0.1.10.tar.gz
(17.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
xigua-0.1.10-py3-none-any.whl
(19.6 kB
view details)
File details
Details for the file xigua-0.1.10.tar.gz.
File metadata
- Download URL: xigua-0.1.10.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381345ec115f9f52ce5c877274232c891f38c19c73a0f5d9337bb1dc6821fbc9
|
|
| MD5 |
480e9a15604378071265ee8a181ab85e
|
|
| BLAKE2b-256 |
3621fab20c319729d66355cb92a83f109d4b6b0215e72778e51fb2e2b770d6af
|
File details
Details for the file xigua-0.1.10-py3-none-any.whl.
File metadata
- Download URL: xigua-0.1.10-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
662bfb2792a410933984c74466cfb6cd15d90234e5636b1b30490caeb67aeddb
|
|
| MD5 |
666c92ce9265d9feec1d585f83457383
|
|
| BLAKE2b-256 |
48eac67210d8dd06c98bc966524371c80b7eaa25c5d5e59d821ae57285369e5c
|