Name | cmi-docx JSON |
Version |
0.3.11
JSON |
| download |
home_page | None |
Summary | Additional tooling for Python-docx. |
upload_time | 2025-01-29 20:03:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# CMI-docx
[](https://github.com/childmindresearch/cmi-docx/actions/workflows/test.yaml?query=branch%3Amain)
[](https://codecov.io/gh/childmindresearch/cmi-docx)
[](https://github.com/astral-sh/ruff)

[](https://github.com/childmindresearch/cmi-docx/blob/main/LICENSE)
[](https://childmindresearch.github.io/cmi-docx)
`cmi-docx` is a Python library for manipulating .docx files built on top of `python-docx`. It extends the functionality of `python-docx` by providing additional features and utilities for working with .docx files.
## Features
- Find and replace.
- Insert paragraphs in the middle of a document.
- Manipulate styles and formatting of paragraphs' substrings.
## Installation
Install this package from pypi using your favorite package manager. For example, using `pip`:
```sh
pip install cmi-docx
```
## Quick start
The following example demonstratesa few features of cmi-docx:
```Python
import docx
from cmi_docx import document
doc = docx.Document()
paragraph = doc.add_paragraph("Hello, world!")
extend_document = document.ExtendDocument(doc)
extend_paragraph = document.ExtendParagraph(paragraph)
# Find and replace text.
extend_document.replace("Hello", "Hi", {"bold": True})
# Insert and image
extend_document.insert_image(index=1, image_path="path/to/image.png")
# Reformat a paragraph
extend_paragraph.format(italics=True)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "cmi-docx",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/d8/ae/5c064480856dd41eebda777c3be0d73c3ff99970999458cac07608c22513/cmi_docx-0.3.11.tar.gz",
"platform": null,
"description": "# CMI-docx\n\n[](https://github.com/childmindresearch/cmi-docx/actions/workflows/test.yaml?query=branch%3Amain)\n[](https://codecov.io/gh/childmindresearch/cmi-docx)\n[](https://github.com/astral-sh/ruff)\n\n[](https://github.com/childmindresearch/cmi-docx/blob/main/LICENSE)\n[](https://childmindresearch.github.io/cmi-docx)\n\n`cmi-docx` is a Python library for manipulating .docx files built on top of `python-docx`. It extends the functionality of `python-docx` by providing additional features and utilities for working with .docx files.\n\n## Features\n\n- Find and replace.\n- Insert paragraphs in the middle of a document.\n- Manipulate styles and formatting of paragraphs' substrings.\n\n## Installation\n\nInstall this package from pypi using your favorite package manager. For example, using `pip`:\n\n```sh\npip install cmi-docx\n```\n\n## Quick start\n\nThe following example demonstratesa few features of cmi-docx:\n\n```Python\nimport docx\n\nfrom cmi_docx import document\n\ndoc = docx.Document()\nparagraph = doc.add_paragraph(\"Hello, world!\")\nextend_document = document.ExtendDocument(doc)\nextend_paragraph = document.ExtendParagraph(paragraph)\n\n# Find and replace text.\nextend_document.replace(\"Hello\", \"Hi\", {\"bold\": True})\n\n# Insert and image\nextend_document.insert_image(index=1, image_path=\"path/to/image.png\")\n\n# Reformat a paragraph\nextend_paragraph.format(italics=True)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Additional tooling for Python-docx.",
"version": "0.3.11",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ecdb640695b4aea894d96a371a62777710f6151493ac42643a3810df92803646",
"md5": "9d4287a74d3262fc58a1e2962018dff6",
"sha256": "52040b5d9b0d9031185c499d34c7a9eac805e89b5da88ae4f12880233e05f8ed"
},
"downloads": -1,
"filename": "cmi_docx-0.3.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9d4287a74d3262fc58a1e2962018dff6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 22007,
"upload_time": "2025-01-29T20:03:28",
"upload_time_iso_8601": "2025-01-29T20:03:28.819826Z",
"url": "https://files.pythonhosted.org/packages/ec/db/640695b4aea894d96a371a62777710f6151493ac42643a3810df92803646/cmi_docx-0.3.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d8ae5c064480856dd41eebda777c3be0d73c3ff99970999458cac07608c22513",
"md5": "da8ed2becfc606f7edb7d695d0ab50f0",
"sha256": "ca88994413107254f2a8183f028e74444bcf21eb810ced5313ddc4fd2908c259"
},
"downloads": -1,
"filename": "cmi_docx-0.3.11.tar.gz",
"has_sig": false,
"md5_digest": "da8ed2becfc606f7edb7d695d0ab50f0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 31025,
"upload_time": "2025-01-29T20:03:31",
"upload_time_iso_8601": "2025-01-29T20:03:31.978632Z",
"url": "https://files.pythonhosted.org/packages/d8/ae/5c064480856dd41eebda777c3be0d73c3ff99970999458cac07608c22513/cmi_docx-0.3.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-29 20:03:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "cmi-docx"
}