← ClaudeAtlas

libreoffice-writerlisted

Use when creating, editing, formatting, exporting, or extracting LibreOffice Writer (.odt) documents via UNO, including session-based edits, structured text targets, tables, images, lists, patch workflows, and snapshots.
dfk1352/LibreOffice-skills · ★ 6 · Data & Documents · score 78
Install: claude install-skill dfk1352/LibreOffice-skills
# LibreOffice Writer Use the bundled `writer` modules for UNO-backed Writer document work. All paths must be **absolute**. Bundled modules live under `scripts/` in this skill directory, so set `PYTHONPATH=<skill_base_dir>/scripts`. If setup or runtime issues appear, check `references/troubleshooting.md`. ## API Surface ```python # Non-session utilities create_document(path, source=None) # source: path to .md file to import export_document(path, output_path, export_format) # formats: "pdf", "docx", "md" snapshot_page(doc_path, output_path, page=1, dpi=150) # Session (primary editing API) WriterSession(path) -> context manager WriterSession methods: read_text(target: WriterTarget | None = None) -> str insert_text(text, target: WriterTarget | None = None) replace_text(target: WriterTarget, new_text) delete_text(target: WriterTarget) format_text(target: WriterTarget, formatting: TextFormatting) insert_table(rows, cols, data=None, name=None, target: WriterTarget | None = None) update_table(target: WriterTarget, data) delete_table(target: WriterTarget) insert_image(image_path, width=None, height=None, name=None, target: WriterTarget | None = None) update_image(target: WriterTarget, image_path=None, width=None, height=None) delete_image(target: WriterTarget) insert_list(items: list[ListItem], ordered: bool, target: WriterTarget | None = None) replace_list(target: WriterTarget, items: list[ListItem], ordered: bool | None = None) delete_