मुख्य सामग्री पर जाएँ
Skillpedia
PDF, Word और स्लाइड7.8k · #12913

pdf-checklist-workflow

यह क्या करती है

यह स्किल बैकअप तरीके के साथ Python लाइब्रेरी से PDF चेकलिस्ट और मूल्यांकन बनाने का तरीका बताती है। यह उन लोगों के लिए है जिन्हें खंडों, तालिकाओं और स्कोरिंग वाली डाउनलोड करने योग्य PDF चाहिए।

कब इस्तेमाल करें

  • ✓जब मुझे खंडों और तालिकाओं वाली PDF चेकलिस्ट, रिपोर्ट या मूल्यांकन चाहिए।
  • ✓जब दस्तावेज़ में स्कोरिंग या मूल्यांकन ढाँचा चाहिए।
  • ✓जब सैंडबॉक्स विफल हो और फिर भी PDF बनानी हो।

Skill का लिंक

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pdf-checklist-workflow/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pdf-checklist-workflow/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हमारे स्टाफ़ के लिए खंडों, तालिकाओं और स्कोरिंग ढाँचे वाला PDF मूल्यांकन बनाइए। अगर सैंडबॉक्स विफल हो, तो स्क्रिप्ट लिखकर शेल से चलाइए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI एक PDF लाइब्रेरी चुनता है, खंड और तालिकाएँ बनाने वाला कोड लिखता है, फ़ाइल कार्य-क्षेत्र में सहेजता है और आर्टिफ़ैक्ट पाथ छापता है। विफल होने पर वह स्क्रिप्ट फ़ाइल में लिखकर शेल से चलाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

PDF Checklist/Report Generation Workflow

This skill provides a reusable pattern for creating structured PDF documents such as checklists, reports, or assessments using Python in a sandboxed environment.

Overview

Use this workflow when you need to:

  • Generate PDF checklists, reports, or assessments
  • Create structured documents with tables, sections, and headers
  • Include scoring criteria or evaluation frameworks
  • Produce downloadable artifacts for users

Primary method: Use execute_code_sandbox for Python PDF generation Fallback method: If execute_code_sandbox fails, create and run Python scripts via shell commands

Step-by-Step Instructions

Step 1: Choose a PDF Library

Select a Python library based on your needs:

Library Best For Complexity
reportlab Professional reports, complex layouts Medium
fpdf / fpdf2 Simple documents, quick generation Low
matplotlib Charts, graphs, visual elements Medium

Step 2: Write PDF Generation Code in execute_code_sandbox

Use the execute_code_sandbox tool with Python code that:

  1. Imports the chosen PDF library
  2. Defines document structure (title, sections, tables)
  3. Adds content (text, tables, scores, criteria)
  4. Saves to a file path like /workspace/output.pdf
  5. Outputs the path using ARTIFACT_PATH: prefix for download

Determine workspace directory dynamically: Before generating PDFs, identify the correct output path:

# Option 1: Use current directory
WORKDIR=$(pwd)

# Option 2: Check common workspace locations
if [ -d "/workspace" ]; then WORKDIR="/workspace"
elif [ -d "$HOME/workspace" ]; then WORKDIR="$HOME/workspace"
else WORKDIR=$(pwd); fi

In Python code, use environment variables or dynamic path detection:

import os
workspace = os.environ.get('WORKSPACE', os.getcwd())
output_path = os.path.join(workspace, 'output.pdf')

Example using fpdf2:

from fpdf import FPDF

class PDFChecklist(FPDF):
    def header(self):
        self.set_font('Arial', 'B', 16)
        self.cell(0, 10, 'Assessment Checklist', 0, 1, 'C')
        self.ln(10)
    
    def section_title(self, title):
        self.set_font('Arial', 'B', 12)
        self.cell(0, 10, title, 0, 1, 'L')
        self.ln(5)
    
    def add_checklist_item(self, item, criteria, score):
        self.set_font('Arial', '', 10)
        self.cell(100, 8, item, 1)
        self.cell(60, 8, criteria, 1)
        self.cell(30, 8, str(score), 1)
        self.ln()

# Create PDF
pdf = PDFChecklist()
pdf.add_page()
pdf.set_auto_page_break(auto=True, margin=15)

# Add sections
pdf.section_title('Evaluation Criteria')
pdf.add_checklist_item('Requirement 1', 'Must meet standard', 5)
pdf.add_checklist_item('Requirement 2', 'Should be complete', 4)

# Save
output_path = '/workspace/checklist.pdf'
pdf.output(output_path)
print(f'ARTIFACT_PATH:{output_path}')

Example using reportlab (more professional):

from reportlab.lib import colors
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import inch

def create_pdf_report(output_path):
    doc = SimpleDocTemplate(output_path, pagesize=letter)
    styles = getSampleStyleSheet()
    story = []
    
    # Title
    title_style = ParagraphStyle('CustomTitle', parent=styles['Heading1'],
                                  fontSize=18, spaceAfter=30, alignment=1)
    story.append(Paragraph("Assessment Report", title_style))
    story.append(Spacer(1, 0.3*inch))
    
    # Section header
    story.append(Paragraph("Evaluation Summary", styles['Heading2']))
    story.append(Spacer(1, 0.2*inch))
    
    # Data table
    data = [
        ['Criteria', 'Description', 'Score'],
        ['Completeness', 'All sections filled', '8/10'],
        ['Accuracy', 'Information verified', '9/10'],
        ['Clarity', 'Easy to understand', '7/10']
    ]
    
    table = Table(data, colWidths=[2*inch, 2.5*inch, 1*inch])
    table.setStyle(TableStyle([
        ('BACKGROUND', (0, 0), (-1, 0), colors.grey),
        ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
        ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
        ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
        ('BOTTOMPADDING', (0, 0), (-1, 0), 12),
        ('BACKGROUND', (0, 1), (-1, -1), co
अक्सर पूछे जाने वाले सवाल

कौन सी लाइब्रेरी सूचीबद्ध हैं?

गाइड जटिल लेआउट के लिए reportlab, सरल दस्तावेज़ों के लिए fpdf या fpdf2, और चार्ट के लिए matplotlib सूचीबद्ध करती है।

फ़ाइल कहाँ सहेजी जाती है?

गाइड आउटपुट कार्य-क्षेत्र में सहेजती है और डाउनलोड के लिए एक पाथ छापती है।

बैकअप तरीका क्या है?

सैंडबॉक्स विफल होने पर स्क्रिप्ट फ़ाइल में लिखकर शेल से चलाई जाती है।

जानकारी

लेखक का मूल विवरण

Generate structured PDF documents with tables, sections, and scoring using Python libraries in execute_code_sandbox

repo: HKUDS/AgentPilot

लोकप्रियता

GitHub स्टार
7.8k
रैंकिंग में स्थान
#12913
लाइसेंस
MIT
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills