A powerful PDF processing tool with text extraction, table recognition, and image extraction capabilities
Project description
PDF Processor
一个强大的 PDF 处理工具,用于处理和管理 PDF 文件。
功能特性
- PDF 文件处理
- 支持多种操作系统
- 简单易用的 API
安装
基础安装
pip install .
开发环境安装
pip install ".[dev]"
测试环境安装
pip install ".[test]"
依赖管理
项目使用 pyproject.toml 和 requirements.txt 进行依赖管理:
requirements.txt: 基础依赖requirements-dev.txt: 开发依赖requirements-test.txt: 测试依赖
开发指南
环境设置
- 克隆仓库
git clone <repository-url>
cd pdf-processor
- 创建虚拟环境
python -m venv venv
source venv/bin/activate # Linux/macOS
# 或
.\venv\Scripts\activate # Windows
- 安装开发依赖
pip install ".[dev]"
代码规范
项目使用以下工具确保代码质量:
- black: 代码格式化
- isort: import 语句排序
- flake8: 代码风格检查
- mypy: 类型检查
运行测试
pytest
使用示例
from pdf_processor import PDFProcessor
# 创建处理器实例
processor = PDFProcessor()
# 处理 PDF 文件
processor.process("input.pdf", "output.pdf")
项目结构
pdf-processor/
├── pdf_processor/
│ └── __init__.py
├── tests/
│ └── __init__.py
├── pyproject.toml
├── requirements.txt
├── requirements-dev.txt
├── requirements-test.txt
└── README.md
贡献指南
- Fork 项目
- 创建特性分支 (
git checkout -b feature/amazing-feature) - 提交改动 (
git commit -m '添加一些特性') - 推送到分支 (
git push origin feature/amazing-feature) - 创建 Pull Request
许可证
本项目基于 MIT 许可证 - 详见 LICENSE 文件
作者
- zhanghanlin - zhanghanlinhs@163.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file rainbow_pdf_processor-0.1.0.tar.gz.
File metadata
- Download URL: rainbow_pdf_processor-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b592a509725177bc11b79bc8234ffb6dd8436ae6629546b83684f06eeae96c9c
|
|
| MD5 |
38940c7673cc2d9b319ed1d18b9af4e7
|
|
| BLAKE2b-256 |
09f448b83d92cba958757dbde0ff562b471f0785ae1946452f21c1a20732ac05
|
Provenance
The following attestation bundles were made for rainbow_pdf_processor-0.1.0.tar.gz:
Publisher:
python-publish.yml on RainbowGuysForFun/pdf-processor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rainbow_pdf_processor-0.1.0.tar.gz -
Subject digest:
b592a509725177bc11b79bc8234ffb6dd8436ae6629546b83684f06eeae96c9c - Sigstore transparency entry: 193754489
- Sigstore integration time:
-
Permalink:
RainbowGuysForFun/pdf-processor@259e7f77884bd52f3fc0fa7b28e0518373638cf4 -
Branch / Tag:
refs/tags/v0.1.0-beta1 - Owner: https://github.com/RainbowGuysForFun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@259e7f77884bd52f3fc0fa7b28e0518373638cf4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rainbow_pdf_processor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rainbow_pdf_processor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49aa791add3a7563c035fbdc5a247843e0ae717d65b82bb2fe259c3066ff6b6c
|
|
| MD5 |
944bc7e693a16d7139d1e3dd10503c65
|
|
| BLAKE2b-256 |
3bbc81e31e6ddec59eb20004a20d21cfd90fb67d6b837e040f81eed7e87a0969
|
Provenance
The following attestation bundles were made for rainbow_pdf_processor-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on RainbowGuysForFun/pdf-processor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rainbow_pdf_processor-0.1.0-py3-none-any.whl -
Subject digest:
49aa791add3a7563c035fbdc5a247843e0ae717d65b82bb2fe259c3066ff6b6c - Sigstore transparency entry: 193754491
- Sigstore integration time:
-
Permalink:
RainbowGuysForFun/pdf-processor@259e7f77884bd52f3fc0fa7b28e0518373638cf4 -
Branch / Tag:
refs/tags/v0.1.0-beta1 - Owner: https://github.com/RainbowGuysForFun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@259e7f77884bd52f3fc0fa7b28e0518373638cf4 -
Trigger Event:
release
-
Statement type: