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 许可证。

Metadata

Release files for syize 1.2.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for syize 1.2.18
File Size Uploaded
syize-1.2.18.tar.gz 121.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for syize 1.2.18
File
syize-1.2.18-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
syize-1.2.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
syize-1.2.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
syize-1.2.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
syize-1.2.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
syize-1.2.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details

Total release size: 49.6 MB

Release files / syize-1.2.18.tar.gz

Download URL syize-1.2.18.tar.gz
Size 121.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3db1f357f6d12c662e09ddf56afc1f564970293da20fea19a1d08876db7fbe9e
BLAKE2b-256 checksum
How to use checksums
c89963fd20f2935edec43488afce618723793b4d7c42b61b547e12eed6bcce64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / syize-1.2.18-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL syize-1.2.18-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 8.3 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e59bcb6b7cad5f26c41bb2010a6b8b35d2faaabd613a2e5729ed7adc7617700e
BLAKE2b-256 checksum
How to use checksums
d4a8c05ee741c22e754ebe3e1b325a9a10df60a9228ecb1d19cc4e6bc2ec5211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / syize-1.2.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL syize-1.2.18-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 8.3 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a6860e3e51790f314786c614563d7fbf6310570904e600719564c58eda21a90c
BLAKE2b-256 checksum
How to use checksums
76edc93963c3772b770566c8fa9a2660009839d0e50f55cc82188faa18612e75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / syize-1.2.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL syize-1.2.18-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 8.3 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ed3ad5a6a9c0a027210fa6986559d909f1b6683d9287c2a935b5b1567448d4c1
BLAKE2b-256 checksum
How to use checksums
17028bf15e20b5f662b4339f5546bcc375a07d3c323e4cbb9df6df4f839a96e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / syize-1.2.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL syize-1.2.18-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 8.3 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1500d3ff9797d14c8e54b5cacf06591f1e9eb06755fc3b26c63294a11fed7dec
BLAKE2b-256 checksum
How to use checksums
9c86cccc3e2e3b017840edf4d01f31468e5500bc5d8238ab99d47dffed38712f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / syize-1.2.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL syize-1.2.18-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 8.2 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2fb5b95df5dbba01c678f9542c99364b60f2c214bb604f2dd395693e734841ca
BLAKE2b-256 checksum
How to use checksums
383f151bd52d43640bd2443dc7d14a5b688dda99f017f56e6c14dcd4129e8b39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release files / syize-1.2.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL syize-1.2.18-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 8.2 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c18d3a7c9de678239b5a2ba731d11239631c3bc8b1e7d8d2773dfa4c20d9c0e3
BLAKE2b-256 checksum
How to use checksums
f08215fa8fb6a93e8f309c8d9fce14d00e1a632b5f0ead3ec57289e312b04610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.18 This release

7 release files

1.2.17

7 release files

1.2.16

1 release file

1.2.15

1 release file

1.2.14

1 release file

1.2.12

1 release file

1.2.11

1 release file

1.2.10

1 release file

1.2.9

1 release file

1.2.8

1 release file

1.2.7

1 release file

1.2.6

2 release files

1.2.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page