Skip to main content

syize/一个简单好用的工具箱

syize 是一个集合了多种实用工具的 Python 包,主要用于处理字符串、图片、PDF、Fortran 代码、NetCDF 数据以及电视节目管理等任务。这些工具是为了简化日常开发、数据分析和处理工作而设计的。

功能模块

1. 字符串处理 (syize.string)

  • 格式化字符串format_string - 自动格式化字符串,去除冗余换行符
  • 去除冗余换行remove_redundant_linebreak - 智能处理文本中的换行符

2. 图片处理 (syize.picture)

  • 图片转文字picture_to_string - 使用 OCR 技术从图片中提取文本(支持中文和英文)
  • PDF转图片pdf_to_picture - 将 PDF 文件转换为图片(PNG格式)

3. 代码处理 (syize.fortran)

  • Fortran代码解析entry_parse_fortran - 解析和格式化 Fortran 代码
  • 代码格式化:包含对 Fortran 代码的格式化和处理工具

4. 数据处理 (syize.nc)

  • NetCDF数据查看NCView - 提供交互式界面查看 NetCDF 数据文件
  • 数据交互:支持查看数据集属性、坐标、变量和数据内容

5. 可视化 (syize.plot)

  • 地图绘制:包含地图可视化相关工具(基于 Cartopy)
  • 绘图辅助:提供颜色条制备和图表调整功能

6. 电视节目管理 (syize.tv_show_manage)

  • 节目排序entry_sort_episode - 识别并排序剧集文件
  • 重命名entry_rename_episode_file - 重命名剧集文件
  • 文件识别:支持多种剧集编号格式

7. Qt 界面 (syize.qt)

  • 下载器Downloader - 提供下载文件的图形界面
  • 下载管理:支持下载参数配置和进度监控

安装

使用 pip 安装:

pip install syize

或者通过源码安装:

git clone <repository_url>
cd syize-toolkits
pip install .

命令行使用

syize 提供了两个主要的命令行工具:

1. syize - 通用工具箱

syize -h  # 显示帮助信息
syize list  # 列出当前目录所有文件
syize ocr -i image.png -o output.txt  # 图片转文字
syize pdf -i document.pdf -o ./images  # PDF转图片
syize str -i input.txt -o output.txt  # 格式化字符串
syize nc -i data.nc  # 查看NetCDF数据
syize ft -i code.f90 -o formatted_code.f90  # 格式化Fortran代码

2. tvsm - 电视节目管理工具

tvsm -h  # 显示帮助信息
tvsm sort "Episode %%d"  # 排序剧集文件
tvsm rename "MyShow S01E"  # 重命名剧集文件

依赖

项目依赖以下 Python 包:

  • Pillow, pytesseract (图片处理)
  • pdf2image (PDF处理)
  • rich (终端美化)
  • matplotlib, Cartopy (可视化)
  • haversine (地理计算)
  • pyside6 (GUI界面)
  • prompt-toolkit (交互式命令)
  • xarray, netcdf4, numpy (数据处理)
  • requests (网络请求)

开发

项目使用 Meson 构建系统:

meson setup build
cd build
ninja

文档

完整的 API 文档可以在 docs/ 目录中找到,使用 Sphinx 生成。

许可证

本项目采用 GPL-3.0-or-later 许可证。

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syize-1.2.18.tar.gz (121.4 kB view details)

Uploaded Source

Built Distributions

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

syize-1.2.18-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

syize-1.2.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

syize-1.2.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

syize-1.2.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

syize-1.2.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

syize-1.2.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file syize-1.2.18.tar.gz.

File metadata

  • Download URL: syize-1.2.18.tar.gz
  • Upload date:
  • Size: 121.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for syize-1.2.18.tar.gz
Algorithm Hash digest
SHA256 3db1f357f6d12c662e09ddf56afc1f564970293da20fea19a1d08876db7fbe9e
MD5 cb6fa1206a48a6a9586e0fb625170c46
BLAKE2b-256 c89963fd20f2935edec43488afce618723793b4d7c42b61b547e12eed6bcce64

See more details on using hashes here.

Provenance

The following attestation bundles were made for syize-1.2.18.tar.gz:

Publisher: python-package.yaml on Syize/syize-toolkits

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

File details

Details for the file syize-1.2.18-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for syize-1.2.18-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e59bcb6b7cad5f26c41bb2010a6b8b35d2faaabd613a2e5729ed7adc7617700e
MD5 4aed290f6419516dae8f05597c1d19d4
BLAKE2b-256 d4a8c05ee741c22e754ebe3e1b325a9a10df60a9228ecb1d19cc4e6bc2ec5211

See more details on using hashes here.

Provenance

The following attestation bundles were made for syize-1.2.18-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-package.yaml on Syize/syize-toolkits

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

File details

Details for the file syize-1.2.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for syize-1.2.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a6860e3e51790f314786c614563d7fbf6310570904e600719564c58eda21a90c
MD5 b46b45ce3ee53bc572641a85ebe94a03
BLAKE2b-256 76edc93963c3772b770566c8fa9a2660009839d0e50f55cc82188faa18612e75

See more details on using hashes here.

Provenance

The following attestation bundles were made for syize-1.2.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-package.yaml on Syize/syize-toolkits

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

File details

Details for the file syize-1.2.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for syize-1.2.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ed3ad5a6a9c0a027210fa6986559d909f1b6683d9287c2a935b5b1567448d4c1
MD5 ce0c0b9200fed93c5b532b3429bd31a9
BLAKE2b-256 17028bf15e20b5f662b4339f5546bcc375a07d3c323e4cbb9df6df4f839a96e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for syize-1.2.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-package.yaml on Syize/syize-toolkits

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

File details

Details for the file syize-1.2.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for syize-1.2.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1500d3ff9797d14c8e54b5cacf06591f1e9eb06755fc3b26c63294a11fed7dec
MD5 e10c0bba42529e2e835d288cfa838b15
BLAKE2b-256 9c86cccc3e2e3b017840edf4d01f31468e5500bc5d8238ab99d47dffed38712f

See more details on using hashes here.

Provenance

The following attestation bundles were made for syize-1.2.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-package.yaml on Syize/syize-toolkits

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

File details

Details for the file syize-1.2.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for syize-1.2.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2fb5b95df5dbba01c678f9542c99364b60f2c214bb604f2dd395693e734841ca
MD5 0a2fa84d2b8a216674eb5222cc5486b5
BLAKE2b-256 383f151bd52d43640bd2443dc7d14a5b688dda99f017f56e6c14dcd4129e8b39

See more details on using hashes here.

Provenance

The following attestation bundles were made for syize-1.2.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-package.yaml on Syize/syize-toolkits

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

File details

Details for the file syize-1.2.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for syize-1.2.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c18d3a7c9de678239b5a2ba731d11239631c3bc8b1e7d8d2773dfa4c20d9c0e3
MD5 893a46a2358ddd02db7762c630be54e5
BLAKE2b-256 f08215fa8fb6a93e8f309c8d9fce14d00e1a632b5f0ead3ec57289e312b04610

See more details on using hashes here.

Provenance

The following attestation bundles were made for syize-1.2.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-package.yaml on Syize/syize-toolkits

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 Sentry Error logging StatusPage Status page