Additional tooling for Python-docx.
Project description
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:
pip install cmi-docx
Quick start
The following example demonstratesa few features of cmi-docx:
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cmi_docx-0.4.2.tar.gz.
File metadata
- Download URL: cmi_docx-0.4.2.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acb638e3602ce3c0774880fbb7407cc047c20dbc4d1b4f71b48fdfac83c6f962
|
|
| MD5 |
430c1cefab38b726511c765886539577
|
|
| BLAKE2b-256 |
9a8a36d4bb656d00e6726fd85cefaab8a5dc7238947eb8ebb4de7ed52010261c
|
Provenance
The following attestation bundles were made for cmi_docx-0.4.2.tar.gz:
Publisher:
pypi.yaml on childmindresearch/cmi-docx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cmi_docx-0.4.2.tar.gz -
Subject digest:
acb638e3602ce3c0774880fbb7407cc047c20dbc4d1b4f71b48fdfac83c6f962 - Sigstore transparency entry: 271788750
- Sigstore integration time:
-
Permalink:
childmindresearch/cmi-docx@e6963a568961d8f37b221e669155e250bcfb2430 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/childmindresearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@e6963a568961d8f37b221e669155e250bcfb2430 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cmi_docx-0.4.2-py3-none-any.whl.
File metadata
- Download URL: cmi_docx-0.4.2-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95026a3d5d58333f0afde64ec3157673667428a990f5fe4d1fb0ea346ecc6b59
|
|
| MD5 |
f25987c37d69019a899eb3b4fe3cf014
|
|
| BLAKE2b-256 |
486b0baca57402fc1d65a7ef24fd552225f636cd5e92ba2172ce583821ff9e47
|
Provenance
The following attestation bundles were made for cmi_docx-0.4.2-py3-none-any.whl:
Publisher:
pypi.yaml on childmindresearch/cmi-docx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cmi_docx-0.4.2-py3-none-any.whl -
Subject digest:
95026a3d5d58333f0afde64ec3157673667428a990f5fe4d1fb0ea346ecc6b59 - Sigstore transparency entry: 271788758
- Sigstore integration time:
-
Permalink:
childmindresearch/cmi-docx@e6963a568961d8f37b221e669155e250bcfb2430 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/childmindresearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@e6963a568961d8f37b221e669155e250bcfb2430 -
Trigger Event:
release
-
Statement type: