2026-01-21 18:06:34 +08:00

39 lines
615 B
Markdown

# extract.py
Extracts text and metadata from PDF files.
**Input**:
```json
{
"file_path": "/path/to/document.pdf",
"pages": "all" | [1, 2, 3]
}
```
**Output**:
```json
{
"text": "Extracted text content...",
"metadata": {
"title": "Document Title",
"author": "Author Name",
"pages": 10
}
}
```
## Usage Example
```python
from skillkit import SkillManager
manager = SkillManager()
result = manager.execute_skill_script(
skill_name="pdf-extractor",
script_name="extract",
arguments={"file_path": "document.pdf", "pages": "all"}
)
if result.success:
print(result.stdout)
```