by sickn33
使用 LibreOffice Draw 命令行工具在 ODG、SVG、PDF 和 PNG 格式之间转换图表,实现自动化图形工作流。
1. 打开 Claude 聊天界面
2. 点击下方 "📋 复制" 按钮
3. 粘贴到 Claude 聊天框中并发送
4. 输入 "使用 draw 技能" 开始使用
=== draw 技能 === 作者: sickn33 描述: 使用 LibreOffice Draw 命令行工具在 ODG、SVG、PDF 和 PNG 格式之间转换图表,实现自动化图形工作流。 使用方法: 1. 调用技能: "使用 draw 技能" 2. 提供相关信息: 根据技能要求提供必要参数 3. 查看结果: 技能会返回处理结果 示例: "使用 draw 技能,帮我分析一下这段代码"
这种方法适用于所有 Claude 用户,不需要安装额外工具。
design
safe
LibreOffice Draw skill for creating, editing, converting, and automating vector graphics and diagram workflows using the native ODG (OpenDocument Drawing) format.
Use this skill when:
soffice --draw template.odg
import uno
def create_drawing():
local_ctx = uno.getComponentContext()
resolver = local_ctx.ServiceManager.createInstanceWithContext(
"com.sun.star.bridge.UnoUrlResolver", local_ctx
)
ctx = resolver.resolve(
"uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext"
)
smgr = ctx.ServiceManager
doc = smgr.createInstanceWithContext("com.sun.star.drawing.DrawingDocument", ctx)
page = doc.getDrawPages().getByIndex(0)
doc.storeToURL("file:///path/to/drawing.odg", ())
doc.close(True)
# ODG to SVG
soffice --headless --convert-to svg drawing.odg
# ODG to PDF
soffice --headless --convert-to pdf drawing.odg
# ODG to PNG
soffice --headless --convert-to png:PNG_drawing drawing.odg
# SVG to ODG
soffice --headless --convert-to odg drawing.svg
# Batch convert
for file in *.odg; do
soffice --headless --convert-to pdf "$file"
done
soffice --headless
soffice --headless --convert-to <format> <file>
soffice --draw # Draw
pip install ezodf # ODF handling
pip install odfpy # ODF manipulation
pip install svgwrite # SVG generation
killall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"
soffice --headless --convert-to png:PNG_drawing_Export \
--filterData='{"Width":2048,"Height":2048}' drawing.odg
View Count
0
Download Count
0
Favorite Count
0
Quality Score
70