sap-article-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSAP Article Generator
SAP 文章生成器
Generate optimized, fact-checked SAP technical articles as professional Word documents with embedded images, flowcharts, and references.
生成经过优化、事实核查的SAP技术文章,并保存为包含嵌入图片、流程图和参考文献的专业Word文档。
Overview
概述
This skill is self-contained and includes:
- Web research and fact-checking capabilities
- Built-in image downloading from the web
- Professional Word document creation with docx
- Proper SAP formatting and terminology
- Embedded screenshots and diagrams
- Reference citations
本Skill是独立完整的,包含以下功能:
- 网络调研与事实核查能力
- 内置网络图片下载功能
- 借助docx创建专业Word文档
- 规范的SAP格式与术语使用
- 嵌入截图与图表
- 参考文献引用
Article Generation Workflow
文章生成工作流
Follow these steps in sequence for every article:
请按以下顺序执行每篇文章的生成步骤:
0. PREREQUISITE: Read docx Skill (MANDATORY)
0. 前置要求:阅读docx Skill(必须完成)
bash
undefinedbash
undefinedREQUIRED before creating any Word document
创建任何Word文档前必须执行
cat /mnt/skills/public/docx/SKILL.md
undefinedcat /mnt/skills/public/docx/SKILL.md
undefined1. Topic Analysis and Planning (2-3 minutes)
1. 主题分析与规划(2-3分钟)
- Identify the SAP module, process, or topic
- Determine scope: configuration guide, conceptual overview, or troubleshooting
- Define target audience: beginner, intermediate, or advanced users
- Plan article structure based on topic type
- 确定SAP模块、流程或主题
- 明确范围:配置指南、概念概述或故障排查
- 定义目标受众:初级、中级或高级用户
- 根据主题类型规划文章结构
2. Research and Fact-Checking (5-10 minutes)
2. 调研与事实核查(5-10分钟)
CRITICAL: Always search before writing to ensure current, accurate information
Use web_search tool to verify:
- Latest SAP transaction codes and menu paths
- Current best practices and SAP Notes
- Version-specific differences (ECC vs S/4HANA)
- Official SAP documentation
Minimum 2-3 searches for any article.
Search query examples:
- "SAP [transaction code] [module] configuration"
- "SAP [process name] step by step guide"
- "SAP S/4HANA [topic] best practices"
关键:写作前务必进行搜索,确保信息的时效性与准确性
使用web_search工具验证:
- 最新的SAP事务代码与菜单路径
- 当前最佳实践与SAP Notes
- 版本差异(ECC vs S/4HANA)
- 官方SAP文档
每篇文章至少进行2-3次搜索
搜索查询示例:
- "SAP [事务代码] [模块] 配置"
- "SAP [流程名称] 分步指南"
- "SAP S/4HANA [主题] 最佳实践"
3. Content Structure Planning
3. 内容结构规划
Configuration Guides:
- Introduction and business context
- Prerequisites and system requirements
- Configuration overview
- Step-by-step configuration with transaction codes
- IMG menu paths and settings
- Testing and validation
- Troubleshooting
- Best practices
- References
Conceptual Articles:
- Introduction and business context
- Key concepts and terminology
- Process flow and architecture
- Technical implementation
- Integration points
- Use cases and examples
- Best practices
- References
Troubleshooting Guides:
- Problem overview and symptoms
- Root cause analysis
- Diagnostic steps
- Solution steps
- Prevention strategies
- Related SAP Notes
- References
配置指南:
- 介绍与业务背景
- 前置条件与系统要求
- 配置概述
- 带事务代码的分步配置
- IMG菜单路径与设置
- 测试与验证
- 故障排查
- 最佳实践
- 参考文献
概念性文章:
- 介绍与业务背景
- 核心概念与术语
- 流程与架构
- 技术实现
- 集成点
- 用例与示例
- 最佳实践
- 参考文献
故障排查指南:
- 问题概述与症状
- 根因分析
- 诊断步骤
- 解决方案步骤
- 预防策略
- 相关SAP Notes
- 参考文献
4. Visual Content Integration (CRITICAL - MUST DO THIS!)
4. 视觉内容集成(关键 - 必须执行!)
Images significantly improve article quality. Every article MUST have 2-3+ embedded images.
图片能显著提升文章质量。每篇文章必须嵌入2-3张及以上图片。
Step 4.1: Search for Images
步骤4.1:搜索图片
Use web_search to find relevant SAP images:
web_search("SAP [transaction] screenshot")
web_search("SAP [process] flow diagram")
web_search("SAP [module] configuration screen")Image types to include:
- Transaction screen screenshots
- Process flow diagrams
- System architecture diagrams
- Configuration examples
- Data flow illustrations
使用web_search工具查找相关SAP图片:
web_search("SAP [事务] 截图")
web_search("SAP [流程] 流程图")
web_search("SAP [模块] 配置界面")推荐包含的图片类型:
- 事务界面截图
- 流程流程图
- 系统架构图
- 配置示例
- 数据流示意图
Step 4.2: Extract Image URLs
步骤4.2:提取图片URL
From the web_search results, identify direct image URLs. Look for:
- .png, .jpg, .jpeg, .gif, .svg, .webp URLs
- Image URLs in search results snippets
- URLs from SAP blogs, tutorials, help portal
从web_search结果中识别直接图片URL,优先选择:
- .png、.jpg、.jpeg、.gif、.svg、.webp格式的URL
- 搜索结果摘要中的图片URL
- 来自SAP博客、教程、帮助门户的URL
Step 4.3: Download Images Using Built-in Script
步骤4.3:使用内置脚本下载图片
Install dependencies first (if not already installed):
bash
pip install requests Pillow --break-system-packagesCreate temp directory:
bash
mkdir -p /home/claude/temp_imagesDownload images:
Option A - Single Image:
bash
python scripts/fetch_image.py \
"https://example.com/sap-screenshot.png" \
/home/claude/temp_imagesOption B - Multiple Images (Recommended):
bash
undefined先安装依赖(如果尚未安装):
bash
pip install requests Pillow --break-system-packages创建临时目录:
bash
mkdir -p /home/claude/temp_images下载图片:
选项A - 单张图片:
bash
python scripts/fetch_image.py \
"https://example.com/sap-screenshot.png" \
/home/claude/temp_images选项B - 多张图片(推荐):
bash
undefinedCreate URL list
创建URL列表
cat > /home/claude/image_urls.txt << 'EOF'
https://example.com/sap-vov8.png
https://example.com/sales-flow.jpg
https://example.com/config-screen.png
EOF
cat > /home/claude/image_urls.txt << 'EOF'
https://example.com/sap-vov8.png
https://example.com/sales-flow.jpg
https://example.com/config-screen.png
EOF
Download all at once
批量下载
python scripts/fetch_images_batch.py
/home/claude/image_urls.txt
/home/claude/temp_images
/home/claude/image_urls.txt
/home/claude/temp_images
undefinedpython scripts/fetch_images_batch.py
/home/claude/image_urls.txt
/home/claude/temp_images
/home/claude/image_urls.txt
/home/claude/temp_images
undefinedStep 4.4: Verify Downloads
步骤4.4:验证下载结果
bash
ls -lh /home/claude/temp_images/You should see the downloaded images with file sizes.
bash
ls -lh /home/claude/temp_images/你应该能看到已下载的图片及其文件大小。
5. Document Creation with Embedded Images
5. 创建包含嵌入图片的文档
Follow the docx skill guidelines to create a professional Word document.
Key requirements for images in the document:
- Embed images using the docx library according to the docx skill instructions
- Use the downloaded image paths from
/home/claude/temp_images/ - Add figure captions below each image:
- Format: "Figure X: [Description]"
- Example: "Figure 1: SAP Transaction VOV8 - Sales Document Type Configuration"
- Center-align images
- Resize to appropriate width (typically 600px for full-width images)
Example embedding pattern (following docx skill):
python
undefined遵循docx Skill指南创建专业Word文档。
文档中图片的关键要求:
- 按照docx Skill说明,使用docx库嵌入图片
- 使用来自/home/claude/temp_images/的已下载图片路径
- 为每张图片添加图注:
- 格式:"图X:[描述]"
- 示例:"图1:SAP事务VOV8 - 销售凭证类型配置"
- 图片居中对齐
- 调整至合适宽度(通常全屏图片为600px)
嵌入示例(遵循docx Skill):
python
undefinedAfter creating document according to docx skill
按照docx Skill创建文档后
Add image paragraph with the downloaded image
添加包含已下载图片的段落
See docx SKILL.md for exact syntax
具体语法请参考docx SKILL.md
undefinedundefined6. Document Formatting Standards
6. 文档格式标准
Title Page:
- Article title (Heading 1, SAP blue #0070AD)
- Subtitle
- Date and version
Content Formatting:
- Headings: Hierarchical (H1: 16pt SAP blue, H2: 14pt, H3: 12pt)
- Paragraphs: 11pt Calibri, 1.15 line spacing
- Transaction codes: Monospace font (Courier New), light gray background
- Tables: Professional borders, header row with SAP blue background
- Lists: Bullet points or numbered lists as appropriate
Images:
- 600px width for full-width images
- Figure captions below each image
- Center-aligned
- Minimum 2-3 images per article
References Section:
- Numbered list of all sources
- Format: [1] Source Title, URL, Accessed: YYYY-MM-DD
标题页:
- 文章标题(一级标题,SAP蓝色#0070AD)
- 副标题
- 日期与版本
内容格式:
- 标题:层级化(H1:16pt SAP蓝色,H2:14pt,H3:12pt)
- 段落:11pt Calibri字体,1.15倍行间距
- 事务代码:等宽字体(Courier New),浅灰色背景
- 表格:专业边框,表头行使用SAP蓝色背景
- 列表:根据需要使用项目符号或编号列表
图片:
- 全屏图片宽度为600px
- 图注位于图片下方
- 居中对齐
- 每篇文章至少包含2-3张图片
参考文献部分:
- 所有来源的编号列表
- 格式:[1] 来源标题,URL,访问日期:YYYY-MM-DD
7. Quality Assurance Checklist
7. 质量保证检查清单
Before delivering, verify:
- Read docx SKILL.md completely
- Performed 2-3+ web searches for fact-checking
- Downloaded 2-3+ relevant images
- Images properly embedded with captions
- All transaction codes verified
- Table of contents generated (if applicable)
- References section complete
- Professional formatting throughout
- Saved to /mnt/user-data/outputs/
交付前请验证以下内容:
- 已完整阅读docx SKILL.md
- 已执行2-3次及以上网络搜索进行事实核查
- 已下载2-3张及以上相关图片
- 图片已正确嵌入并添加图注
- 所有事务代码已验证
- 已生成目录(如适用)
- 参考文献部分完整
- 全程使用专业格式
- 已保存至/mnt/user-data/outputs/
8. Delivery
8. 交付
bash
undefinedbash
undefinedSave document to outputs
保存文档到输出目录
Filename: [Topic]_SAP_Guide.docx
文件名:[Topic]_SAP_Guide.docx
mv /home/claude/article.docx /mnt/user-data/outputs/SAP_[Topic]_Guide.docx
Provide user with:
- Computer link: `computer:///mnt/user-data/outputs/SAP_[Topic]_Guide.docx`
- Brief summary of included contentmv /home/claude/article.docx /mnt/user-data/outputs/SAP_[Topic]_Guide.docx
向用户提供:
- 计算机链接:`computer:///mnt/user-data/outputs/SAP_[Topic]_Guide.docx`
- 包含内容的简要摘要Built-in Image Fetching Scripts
内置图片获取脚本
This skill includes two Python scripts for downloading images:
本Skill包含两个用于下载图片的Python脚本:
scripts/fetch_image.py
scripts/fetch_image.py
Downloads a single image from a URL.
Usage:
bash
python scripts/fetch_image.py <image_url> [output_dir] [filename]Examples:
bash
undefined从URL下载单张图片。
使用方法:
bash
python scripts/fetch_image.py <image_url> [output_dir] [filename]示例:
bash
undefinedDownload to current directory
下载到当前目录
python scripts/fetch_image.py https://example.com/image.jpg
python scripts/fetch_image.py https://example.com/image.jpg
Download to specific directory
下载到指定目录
python scripts/fetch_image.py https://example.com/image.jpg /home/claude/temp_images
python scripts/fetch_image.py https://example.com/image.jpg /home/claude/temp_images
Download with custom filename
自定义文件名下载
python scripts/fetch_image.py https://example.com/image.jpg /home/claude/temp_images sap_screenshot.jpg
undefinedpython scripts/fetch_image.py https://example.com/image.jpg /home/claude/temp_images sap_screenshot.jpg
undefinedscripts/fetch_images_batch.py
scripts/fetch_images_batch.py
Downloads multiple images from a list.
Usage:
bash
python scripts/fetch_images_batch.py <urls_file> [output_dir]Input file: Text file with one URL per line, or JSON array
Example:
bash
python scripts/fetch_images_batch.py urls.txt /home/claude/temp_images从列表中批量下载多张图片。
使用方法:
bash
python scripts/fetch_images_batch.py <urls_file> [output_dir]输入文件: 每行一个URL的文本文件,或JSON数组
示例:
bash
python scripts/fetch_images_batch.py urls.txt /home/claude/temp_imagesCommon SAP Topics
常见SAP主题
This skill handles articles on:
- SD: Sales orders, pricing, delivery, billing, consignment
- MM: Procurement, inventory, material master, consignment
- FI: General ledger, accounts payable/receivable, asset accounting
- CO: Cost centers, profit centers, internal orders
- PP: Production planning, work centers, BOMs, confirmations
- WM: Warehouse management, storage bins, transfers
- Technical: ABAP, OData APIs, IDocs, BAPIs, RFCs, CDS views
- Basis: Data archiving (SARA), transports, system administration
- S/4HANA: Fiori apps, embedded analytics, simplifications
本Skill可处理以下SAP主题的文章:
- SD:销售订单、定价、交货、开票、寄售
- MM:采购、库存、物料主数据、寄售
- FI:总分类账、应付/应收账款、资产会计
- CO:成本中心、利润中心、内部订单
- PP:生产计划、工作中心、BOM、确认
- WM:仓库管理、存储仓位、转移
- 技术类:ABAP、OData APIs、IDocs、BAPIs、RFCs、CDS视图
- Basis:数据归档(SARA)、传输、系统管理
- S/4HANA:Fiori应用、嵌入式分析、简化功能
Complete Example Workflow
完整示例工作流
User Request: "Create an article on SAP sales order type configuration"
Step-by-step execution:
-
Read docx skill:bash
cat /mnt/skills/public/docx/SKILL.md -
Research (3 web searches):
web_search("SAP SD sales order type configuration VOV8") web_search("SAP sales document types customizing") web_search("SAP S/4HANA order type setup") -
Find images (2 web searches):
web_search("SAP transaction VOV8 screenshot") web_search("SAP sales order flow diagram") -
Download images:bash
mkdir -p /home/claude/temp_images cat > /home/claude/urls.txt << 'EOF' https://sap-blog.com/vov8-screenshot.png https://sap-tutorial.com/sales-flow.jpg EOF python scripts/fetch_images_batch.py /home/claude/urls.txt /home/claude/temp_images ls -lh /home/claude/temp_images/ -
Create Word document following docx skill with:
- Title page
- Table of contents
- Introduction
- Configuration steps
- Embedded images from /home/claude/temp_images/
- Testing procedures
- References section
-
Save and deliver:bash
# Document saved during creation to: /mnt/user-data/outputs/SAP_Sales_Order_Types_Configuration_Guide.docx
用户请求: "创建一篇关于SAP销售订单类型配置的文章"
分步执行:
-
阅读docx Skill:bash
cat /mnt/skills/public/docx/SKILL.md -
调研(3次网络搜索):
web_search("SAP SD sales order type configuration VOV8") web_search("SAP sales document types customizing") web_search("SAP S/4HANA order type setup") -
查找图片(2次网络搜索):
web_search("SAP transaction VOV8 screenshot") web_search("SAP sales order flow diagram") -
下载图片:bash
mkdir -p /home/claude/temp_images cat > /home/claude/urls.txt << 'EOF' https://sap-blog.com/vov8-screenshot.png https://sap-tutorial.com/sales-flow.jpg EOF python scripts/fetch_images_batch.py /home/claude/urls.txt /home/claude/temp_images ls -lh /home/claude/temp_images/ -
创建Word文档(遵循docx Skill),包含:
- 标题页
- 目录
- 介绍
- 配置步骤
- 从/home/claude/temp_images/嵌入图片
- 测试流程
- 参考文献部分
-
保存并交付:bash
# 创建文档时已保存至: /mnt/user-data/outputs/SAP_Sales_Order_Types_Configuration_Guide.docx
Troubleshooting
故障排查
Issue: Images not downloading
- Check URLs are direct image links
- Verify network connectivity
- Try alternative image sources
- Some sites block automated downloads
Issue: Image format not supported
- Script supports: JPG, PNG, GIF, WebP, BMP, SVG, TIFF
- Auto-detects format from content-type header
Issue: Images not embedding in Word
- Verify image files exist in /home/claude/temp_images/
- Check file paths are correct
- Follow docx skill instructions exactly for embedding
Issue: Python dependencies missing
bash
pip install requests Pillow --break-system-packages问题:图片无法下载
- 检查URL是否为直接图片链接
- 验证网络连接
- 尝试其他图片来源
- 部分网站会阻止自动化下载
问题:图片格式不支持
- 脚本支持:JPG、PNG、GIF、WebP、BMP、SVG、TIFF
- 会根据content-type头自动检测格式
问题:图片无法嵌入Word文档
- 验证图片文件是否存在于/home/claude/temp_images/
- 检查文件路径是否正确
- 严格遵循docx Skill的嵌入说明
问题:Python依赖缺失
bash
pip install requests Pillow --break-system-packagesCritical Reminders
重要提醒
- ALWAYS read docx SKILL.md first before creating any Word document
- ALWAYS fact-check with 2-3+ web searches
- ALWAYS download and embed 2-3+ images - this is not optional
- ALWAYS cite sources in the references section
- ALWAYS use proper SAP formatting (transaction codes in monospace)
- ALWAYS save to /mnt/user-data/outputs/ for user access
- ALWAYS verify image downloads before embedding
- 创建任何Word文档前,务必先阅读docx SKILL.md
- 务必执行2-3次及以上网络搜索进行事实核查
- 务必下载并嵌入2-3张及以上图片 - 此为必填项
- 务必在参考文献部分引用来源
- 务必使用规范的SAP格式(事务代码使用等宽字体)
- 务必保存至/mnt/user-data/outputs/目录,以便用户访问
- 嵌入前务必验证图片是否已成功下载
Success Criteria
成功标准
A successful SAP article includes:
✅ 2000-4000 words of fact-checked content
✅ 2-3+ embedded images with captions
✅ Professional Word document formatting
✅ SAP-specific styling (blue headers, monospace codes)
✅ Step-by-step instructions with transaction codes
✅ References section with 3-5+ sources
✅ Saved to /mnt/user-data/outputs/ with proper filename
✅ 2-3+ embedded images with captions
✅ Professional Word document formatting
✅ SAP-specific styling (blue headers, monospace codes)
✅ Step-by-step instructions with transaction codes
✅ References section with 3-5+ sources
✅ Saved to /mnt/user-data/outputs/ with proper filename
一篇合格的SAP文章需满足:
✅ 2000-4000字经过事实核查的内容
✅ 2-3张及以上带图注的嵌入图片
✅ 专业的Word文档格式
✅ SAP专属样式(蓝色标题、等宽代码)
✅ 带事务代码的分步说明
✅ 包含3-5个来源的参考文献部分
✅ 已保存至/mnt/user-data/outputs/目录,且文件名规范
✅ 2-3张及以上带图注的嵌入图片
✅ 专业的Word文档格式
✅ SAP专属样式(蓝色标题、等宽代码)
✅ 带事务代码的分步说明
✅ 包含3-5个来源的参考文献部分
✅ 已保存至/mnt/user-data/outputs/目录,且文件名规范