بنقرة واحدة
pdf-processing
Skill for processing and extracting content from PDF files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Skill for processing and extracting content from PDF files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations
Skill for data analysis and visualization using Python
An example skill demonstrating how to use the skill system
استنادا إلى تصنيف SOC المهني
| name | pdf-processing |
| description | Skill for processing and extracting content from PDF files |
This skill provides guidance and tools for processing PDF files, extracting text, and analyzing document content.
This skill includes Python scripts for common PDF processing tasks:
Use execute_script to run the text extraction script:
python /nfs/FM/gongoubo/new_project/Agent-Handbook/mini-agents/Mini_Agents/skills/document-skills/pdf/scripts/extract_text.py /path/to/your/file.pdf
Use execute_script to run the structure analysis script:
python /nfs/FM/gongoubo/new_project/Agent-Handbook/mini-agents/Mini_Agents/skills/document-skills/pdf/scripts/analyze_structure.py /path/to/your/file.pdf
Use execute_script to run the table extraction script:
python /nfs/FM/gongoubo/new_project/Agent-Handbook/mini-agents/Mini_Agents/skills/document-skills/pdf/scripts/extract_tables.py /path/to/your/file.pdf
For quick PDF processing, use execute_code with inline Python code:
import PyPDF2
# Open PDF file
pdf_path = '/path/to/your/file.pdf'
with open(pdf_path, 'rb') as file:
reader = PyPDF2.PdfReader(file)
# Get basic info
num_pages = len(reader.pages)
print(f"Number of pages: {num_pages}")
# Extract text from first page
first_page = reader.pages[0]
text = first_page.extract_text()
print(f"First page text preview: {text[:200]}...")
Use execute_code tool:
import PyPDF2
pdf_path = '/path/to/your/file.pdf'
with open(pdf_path, 'rb') as file:
reader = PyPDF2.PdfReader(file)
all_text = ""
for page_num in range(len(reader.pages)):
page = reader.pages[page_num]
all_text += page.extract_text()
print(all_text)
Use execute_code tool:
import PyPDF2
pdf_path = '/path/to/your/file.pdf'
page_number = 2 # Extract from page 3 (0-indexed)
with open(pdf_path, 'rb') as file:
reader = PyPDF2.PdfReader(file)
if page_number < len(reader.pages):
page = reader.pages[page_number]
text = page.extract_text()
print(f"Text from page {page_number + 1}:")
print(text)
else:
print(f"Page {page_number + 1} does not exist. Total pages: {len(reader.pages)}")
Use execute_code tool:
import PyPDF2
pdf_path = '/path/to/your/file.pdf'
with open(pdf_path, 'rb') as file:
reader = PyPDF2.PdfReader(file)
metadata = reader.metadata
print("PDF Metadata:")
if metadata:
for key, value in metadata.items():
print(f" {key}: {value}")
else:
print(" No metadata available")
execute_code for simple text extraction tasksexecute_script for complex PDF processing workflowsInstall with: pip install PyPDF2 pdfplumber tabula-py