Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Optional HTTP service settings. Never commit real secrets.
PPTX_EXTRACTION_WORK_DIR=./work
PPTX_EXTRACTION_MAX_UPLOAD_MB=50
PPTX_EXTRACTION_WORKERS=2
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: monthly
groups:
python-dependencies:
patterns: ["*"]
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
pull_request:

permissions:
contents: read

jobs:
test:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: python -m pip install --upgrade pip
- run: python -m pip install -e ".[dev,api]"
- run: ruff check .
- run: ruff format --check .
- run: mypy src/pptx_extraction
- run: pytest
- run: python -m build

privacy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Reject common private artifacts
shell: bash
run: |
if git ls-files | grep -E '\.(pptx?|pptm|potx|ppsx|mp3|wav|srt)$'; then
echo "Private presentation/audio artifact is tracked."
exit 1
fi
if git grep -nE '([A-Z]:\\\\|BEGIN (RSA |OPENSSH )?PRIVATE KEY|api[_-]?key[[:space:]]*=)' -- ':!docs/release.md'; then
echo "Potential machine path or secret found."
exit 1
fi
51 changes: 33 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
# 忽略 Python 字节码文件
# Python
__pycache__/
*.pyc
*.pyo
*.py[cod]
*.pyd
*.egg-info/
.pytest_cache/
.mypy_cache/
.ruff_cache/
.coverage
htmlcov/

# 忽略虚拟环境
# Environments and secrets
.venv/
venv/
.env
.env.*
!.env.example
*.pem
*.key

# 忽略输出目录
# Builds and runtime data
build/
dist/
release/
work/
output/
*.txt # 如果只想忽略特定输出文件,可改为 output/*.txt

# 忽略日志文件
logs/
outputs/
_legacy_local_backup/
*.log

# 忽略临时文件
*.tmp
*.swp

# 忽略系统文件
.DS_Store # macOS
Thumbs.db # Windows

# PPT
# Office lock files and local presentation material
~$*.ppt*
*.ppt
*.pptx
PPT_SET/
*.pptm
*.potx
*.ppsx
!tests/fixtures/*.pptx

# Editor / OS
.idea/
.vscode/
.DS_Store
Thumbs.db
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# pptx_extraction changelog

All notable changes follow [Keep a Changelog](https://keepachangelog.com/) and semantic versioning.

## [2.0.0] - 2026-08-11

### Added

- Structured extraction for text, tables, chart data, speaker notes, hyperlinks, images and metadata.
- JSON, Markdown and plain-text exporters with a versioned schema.
- Safe OOXML validation, deterministic image deduplication and optional Tesseract OCR.
- Cross-platform CLI, concurrent batch mode, optional LibreOffice legacy conversion and job-based API.
- Unit/integration tests, CI, security policy, architecture documentation and Agent Skill packaging.

### Changed

- Rebuilt the prototype as a typed `src/` package with explicit domain models and error boundaries.
- Replaced import-time Spacy/Transformers/PaddleOCR loading with deterministic offline defaults.

### Removed

- Hard-coded personal paths, personal contact details and committed user-generated outputs.
- Misleading PDF support and the unrelated audio-caption experiment from the core package.
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Contributing

Use Python 3.10 or newer. Create a virtual environment, install `-e ".[dev]"`, then run:

```bash
ruff check .
ruff format --check .
mypy src/pptx_extraction
pytest
```

Keep extraction deterministic and offline by default. New output fields must remain backward compatible
within the current schema major version. Add a generated fixture or focused unit test for every parser fix;
never commit private decks, extracted media, credentials or machine-specific paths.

Open a small issue before large changes. Use conventional, imperative commit subjects and include the
observable behavior and test evidence in pull requests.
Binary file removed DeepLearning.pptx
Binary file not shown.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 pptx_extraction contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include CHANGELOG.md
include CONTRIBUTING.md
include LICENSE
include README.md
include SECURITY.md
recursive-include docs *.md
recursive-include schemas *.json
recursive-include tests *.py
Loading
Loading