Toolverse
All skills

doc

by openai

Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus the bundled `scripts/render_docx.py` for visual checks.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
openai
Category
Frontend
Views
28

About this skill

Use when the task involves reading, creating, or editing .docx documents, especially when formatting or layout fidelity matters; prefer python-docx plus the bundled scripts/render_docx.py for visual checks.

How to use

  1. Zainstaluj wymagane pakiety Pythona: uruchom uv pip install python-docx pdf2image (lub python3 -m pip install python-docx pdf2image jeśli uv nie jest dostępne). 2. Zainstaluj narzędzia systemowe do renderowania: na macOS użyj brew install libreoffice poppler, na Ubuntu/Debian uruchom sudo apt-get install -y libreoffice poppler-utils. 3. Aby odczytać lub edytować dokument, użyj python-docx do strukturalnych zmian (nagłówki, style, tabele, listy). Zapisz plik w katalogu output/doc/ z opisową nazwą. 4. Po każdej znaczącej zmianie zweryfikuj wygląd wizualnie: jeśli dostępne są soffice i pdftoppm, konwertuj DOCX na PDF, a następnie na obrazy PNG. Alternatywnie użyj scripts/render_docx.py (wymaga pdf2image i Poppler). 5. Jeśli narzędzia do renderowania nie są dostępne, wyodrębnij tekst za pomocą python-docx jako rezerwę, ale zwróć uwagę na ryzyko związane z layoutem. 6. Pliki tymczasowe przechowuj w tmp/docs/ i usuń je po zatwierdzeniu dokumentu.

Related skills