小工具集 — 各类实用小功能
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.11.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.11-py3-none-any.whl
(19.6 kB
view details)
File details
Details for the file xigua-0.1.11.tar.gz.
File metadata
- Download URL: xigua-0.1.11.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 |
b9f9d435f8c1d077fc38c0f0787f422a46c076a7381bde218efaf77026122344
|
|
| MD5 |
515753cbafeb90b9e2b5b86e92ab2977
|
|
| BLAKE2b-256 |
69b7a6ab0b165110f393eabae85ae1bdca1a3425df9dc503fab2913e1fcc64b7
|
File details
Details for the file xigua-0.1.11-py3-none-any.whl.
File metadata
- Download URL: xigua-0.1.11-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 |
ed70947636b410652900cf659e1b163da3d9524f6f51b986a5fb0cec63f6b3d9
|
|
| MD5 |
1e6a29ee38e2026ea0ff777ed20e160c
|
|
| BLAKE2b-256 |
a367bd589b66bf00455b70d277d824f6a569a05f0942d3cc1b571389217c08b0
|