Metadata-Version: 2.4
Name: quillwork
Version: 0.0.4
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Office Suites
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Dist: pytest>=8 ; extra == 'test'
Requires-Dist: jsonschema>=4.23 ; extra == 'test'
Requires-Dist: mypy>=1.13 ; extra == 'test'
Provides-Extra: test
License-File: LICENSE
License-File: NOTICE
Summary: Lossless, AI-friendly editing of Word documents and PowerPoint decks
Keywords: docx,word,pptx,powerpoint,ooxml,tracked-changes,llm,agents
License-Expression: Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/gardan4/quillwork/blob/main/CHANGELOG.md
Project-URL: Documentation, https://github.com/gardan4/quillwork/blob/main/docs/BINDING.md
Project-URL: Homepage, https://github.com/gardan4/quillwork
Project-URL: Issues, https://github.com/gardan4/quillwork/issues

# quillwork

Lossless, AI-friendly editing of Word documents and existing PowerPoint decks, for Python
3.12 and newer.

An agent reads a compact text view of the document, with a short anchor on every paragraph,
table row and comment. It sends small JSON edits against those anchors. Quillwork writes each
edit into the original file as a real Word tracked change and leaves every byte it did not need
to touch exactly as it was. Letterheads, numbering, styles, fields and existing tracked changes
survive, and a person reviews the agent's work in Word's Review pane.

```python
from pathlib import Path

import quillwork

doc = quillwork.Document.open(Path("contract.docx").read_bytes())
doc.set_agent("AI")
print(doc.read())        # [b103 #1.] The Consultant provides advice ... for 16 hours per week.

doc.apply({
    "base_version": doc.version,
    "ops": [{"op": "replace_text", "anchor": "b103", "find": "16 hours", "replace": "20 hours"}],
})
Path("contract.edited.docx").write_bytes(doc.save())
```

`doc.help()` lists every op. This is an alpha (0.0.x): the op language and the sidecar format
may change between releases.

`quillwork.Presentation` edits existing `.pptx` text, tables and speaker notes and fills
literal `{{name}}` template slots across formatted runs. It preserves the branded deck and
returns exact source/candidate hashes and a text review report. PowerPoint candidates need
application-owned approval and a visual fit check. Slide creation and image/chart editing
are outside this initial API. See the
[PowerPoint guide](https://github.com/gardan4/quillwork/blob/main/docs/POWERPOINT.md).

- Source, docs and benchmarks: https://github.com/gardan4/quillwork
- Binding reference: https://github.com/gardan4/quillwork/blob/main/docs/BINDING.md
- MCP server and agent tools: the `quillwork-server` package

Licensed under Apache-2.0.

