From antigravity-awesome-skills
Automates LibreOffice Impress presentations: creates ODP files, converts ODP/PPTX/PDF, generates slides from templates via soffice CLI and Python UNO scripting.
npx claudepluginhub sickn33/antigravity-awesome-skillsThis skill uses the workspace's default tool permissions.
LibreOffice Impress skill for creating, editing, converting, and automating presentation workflows using the native ODP (OpenDocument Presentation) format.
Automates LibreOffice Impress presentations: creates ODP files, converts ODP/PPTX/PDF, generates slides from templates via soffice CLI and Python UNO scripting.
Creates and modifies PowerPoint PPTX presentations via direct XML manipulation with Node.js scripts. Supports adding/editing slides, layouts, images, shapes, POTX templates. Activates on 'presentation', 'slides', 'deck', '.pptx'.
Creates, edits, and analyzes .pptx presentations programmatically: slides, layouts, content, speaker notes, comments. Uses Python scripts for text extraction and raw XML unpacking.
Share bugs, ideas, or general feedback.
LibreOffice Impress skill for creating, editing, converting, and automating presentation workflows using the native ODP (OpenDocument Presentation) format.
Use this skill when:
soffice --impress template.odp
import uno
def create_presentation():
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.presentation.PresentationDocument", ctx)
slides = doc.getDrawPages()
slide = slides.getByIndex(0)
doc.storeToURL("file:///path/to/presentation.odp", ())
doc.close(True)
# ODP to PPTX
soffice --headless --convert-to pptx presentation.odp
# ODP to PDF
soffice --headless --convert-to pdf presentation.odp
# PPTX to ODP
soffice --headless --convert-to odp presentation.pptx
# Batch convert
for file in *.odp; do
soffice --headless --convert-to pdf "$file"
done
import subprocess
import tempfile
from pathlib import Path
def generate_from_template(template_path, content, output_path):
with tempfile.TemporaryDirectory() as tmpdir:
subprocess.run(['unzip', '-q', template_path, '-d', tmpdir])
content_file = Path(tmpdir) / 'content.xml'
content_xml = content_file.read_text()
for key, value in content.items():
content_xml = content_xml.replace(f'${{{key}}}', str(value))
content_file.write_text(content_xml)
subprocess.run(['zip', '-rq', output_path, '.'], cwd=tmpdir)
return output_path
soffice --headless
soffice --headless --convert-to <format> <file>
soffice --impress # Impress
pip install ezodf # ODF handling
pip install odfpy # ODF manipulation
killall soffice.bin
soffice --headless --accept="socket,host=localhost,port=8100;urp;"